Refer this for best explanation


#1

#2

Search " The Josephus Problem - Numberphile" on youtube
www . youtube . com / watch ? v = uCsD3ZGzMgE