124:
the lot falls to first, let him be killed by him that hath the second lot, and thus fortune shall make its progress through us all; nor shall any of us perish by his own right hand, for it would be unfair if, when the rest are gone, somebody should repent and save himself." This proposal appeared to them to be very just; and when he had prevailed with them to determine this matter by lots, he drew one of the lots for himself also. He who had the first lot laid his neck bare to him that had the next, as supposing that the general would die among them immediately; for they thought death, if
Josephus might but die with them, was sweeter than life; yet was he with another left to the last, whether we must say it happened so by chance, or whether by the providence of God. And as he was very desirous neither to be condemned by the lot, nor, if he had been left to the last, to imbrue his right hand in the blood of his countrymen, he persuaded him to trust his fidelity to him, and to live as well as himself.
5277:
4826:
5272:{\displaystyle g(n,k)={\begin{cases}0&{\text{if }}n=1\\(g(n-1,k)+k){\bmod {n}}&{\text{if }}1<n<k\\{\begin{Bmatrix}g(n-\left\lfloor {\frac {n}{k}}\right\rfloor ,k)-n{\bmod {k}}+n&{\text{if }}g(n-\left\lfloor {\frac {n}{k}}\right\rfloor ,k)<n{\bmod {k}}\\\lfloor {\frac {k(g(n-\left\lfloor {\frac {n}{k}}\right\rfloor ,k)-n{\bmod {k}})}{k-1}}\rfloor &{\text{if }}g(n-\left\lfloor {\frac {n}{k}}\right\rfloor ,k)\geq n{\bmod {k}}\end{Bmatrix}}&{\text{if }}k\leq n\\\end{cases}}}
289:
177:
31:
69:
109:. They chose suicide over capture, and settled on a serial method of committing suicide by drawing lots. Josephus states that by luck or possibly by the hand of God, he and another man remained until the end and surrendered to the Romans rather than killing themselves. This is the story given in Book 3, Chapter 8, part 7 of Josephus's
163:
As to intentionality, Josephus asked: âshall we put it down to divine providence or just to luck?â But the surviving
Slavonic manuscript of Josephus tells a different story: that he âcounted the numbers cunningly and so managed to deceive all the othersâ. Josephus had an accomplice; the problem was
81:
waiting to be executed. Counting begins at a specified point in the circle and proceeds around the circle in a specified direction. After a specified number of people are skipped, the next person is executed. The procedure is repeated with the remaining people, starting with the next person, going in
123:
However, in this extreme distress, he was not destitute of his usual sagacity; but trusting himself to the providence of God, he put his life into hazard : "And now," said he, "since it is resolved among you that you will die, come on, let us commit our mutual deaths to determination by lot. He whom
184:
A medieval version of the
Josephus problem involves 15 Turks and 15 Christians aboard a ship in a storm which will sink unless half the passengers are thrown overboard. All 30 stand in a circle and every ninth person is to be tossed into the sea. The Christians need to determine where to stand to
3797:
3679:
37:'s interpretation of the Josephus problem with 41 soldiers and a step size of 3, showing that places 16 and 31 are last to be killed – time progresses inwards along the spiral, green dots denoting live soldiers, grey dead soldiers, and crosses killings
72:
A drawing for the
Josephus problem sequence for 500 people and skipping value of 6. The horizontal axis is the number of the person. The vertical axis (top to bottom) is time (the number of cycle). A live person is drawn as green, a dead one is drawn as
3907:
141:
suggested the specific mechanism of arranging the men in a circle and counting by threes to determine the order of elimination. This story has been often repeated and the specific details vary considerably from source to source. For instance,
797:, then person 1 can be thought of as dying at the end of the first time around the circle. Again, during the second time around the circle, the new 2nd person dies, then the new 4th person, etc. In this case, the person in position
4480:
3485:
3351:
4602:
3277:
164:
then to find the places of the two last remaining survivors (whose conspiracy would ensure their survival). It is alleged that he placed himself and the other man in the 31st and 16th place respectively (for
2427:
3685:
2301:
1930:
180:
Variant of the
Josephus problem with 30 people and a step size of 9 – time progresses inwards along the spiral, green dots denoting live soldiers, grey dead soldiers, and crosses killings
2622:
3586:
2544:
4037:
is used to solve this problem in the general case by performing the first step and then using the solution of the remaining problem. When the index starts from one, then the person at
3205:
2117:
1770:
2064:
4815:
4109:
1717:
3971:
897:
4339:
4236:
2820:
1503:
1263:
788:
588:-numbered people die. The second time around the circle, the new 2nd person dies, then the new 4th person, etc.; it is as though there were no first time around the circle.
3384:
2170:
3829:
4764:
2781:
2742:
1811:
1547:
1464:
1411:
1307:
1224:
4277:
3578:
3537:
2659:
722:
519:
4148:
1169:
2850:
1991:
1964:
1656:
1629:
1338:
4686:
2882:
2688:
2467:
2336:
1367:
1130:
1048:
949:
828:
684:
655:
622:
552:
4651:
4194:
3823:
3176:
1587:
582:
493:
372:
3508:
4726:
4706:
4625:
4297:
4168:
4055:
920:
452:
432:
412:
392:
346:
326:
85:
The problemâgiven the number of people, starting point, direction, and number to be skippedâis to choose the position in the initial circle to avoid execution.
953:
4347:
150:(1974) have Josephus and 39 comrades stand in a circle with every seventh man eliminated. A history of the problem can be found in S. L. Zabell's
3392:
3282:
5855:
5505:
4491:
3217:
138:
34:
469:
The problem is explicitly solved when every second person will be killed (every person kills the person on their left or right), i.e.
5685:
5528:
2344:
3792:{\displaystyle \operatorname {round} (\alpha \cdot (3/2)^{m^{\prime }})\approx \operatorname {round} (0.8111\cdot (3/2)^{10})=47}
6019:
6029:
2175:
1816:
3674:{\displaystyle m^{\prime }\approx \operatorname {round} (\log _{3/2}41/0.8111)\approx \operatorname {round} (9.68)=10}
2549:
137:
The details of the mechanism used in this feat are rather vague. According to James Dowdy and
Michael Mays, in 1612
5994:
5676:
2480:
77:
In the particular counting-out game that gives rise to the
Josephus problem, a number of people are standing in a
3184:
2069:
1722:
1996:
185:
ensure that only the Turks are tossed. In other versions the roles of Turks and
Christians are interchanged.
4777:
191:, p. 8 describe and study a "standard" variant: Determine where the last survivor stands if there are
6014:
5925:
5875:
4060:
1418:
143:
62:
5539:
1661:
6034:
3989:
1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41
3914:
2433:
836:
82:
the same direction and skipping the same number of people, until only one person remains, and is freed.
5392:
4302:
4199:
3145:
2786:
1469:
1229:
733:
5835:
5663:
3902:{\displaystyle \operatorname {round} (0.8111\cdot (3/2)^{9})\approx \operatorname {round} (31.18)=31}
3149:
794:
585:
292:
Penultimate (pink) and ultimate (ultramarine) places in the
Josephus problem for various group size,
5930:
5880:
4856:
101:
historian and leader who lived in the 1st century. According to
Josephus's firsthand account of the
4034:
3356:
2122:
725:
156:
5440:
4728:
there is another approach. The second approach also uses dynamic programming but has running time
2303:
is had where the second equality follows from the induction hypothesis. This completes the proof.
301:
5906:
5893:
5818:
5762:
5607:
5599:
1414:
4731:
4196:
remains, and the next count is started with the person whose number in the original problem was
5999:
2747:
2703:
1775:
1508:
1430:
1372:
1268:
1190:
6024:
5971:
5851:
5681:
5524:
5517:
5501:
4241:
3545:
1309:. It is clear that values in the table satisfy this equation. Or it can be thought that after
58:
5379:
3516:
2631:
689:
498:
5885:
5843:
5808:
5783:
5752:
5725:
5667:
5659:
5591:
5570:
4118:
3001:
1556:
1139:
288:
147:
94:
42:
2828:
1969:
1942:
1634:
1607:
1316:
5549:
4662:
2861:
2664:
2443:
2312:
1343:
1106:
1024:
925:
804:
660:
631:
598:
528:
102:
4630:
4173:
3802:
3155:
1566:
561:
472:
351:
5839:
3490:
5959:
5671:
4711:
4691:
4657:
4610:
4282:
4153:
4040:
905:
437:
417:
397:
377:
331:
311:
111:
106:
68:
2889:
n = 1 0 1 0 0 1 2 = 1 0 0 0 0 0 l = 0 1 0 0 1
176:
30:
6008:
5974:
5822:
5787:
5766:
5696:
5611:
3008:
to the least significant bit will return the safe position. Input must be a positive
17:
5963:
5897:
5493:
5713:
5905:
Sullivan, Shaun; Insko, Erik (2018). "A variant on the Feline Josephus Problem".
5847:
5302:
3580:(which is actually the original formulation of Josephus' problem). They compute:
46:
5561:
Park, Jang-Woo; Teixeira, Ricardo (2018). "Serial execution Josephus Problem".
4475:{\displaystyle f(n,k)=((f(n-1,k)+k-1){\bmod {n}})+1,{\text{ with }}f(1,k)=1\,,}
5988:
5889:
5813:
5796:
5757:
5740:
1176:
5574:
5979:
3128:// Bitwise And to copy bits exists in both operands.
522:
5774:
Lloyd, Errol L. (1983). "An O(n logm) algorithm for the Josephus Problem".
3480:{\displaystyle f(n)=3(n-\operatorname {round} (\alpha \cdot (3/2)^{m}))+(2}
3116:// Get the first set bit | | Left Shift n and flipping the last bit
202:
A generalization of this problem is as follows. It is supposed that every
5631:
5620:
3210:
that can be computed to arbitrary precision. Given this constant, choose
2825:
Now if the number is represented in binary format, the first bit denotes
2700:
denotes the number of people, the safe position is given by the function
1133:
455:
3346:{\displaystyle m^{\prime }=\operatorname {round} (\log _{3/2}n/\alpha )}
1932:
is had where the second equality follows from the induction hypothesis.
5834:. Lecture Notes in Computer Science. Vol. 6099. pp. 343â354.
5603:
3976:
This can be verified by looking at each successive pass on the numbers
3009:
591:
If the initial number of people were even, then the person in position
116:
5920:
Theriault, Nicolas (2001). "Generilazations of the Josephus Problem".
5866:
Ruskey, Frank; Williams, Aaron (2012). "The Feline Josephus Problem".
5830:
Ruskey, Frank; Williams, Aaron (2010). "The Feline Josephus Problem".
4597:{\displaystyle g(n,k)=(g(n-1,k)+k){\bmod {n}},{\text{ with }}g(1,k)=0}
5730:
5544:. Translated by William Whiston. London: George Routledge & Sons.
78:
5595:
5393:
https://gustavus.edu/mcs/max/concrete-abstractions-pdfs/chapter3.pdf
3272:{\displaystyle \operatorname {round} (\alpha \cdot (3/2)^{m})\leq n}
595:
during the second time around the circle was originally in position
5911:
5541:
The works of Flavius Josephus: in three volumes; with illustrations
4299:; shifting this to account for the fact that the starting point is
3994:
2, 4, 7, 8, 11, 13, 16, 17, 20, 22, 25, 26, 29, 31, 34, 35, 38, 40
287:
175:
67:
29:
961:, also the leftmost column of blue numbers in the figure above):
5701:
Journal of Combinatorial Mathematics and Combinatorial Computing
4238:. The position of the survivor in the remaining circle would be
61:. Such games are used to pick out a person from a group, e.g.
5485:
Problemes Plaisants ed Delectables qui se font par les Nombres
98:
5229:
5147:
5076:
5008:
4919:
4553:
4418:
4313:
4210:
4083:
3004:. In this approach, shifting the most-significant set bit of
554:
denote the position of the survivor when there are initially
3728:
3595:
3365:
3291:
2422:{\displaystyle f(n)=2(n-2^{\lfloor \log _{2}(n)\rfloor })+1}
394:-th is executed. The people in the circle are numbered from
5680:(Second ed.). MIT Press and McGraw-Hill. p. 318.
5265:
3542:
As an example computation, Halbeisen and HungerbĂŒhler give
3026:* @return the safe position who will survive the execution
3023:* @param n (41) the number of people standing in the circle
2900:* @return the safe position who will survive the execution
957:
521:, a solution is outlined below.) The solution is expressed
5939:
Woodhouse, David (1973). "The extended Josephus problem".
3015:
n = 1 0 1 0 0 1 n = 0 1 0 0 1 1
2903:* f(N) = 2L + 1 where N =2^M + L and 0 <= L < 2^M
328:
denotes the number of people in the initial circle, and
304:
hover over the values to show the full order of killing.
132:, p. 579, Wars of the Jews, Book III, Ch. 8, para 7
5498:
Concrete Mathematics: A Foundation for Computer Science
2624:. The proof of this follows from the representation of
2296:{\displaystyle f(n)=2f((n-1)/2)+1=2((2l_{1})+1)+1=2l+1}
214:
th person is the survivor. If there is an addition of
4959:
3000:
The easiest way to find the safe position is by using
2897:* @param n the number of people standing in the circle
4829:
4817:-th people as one step, then changing the numbering.
4780:
4734:
4714:
4694:
4665:
4633:
4613:
4494:
4350:
4305:
4285:
4244:
4202:
4176:
4156:
4121:
4063:
4043:
3917:
3832:
3805:
3688:
3589:
3548:
3519:
3493:
3395:
3359:
3285:
3220:
3187:
3158:
2864:
2831:
2789:
2750:
2706:
2667:
2634:
2552:
2483:
2446:
2347:
2315:
2178:
2125:
2072:
1999:
1972:
1945:
1819:
1778:
1725:
1664:
1637:
1610:
1569:
1511:
1472:
1433:
1375:
1346:
1319:
1271:
1232:
1193:
1142:
1109:
1027:
928:
908:
839:
807:
736:
692:
663:
634:
601:
564:
531:
501:
475:
440:
420:
400:
380:
354:
334:
314:
5380:
Making History: The Storytellers Who Shaped the Past
188:
1925:{\displaystyle f(n)=2f(n/2)-1=2((2l_{1})+1)-1=2l+1}
105:, he and his 40 soldiers were trapped in a cave by
5966:allowing selection of every n out of 50 (maximum).
5674:(2001). "Chapter 14: Augmenting Data Structures".
5516:
5303:"Josephus problem in FĆrmulĂŠ programming language"
5271:
4809:
4758:
4720:
4700:
4680:
4645:
4619:
4596:
4474:
4333:
4291:
4271:
4230:
4188:
4162:
4142:
4103:
4049:
3965:
3901:
3817:
3791:
3673:
3572:
3531:
3502:
3479:
3378:
3345:
3271:
3199:
3170:
2876:
2844:
2814:
2775:
2736:
2682:
2653:
2616:
2538:
2469:can be obtained by a one-bit left cyclic shift of
2461:
2421:
2330:
2295:
2164:
2111:
2058:
1985:
1958:
1924:
1805:
1764:
1711:
1650:
1623:
1589:is true. The cases are considered separately when
1581:
1541:
1497:
1458:
1405:
1361:
1332:
1301:
1257:
1218:
1163:
1124:
1042:
943:
914:
891:
822:
782:
716:
678:
649:
616:
576:
546:
513:
487:
446:
426:
406:
386:
366:
340:
320:
218:people to the circle, then the survivor is in the
5441:"Josephus Problem using Bitwise Operation (Java)"
5350:
3113:// ---------------------- --- | ------------
2432:The most elegant form of the answer involves the
5582:Robinson, W. J. (1960). "The Josephus problem".
2617:{\displaystyle f(n)=b_{1}b_{2}b_{3}\dots b_{m}1}
2309:can be solved to get an explicit expression for
1369:st person. This person must be the survivor. So
686:who will now survive was originally in position
584:). The first time around the circle, all of the
206:th person will be executed from a group of size
57:) is a theoretical problem related to a certain
5797:"Functional iteration and the Josephus problem"
4150:denote the position of the survivor. After the
3178:. They showed that there is a certain constant
121:
228:-th position if this is less than or equal to
5795:Odlyzko, Andrew M.; Wilf, Herbert S. (1991).
2539:{\displaystyle n=1b_{1}b_{2}b_{3}\dots b_{m}}
8:
5465:
5173:
5089:
4798:
4784:
4057:shifts from the first person is in position
2405:
2380:
3999:2, 4, 8, 11, 16, 17, 22, 25, 29, 31, 35, 38
5403:
885:
776:
348:denotes the count for each step, that is,
5929:
5910:
5879:
5812:
5756:
5729:
5326:
5248:
5232:
5228:
5199:
5178:
5150:
5146:
5117:
5092:
5079:
5075:
5046:
5025:
5011:
5007:
4978:
4954:
4930:
4922:
4918:
4864:
4851:
4828:
4790:
4779:
4733:
4713:
4693:
4664:
4632:
4612:
4565:
4556:
4552:
4493:
4468:
4439:
4421:
4417:
4349:
4316:
4312:
4304:
4284:
4243:
4213:
4209:
4201:
4175:
4155:
4120:
4086:
4082:
4062:
4042:
3916:
3866:
3854:
3831:
3804:
3774:
3762:
3727:
3722:
3710:
3687:
3636:
3620:
3616:
3594:
3588:
3547:
3518:
3492:
3456:
3444:
3394:
3364:
3358:
3332:
3316:
3312:
3290:
3284:
3254:
3242:
3219:
3186:
3157:
2863:
2836:
2830:
2806:
2788:
2761:
2749:
2705:
2666:
2639:
2633:
2605:
2592:
2582:
2572:
2551:
2530:
2517:
2507:
2497:
2482:
2445:
2387:
2379:
2346:
2314:
2254:
2218:
2177:
2154:
2130:
2124:
2101:
2096:
2083:
2071:
2050:
2035:
2030:
2015:
1998:
1977:
1971:
1950:
1944:
1883:
1847:
1818:
1795:
1783:
1777:
1754:
1749:
1736:
1724:
1703:
1688:
1683:
1668:
1663:
1642:
1636:
1615:
1609:
1568:
1510:
1489:
1471:
1444:
1432:
1374:
1345:
1324:
1318:
1270:
1249:
1231:
1204:
1192:
1141:
1108:
1026:
927:
907:
838:
806:
735:
691:
662:
633:
600:
563:
530:
500:
474:
439:
419:
399:
379:
353:
333:
313:
195:people to start and every second person (
5712:Halbeisen, L.; HungerbĂŒhler, N. (1997).
5427:
3200:{\displaystyle \alpha \approx 0.8111...}
2112:{\displaystyle 0\leq l_{1}<2^{m_{1}}}
1765:{\displaystyle 0\leq l_{1}<2^{m_{1}}}
963:
129:
5695:Dowdy, James; Mays, Michael E. (1989).
5515:Herstein, I. N.; Kaplansky, I. (1974).
5373:
5371:
5293:
2059:{\displaystyle (n-1)/2=2^{m_{1}}+l_{1}}
5415:
5362:
5338:
4820:This improved approach takes the form
4810:{\displaystyle (\lfloor n/k\rfloor k)}
3909:(note that this has been rounded down)
117:writing of himself in the third person
5741:"On the generalized Josephus problem"
4766:. It is based on considering killing
3214:to be the greatest integer such that
793:If the initial number of people were
7:
5383:, p. 54 (Simon & Schuster 2022).
4104:{\displaystyle ((s-1){\bmod {n}})+1}
3125:// Multiply n by 2 |
3122:// | |
3119:// and take its complement | |
5622:Mathematical Recreations and Essays
4607:if the positions are numbered from
4115:is the total number of people. Let
2933:// find value of L for the equation
1712:{\displaystyle n/2=2^{m_{1}}+l_{1}}
260:, then the survivor is in position
5990:The Josephus Problem - Numberphile
5625:(2nd ed.). London: Macmillan.
4170:-th person is killed, a circle of
3966:{\displaystyle f(n)=3(41-31)+1=31}
892:{\displaystyle f(2j+1)=2f(j)+1\;.}
189:Graham, Knuth & Patashnik 1989
27:Mathematical counting-out question
25:
2661:or from the above expression for
902:When the values are tabulated of
139:Claude Gaspard Bachet de MĂ©ziriac
4334:{\displaystyle (k{\bmod {n}})+1}
4231:{\displaystyle (k{\bmod {n}})+1}
2886:, its binary representation is:
2815:{\displaystyle 0\leq l<2^{m}}
2546:, then the solution is given by
1498:{\displaystyle 0\leq l<2^{m}}
1258:{\displaystyle 0\leq l<2^{m}}
1136:odd sequence that restarts with
783:{\displaystyle f(2j)=2f(j)-1\;.}
242:is the smallest value for which
35:Claude Gaspar Bachet de MĂ©ziriac
3386:). Then, the final survivor is
2852:and remaining bits will denote
1313:people are dead there are only
5219:
5186:
5156:
5137:
5104:
5098:
5066:
5033:
4998:
4965:
4915:
4906:
4888:
4882:
4845:
4833:
4804:
4781:
4753:
4738:
4675:
4669:
4585:
4573:
4549:
4540:
4522:
4516:
4510:
4498:
4459:
4447:
4427:
4414:
4399:
4381:
4375:
4372:
4366:
4354:
4322:
4306:
4266:
4248:
4219:
4203:
4137:
4125:
4092:
4079:
4067:
4064:
3948:
3936:
3927:
3921:
3890:
3884:
3872:
3863:
3848:
3839:
3780:
3771:
3756:
3747:
3735:
3719:
3704:
3695:
3662:
3656:
3644:
3609:
3497:
3471:
3465:
3462:
3453:
3438:
3429:
3414:
3405:
3399:
3340:
3305:
3260:
3251:
3236:
3227:
3144:In 1997, Lorenz Halbeisen and
2716:
2710:
2677:
2671:
2562:
2556:
2456:
2450:
2410:
2402:
2396:
2366:
2357:
2351:
2325:
2319:
2269:
2260:
2244:
2241:
2226:
2215:
2203:
2200:
2188:
2182:
2151:
2139:
2012:
2000:
1898:
1889:
1873:
1870:
1855:
1841:
1829:
1823:
1521:
1515:
1385:
1379:
1281:
1275:
1152:
1146:
1119:
1113:
1037:
1031:
938:
932:
876:
870:
858:
843:
767:
761:
749:
740:
705:
699:
673:
667:
541:
535:
434:, the starting position being
1:
5351:Herstein & Kaplansky 1974
4485:which takes the simpler form
3379:{\displaystyle m^{\prime }-1}
2165:{\displaystyle l_{1}=(l-1)/2}
830:. This yields the recurrence
495:. (For the more general case
6000:Generalized Josephus Problem
5848:10.1007/978-3-642-13122-6_33
5788:10.1016/0196-6774(83)90025-1
4004:2, 4, 11, 16, 22, 25, 31, 35
2477:is represented in binary as
172:Variants and generalizations
801:was originally in position
374:people are skipped and the
93:The problem is named after
6051:
5718:J. Théor. Nombres Bordeaux
5677:Introduction to Algorithms
5619:Rouse Ball, W. W. (1905).
5538:Josephus, Flavius (n.d.).
4759:{\displaystyle O(k\log n)}
4279:if counting is started at
1340:people and it goes to the
199:= 2 below) is eliminated.
5890:10.1007/s00224-011-9343-6
5814:10.1017/S0017089500008272
5758:10.1017/S0017089500001919
2776:{\displaystyle n=2^{m}+l}
2737:{\displaystyle f(n)=2l+1}
1806:{\displaystyle l_{1}=l/2}
1542:{\displaystyle f(n)=2l+1}
1459:{\displaystyle n=2^{m}+l}
1406:{\displaystyle f(n)=2l+1}
1302:{\displaystyle f(n)=2l+1}
1219:{\displaystyle n=2^{m}+l}
5575:10.11568/kjm.2018.26.1.1
5554:The World of Mathematics
5496:; Patashnik, O. (1989).
5466:Park & Teixeira 2018
4272:{\displaystyle f(n-1,k)}
3573:{\displaystyle n=41,k=3}
3017:
2891:
5697:"Josephus Permutations"
3532:{\displaystyle n\geq 5}
2654:{\displaystyle 2^{m}+l}
717:{\displaystyle 2f(j)-1}
514:{\displaystyle k\neq 2}
454:and the counting being
6020:Computational problems
5739:JakĂłbczyk, F. (1973).
5714:"The Josephus Problem"
5632:"Letter to the editor"
5630:Zabell, S. L. (1976).
5556:. Vol. 4. Tempus.
5483:Bachet, C. G. (1612).
5273:
4811:
4760:
4722:
4702:
4682:
4647:
4621:
4598:
4476:
4341:yields the recurrence
4335:
4293:
4273:
4232:
4190:
4164:
4144:
4143:{\displaystyle f(n,k)}
4105:
4051:
3967:
3903:
3819:
3793:
3675:
3574:
3533:
3504:
3487:if is rounded up else
3481:
3380:
3347:
3273:
3201:
3172:
2878:
2846:
2816:
2777:
2738:
2684:
2655:
2618:
2540:
2463:
2423:
2332:
2297:
2166:
2113:
2060:
1987:
1960:
1926:
1807:
1766:
1713:
1652:
1625:
1583:
1543:
1499:
1460:
1407:
1363:
1334:
1303:
1259:
1220:
1165:
1164:{\displaystyle f(n)=1}
1126:
1044:
945:
916:
893:
824:
784:
718:
680:
651:
618:
578:
548:
515:
489:
448:
428:
408:
388:
368:
342:
322:
305:
181:
144:Israel Nathan Herstein
135:
74:
63:eeny, meeny, miny, moe
38:
6030:Mathematical problems
5960:Josephus Flavius game
5664:Leiserson, Charles E.
5418:, pp. 2403â2405.
5327:Dowdy & Mays 1989
5274:
4812:
4761:
4723:
4703:
4683:
4648:
4622:
4599:
4477:
4336:
4294:
4274:
4233:
4191:
4165:
4145:
4106:
4052:
3968:
3904:
3820:
3794:
3676:
3575:
3534:
3505:
3482:
3381:
3348:
3279:(this will be either
3274:
3202:
3173:
2879:
2847:
2845:{\displaystyle 2^{m}}
2817:
2778:
2739:
2685:
2656:
2619:
2541:
2464:
2434:binary representation
2424:
2333:
2298:
2167:
2114:
2061:
1988:
1986:{\displaystyle m_{1}}
1961:
1959:{\displaystyle l_{1}}
1927:
1808:
1767:
1714:
1653:
1651:{\displaystyle m_{1}}
1626:
1624:{\displaystyle l_{1}}
1604:is even, then choose
1584:
1544:
1500:
1461:
1408:
1364:
1335:
1333:{\displaystyle 2^{m}}
1304:
1260:
1221:
1166:
1127:
1045:
946:
917:
894:
825:
785:
719:
681:
652:
624:(for every choice of
619:
579:
549:
516:
490:
449:
429:
409:
389:
369:
343:
323:
291:
179:
71:
33:
5941:Rev. Mat. Hisp.-Amer
5832:Lect. Not. Comp. Sci
5519:Matters Mathematical
5301:R.Ugalde, Laurence.
4827:
4778:
4732:
4712:
4692:
4681:{\displaystyle O(n)}
4663:
4631:
4611:
4492:
4348:
4303:
4283:
4242:
4200:
4174:
4154:
4119:
4061:
4041:
4009:2, 4, 16, 22, 31, 35
3915:
3830:
3803:
3686:
3587:
3546:
3517:
3491:
3393:
3357:
3283:
3218:
3185:
3156:
3146:Norbert HungerbĂŒhler
2877:{\displaystyle n=41}
2862:
2856:. For example, when
2829:
2787:
2748:
2704:
2683:{\displaystyle f(n)}
2665:
2632:
2550:
2481:
2462:{\displaystyle f(n)}
2444:
2345:
2331:{\displaystyle f(n)}
2313:
2176:
2123:
2070:
1997:
1970:
1943:
1939:is odd, then choose
1817:
1776:
1723:
1662:
1635:
1608:
1567:
1509:
1470:
1431:
1373:
1362:{\displaystyle 2l+1}
1344:
1317:
1269:
1230:
1191:
1140:
1125:{\displaystyle f(n)}
1107:
1043:{\displaystyle f(n)}
1025:
944:{\displaystyle f(n)}
926:
906:
837:
823:{\displaystyle 2x+1}
805:
734:
690:
679:{\displaystyle f(j)}
661:
650:{\displaystyle n=2j}
632:
617:{\displaystyle 2x-1}
599:
562:
547:{\displaystyle f(n)}
529:
499:
473:
438:
418:
398:
378:
352:
332:
312:
152:Letter to the editor
55:Josephus permutation
18:Josephus permutation
5868:Theory Comput. Syst
5840:2010LNCS.6099..343R
5639:Fibonacci Quarterly
5353:, pp. 121â126.
4646:{\displaystyle n-1}
4189:{\displaystyle n-1}
4035:Dynamic programming
3818:{\displaystyle m=9}
3171:{\displaystyle k=3}
1582:{\displaystyle n=1}
1187:are chosen so that
1171:whenever the index
1103:This suggests that
951:a pattern emerges (
577:{\displaystyle k=2}
488:{\displaystyle k=2}
367:{\displaystyle k-1}
157:Fibonacci Quarterly
5975:"Josephus Problem"
5972:Weisstein, Eric W.
5523:. Harper and Row.
5500:. Addison Wesley.
5365:, pp. 48, 51.
5269:
5264:
5240:
4807:
4756:
4718:
4698:
4678:
4656:This approach has
4643:
4617:
4594:
4472:
4331:
4289:
4269:
4228:
4186:
4160:
4140:
4101:
4047:
3963:
3899:
3815:
3789:
3671:
3570:
3529:
3503:{\displaystyle 1)}
3500:
3477:
3376:
3343:
3269:
3197:
3168:
2874:
2842:
2812:
2773:
2734:
2680:
2651:
2614:
2536:
2459:
2419:
2328:
2293:
2162:
2109:
2056:
1983:
1956:
1922:
1803:
1762:
1709:
1648:
1621:
1579:
1539:
1495:
1456:
1403:
1359:
1330:
1299:
1255:
1216:
1161:
1122:
1040:
941:
912:
889:
820:
780:
724:. This yields the
714:
676:
647:
614:
574:
544:
511:
485:
444:
424:
404:
384:
364:
338:
318:
308:In the following,
306:
182:
75:
39:
5962:(Java Applet) at
5857:978-3-642-13121-9
5668:Rivest, Ronald L.
5660:Cormen, Thomas H.
5507:978-0-201-14236-5
5447:. January 7, 2018
5430:, pp. 47â52.
5377:Cohen, Richard.
5251:
5207:
5181:
5171:
5125:
5054:
5028:
4986:
4933:
4867:
4721:{\displaystyle n}
4701:{\displaystyle k}
4620:{\displaystyle 0}
4568:
4442:
4292:{\displaystyle 1}
4163:{\displaystyle k}
4050:{\displaystyle s}
3002:bitwise operators
1593:is even and when
1101:
1100:
915:{\displaystyle n}
447:{\displaystyle 1}
427:{\displaystyle n}
407:{\displaystyle 1}
387:{\displaystyle k}
341:{\displaystyle k}
321:{\displaystyle n}
59:counting-out game
16:(Redirected from
6042:
5991:
5985:
5984:
5948:
5935:
5933:
5916:
5914:
5901:
5883:
5861:
5826:
5816:
5791:
5770:
5760:
5735:
5733:
5731:10.5802/jtnb.204
5708:
5691:
5646:
5636:
5626:
5615:
5578:
5557:
5545:
5534:
5522:
5511:
5488:
5469:
5463:
5457:
5456:
5454:
5452:
5437:
5431:
5425:
5419:
5413:
5407:
5401:
5395:
5390:
5384:
5375:
5366:
5360:
5354:
5348:
5342:
5336:
5330:
5324:
5318:
5317:
5315:
5313:
5298:
5278:
5276:
5275:
5270:
5268:
5267:
5252:
5249:
5245:
5244:
5237:
5236:
5212:
5208:
5200:
5182:
5179:
5172:
5170:
5159:
5155:
5154:
5130:
5126:
5118:
5093:
5084:
5083:
5059:
5055:
5047:
5029:
5026:
5016:
5015:
4991:
4987:
4979:
4934:
4931:
4927:
4926:
4868:
4865:
4816:
4814:
4813:
4808:
4794:
4765:
4763:
4762:
4757:
4727:
4725:
4724:
4719:
4707:
4705:
4704:
4699:
4688:, but for small
4687:
4685:
4684:
4679:
4652:
4650:
4649:
4644:
4626:
4624:
4623:
4618:
4603:
4601:
4600:
4595:
4569:
4567: with
4566:
4561:
4560:
4481:
4479:
4478:
4473:
4443:
4441: with
4440:
4426:
4425:
4340:
4338:
4337:
4332:
4321:
4320:
4298:
4296:
4295:
4290:
4278:
4276:
4275:
4270:
4237:
4235:
4234:
4229:
4218:
4217:
4195:
4193:
4192:
4187:
4169:
4167:
4166:
4161:
4149:
4147:
4146:
4141:
4114:
4110:
4108:
4107:
4102:
4091:
4090:
4056:
4054:
4053:
4048:
4030:The general case
4025:
4020:
4015:
4010:
4005:
4000:
3995:
3990:
3983:
3979:
3972:
3970:
3969:
3964:
3908:
3906:
3905:
3900:
3871:
3870:
3858:
3824:
3822:
3821:
3816:
3798:
3796:
3795:
3790:
3779:
3778:
3766:
3734:
3733:
3732:
3731:
3714:
3680:
3678:
3677:
3672:
3640:
3629:
3628:
3624:
3599:
3598:
3579:
3577:
3576:
3571:
3538:
3536:
3535:
3530:
3509:
3507:
3506:
3501:
3486:
3484:
3483:
3478:
3461:
3460:
3448:
3385:
3383:
3382:
3377:
3369:
3368:
3352:
3350:
3349:
3344:
3336:
3325:
3324:
3320:
3295:
3294:
3278:
3276:
3275:
3270:
3259:
3258:
3246:
3213:
3206:
3204:
3203:
3198:
3177:
3175:
3174:
3169:
3132:
3129:
3126:
3123:
3120:
3117:
3114:
3111:
3108:
3105:
3102:
3099:
3096:
3093:
3090:
3087:
3084:
3081:
3078:
3075:
3072:
3069:
3066:
3063:
3060:
3057:
3054:
3051:
3048:
3045:
3042:
3039:
3036:
3033:
3030:
3027:
3024:
3021:
3007:
2991:
2988:
2985:
2982:
2979:
2976:
2973:
2970:
2967:
2964:
2961:
2958:
2955:
2952:
2949:
2946:
2943:
2940:
2937:
2934:
2931:
2928:
2925:
2922:
2919:
2916:
2913:
2910:
2907:
2904:
2901:
2898:
2895:
2885:
2883:
2881:
2880:
2875:
2855:
2851:
2849:
2848:
2843:
2841:
2840:
2821:
2819:
2818:
2813:
2811:
2810:
2782:
2780:
2779:
2774:
2766:
2765:
2743:
2741:
2740:
2735:
2699:
2694:Implementation:
2689:
2687:
2686:
2681:
2660:
2658:
2657:
2652:
2644:
2643:
2627:
2623:
2621:
2620:
2615:
2610:
2609:
2597:
2596:
2587:
2586:
2577:
2576:
2545:
2543:
2542:
2537:
2535:
2534:
2522:
2521:
2512:
2511:
2502:
2501:
2476:
2472:
2468:
2466:
2465:
2460:
2439:
2428:
2426:
2425:
2420:
2409:
2408:
2392:
2391:
2337:
2335:
2334:
2329:
2308:
2302:
2300:
2299:
2294:
2259:
2258:
2222:
2171:
2169:
2168:
2163:
2158:
2135:
2134:
2118:
2116:
2115:
2110:
2108:
2107:
2106:
2105:
2088:
2087:
2065:
2063:
2062:
2057:
2055:
2054:
2042:
2041:
2040:
2039:
2019:
1992:
1990:
1989:
1984:
1982:
1981:
1965:
1963:
1962:
1957:
1955:
1954:
1938:
1931:
1929:
1928:
1923:
1888:
1887:
1851:
1812:
1810:
1809:
1804:
1799:
1788:
1787:
1771:
1769:
1768:
1763:
1761:
1760:
1759:
1758:
1741:
1740:
1718:
1716:
1715:
1710:
1708:
1707:
1695:
1694:
1693:
1692:
1672:
1657:
1655:
1654:
1649:
1647:
1646:
1630:
1628:
1627:
1622:
1620:
1619:
1603:
1596:
1592:
1588:
1586:
1585:
1580:
1563:. The base case
1562:
1557:strong induction
1548:
1546:
1545:
1540:
1504:
1502:
1501:
1496:
1494:
1493:
1465:
1463:
1462:
1457:
1449:
1448:
1412:
1410:
1409:
1404:
1368:
1366:
1365:
1360:
1339:
1337:
1336:
1331:
1329:
1328:
1312:
1308:
1306:
1305:
1300:
1264:
1262:
1261:
1256:
1254:
1253:
1225:
1223:
1222:
1217:
1209:
1208:
1186:
1179:. Therefore, if
1170:
1168:
1167:
1162:
1131:
1129:
1128:
1123:
1049:
1047:
1046:
1041:
969:
964:
960:
950:
948:
947:
942:
921:
919:
918:
913:
898:
896:
895:
890:
829:
827:
826:
821:
800:
789:
787:
786:
781:
723:
721:
720:
715:
685:
683:
682:
677:
657:. The person at
656:
654:
653:
648:
627:
623:
621:
620:
615:
594:
583:
581:
580:
575:
557:
553:
551:
550:
545:
520:
518:
517:
512:
494:
492:
491:
486:
453:
451:
450:
445:
433:
431:
430:
425:
413:
411:
410:
405:
393:
391:
390:
385:
373:
371:
370:
365:
347:
345:
344:
339:
327:
325:
324:
319:
279:
259:
241:
237:
227:
217:
213:
209:
205:
198:
194:
167:
148:Irving Kaplansky
133:
95:Flavius Josephus
51:Josephus problem
43:computer science
21:
6050:
6049:
6045:
6044:
6043:
6041:
6040:
6039:
6005:
6004:
5989:
5970:
5969:
5956:
5951:
5938:
5931:10.1.1.164.2015
5924:(58): 161â173.
5919:
5904:
5881:10.1.1.157.2956
5865:
5858:
5829:
5801:Glasgow Math. J
5794:
5773:
5738:
5711:
5694:
5688:
5672:Stein, Clifford
5658:
5654:
5652:Further reading
5649:
5634:
5629:
5618:
5596:10.2307/3608532
5581:
5560:
5548:
5537:
5531:
5514:
5508:
5492:Graham, R. L.;
5491:
5482:
5478:
5473:
5472:
5468:, pp. 1â7.
5464:
5460:
5450:
5448:
5439:
5438:
5434:
5426:
5422:
5414:
5410:
5404:Rouse Ball 1905
5402:
5398:
5391:
5387:
5376:
5369:
5361:
5357:
5349:
5345:
5337:
5333:
5325:
5321:
5311:
5309:
5300:
5299:
5295:
5290:
5285:
5263:
5262:
5246:
5239:
5238:
5195:
5176:
5160:
5113:
5094:
5086:
5085:
5042:
5023:
4974:
4955:
4951:
4950:
4928:
4879:
4878:
4862:
4852:
4825:
4824:
4776:
4775:
4730:
4729:
4710:
4709:
4690:
4689:
4661:
4660:
4629:
4628:
4609:
4608:
4490:
4489:
4346:
4345:
4301:
4300:
4281:
4280:
4240:
4239:
4198:
4197:
4172:
4171:
4152:
4151:
4117:
4116:
4112:
4059:
4058:
4039:
4038:
4032:
4023:
4018:
4013:
4008:
4003:
3998:
3993:
3988:
3981:
3977:
3913:
3912:
3862:
3828:
3827:
3801:
3800:
3770:
3723:
3718:
3684:
3683:
3612:
3590:
3585:
3584:
3544:
3543:
3515:
3514:
3489:
3488:
3452:
3391:
3390:
3360:
3355:
3354:
3308:
3286:
3281:
3280:
3250:
3216:
3215:
3211:
3183:
3182:
3154:
3153:
3142:
3134:
3133:
3130:
3127:
3124:
3121:
3118:
3115:
3112:
3109:
3106:
3103:
3100:
3097:
3094:
3091:
3088:
3085:
3082:
3079:
3076:
3073:
3070:
3067:
3064:
3061:
3058:
3055:
3052:
3049:
3046:
3043:
3040:
3038:getSafePosition
3037:
3034:
3031:
3028:
3025:
3022:
3019:
3016:
3005:
2998:
2993:
2992:
2989:
2986:
2983:
2980:
2977:
2974:
2971:
2968:
2965:
2962:
2959:
2956:
2953:
2950:
2947:
2944:
2941:
2938:
2935:
2932:
2929:
2926:
2923:
2920:
2917:
2915:getSafePosition
2914:
2911:
2908:
2905:
2902:
2899:
2896:
2893:
2890:
2860:
2859:
2857:
2853:
2832:
2827:
2826:
2802:
2785:
2784:
2757:
2746:
2745:
2702:
2701:
2697:
2663:
2662:
2635:
2630:
2629:
2625:
2601:
2588:
2578:
2568:
2548:
2547:
2526:
2513:
2503:
2493:
2479:
2478:
2474:
2470:
2442:
2441:
2437:
2383:
2375:
2343:
2342:
2311:
2310:
2306:
2250:
2174:
2173:
2126:
2121:
2120:
2097:
2092:
2079:
2068:
2067:
2046:
2031:
2026:
1995:
1994:
1973:
1968:
1967:
1946:
1941:
1940:
1936:
1879:
1815:
1814:
1779:
1774:
1773:
1750:
1745:
1732:
1721:
1720:
1699:
1684:
1679:
1660:
1659:
1638:
1633:
1632:
1611:
1606:
1605:
1601:
1594:
1590:
1565:
1564:
1560:
1507:
1506:
1485:
1468:
1467:
1440:
1429:
1428:
1371:
1370:
1342:
1341:
1320:
1315:
1314:
1310:
1267:
1266:
1245:
1228:
1227:
1200:
1189:
1188:
1184:
1138:
1137:
1105:
1104:
1023:
1022:
967:
952:
924:
923:
904:
903:
835:
834:
803:
802:
798:
732:
731:
688:
687:
659:
658:
630:
629:
625:
597:
596:
592:
560:
559:
555:
527:
526:
497:
496:
471:
470:
467:
436:
435:
416:
415:
396:
395:
376:
375:
350:
349:
330:
329:
310:
309:
296:and step size,
286:
261:
243:
239:
229:
219:
215:
211:
210:, in which the
207:
203:
196:
192:
174:
165:
134:
128:
103:siege of Yodfat
91:
28:
23:
22:
15:
12:
11:
5:
6048:
6046:
6038:
6037:
6032:
6027:
6022:
6017:
6007:
6006:
6003:
6002:
5997:
5986:
5967:
5955:
5954:External links
5952:
5950:
5949:
5936:
5917:
5902:
5863:
5856:
5827:
5807:(2): 235â240.
5792:
5782:(3): 262â270.
5771:
5751:(2): 168â173.
5745:Glasow Math. J
5736:
5724:(2): 303â318.
5709:
5692:
5686:
5655:
5653:
5650:
5648:
5647:
5627:
5616:
5590:(347): 47â52.
5579:
5563:Korean J. Math
5558:
5546:
5535:
5529:
5512:
5506:
5489:
5479:
5477:
5474:
5471:
5470:
5458:
5432:
5420:
5408:
5396:
5385:
5367:
5355:
5343:
5341:, p. 174.
5331:
5329:, p. 125.
5319:
5292:
5291:
5289:
5286:
5284:
5281:
5280:
5279:
5266:
5261:
5258:
5255:
5247:
5243:
5235:
5231:
5227:
5224:
5221:
5218:
5215:
5211:
5206:
5203:
5198:
5194:
5191:
5188:
5185:
5177:
5175:
5169:
5166:
5163:
5158:
5153:
5149:
5145:
5142:
5139:
5136:
5133:
5129:
5124:
5121:
5116:
5112:
5109:
5106:
5103:
5100:
5097:
5091:
5088:
5087:
5082:
5078:
5074:
5071:
5068:
5065:
5062:
5058:
5053:
5050:
5045:
5041:
5038:
5035:
5032:
5024:
5022:
5019:
5014:
5010:
5006:
5003:
5000:
4997:
4994:
4990:
4985:
4982:
4977:
4973:
4970:
4967:
4964:
4961:
4960:
4958:
4953:
4952:
4949:
4946:
4943:
4940:
4937:
4929:
4925:
4921:
4917:
4914:
4911:
4908:
4905:
4902:
4899:
4896:
4893:
4890:
4887:
4884:
4881:
4880:
4877:
4874:
4871:
4863:
4861:
4858:
4857:
4855:
4850:
4847:
4844:
4841:
4838:
4835:
4832:
4806:
4803:
4800:
4797:
4793:
4789:
4786:
4783:
4755:
4752:
4749:
4746:
4743:
4740:
4737:
4717:
4697:
4677:
4674:
4671:
4668:
4642:
4639:
4636:
4616:
4605:
4604:
4593:
4590:
4587:
4584:
4581:
4578:
4575:
4572:
4564:
4559:
4555:
4551:
4548:
4545:
4542:
4539:
4536:
4533:
4530:
4527:
4524:
4521:
4518:
4515:
4512:
4509:
4506:
4503:
4500:
4497:
4483:
4482:
4471:
4467:
4464:
4461:
4458:
4455:
4452:
4449:
4446:
4438:
4435:
4432:
4429:
4424:
4420:
4416:
4413:
4410:
4407:
4404:
4401:
4398:
4395:
4392:
4389:
4386:
4383:
4380:
4377:
4374:
4371:
4368:
4365:
4362:
4359:
4356:
4353:
4330:
4327:
4324:
4319:
4315:
4311:
4308:
4288:
4268:
4265:
4262:
4259:
4256:
4253:
4250:
4247:
4227:
4224:
4221:
4216:
4212:
4208:
4205:
4185:
4182:
4179:
4159:
4139:
4136:
4133:
4130:
4127:
4124:
4100:
4097:
4094:
4089:
4085:
4081:
4078:
4075:
4072:
4069:
4066:
4046:
4031:
4028:
4027:
4026:
4021:
4016:
4011:
4006:
4001:
3996:
3991:
3974:
3973:
3962:
3959:
3956:
3953:
3950:
3947:
3944:
3941:
3938:
3935:
3932:
3929:
3926:
3923:
3920:
3910:
3898:
3895:
3892:
3889:
3886:
3883:
3880:
3877:
3874:
3869:
3865:
3861:
3857:
3853:
3850:
3847:
3844:
3841:
3838:
3835:
3825:
3814:
3811:
3808:
3799:and therefore
3788:
3785:
3782:
3777:
3773:
3769:
3765:
3761:
3758:
3755:
3752:
3749:
3746:
3743:
3740:
3737:
3730:
3726:
3721:
3717:
3713:
3709:
3706:
3703:
3700:
3697:
3694:
3691:
3681:
3670:
3667:
3664:
3661:
3658:
3655:
3652:
3649:
3646:
3643:
3639:
3635:
3632:
3627:
3623:
3619:
3615:
3611:
3608:
3605:
3602:
3597:
3593:
3569:
3566:
3563:
3560:
3557:
3554:
3551:
3528:
3525:
3522:
3511:
3510:
3499:
3496:
3476:
3473:
3470:
3467:
3464:
3459:
3455:
3451:
3447:
3443:
3440:
3437:
3434:
3431:
3428:
3425:
3422:
3419:
3416:
3413:
3410:
3407:
3404:
3401:
3398:
3375:
3372:
3367:
3363:
3342:
3339:
3335:
3331:
3328:
3323:
3319:
3315:
3311:
3307:
3304:
3301:
3298:
3293:
3289:
3268:
3265:
3262:
3257:
3253:
3249:
3245:
3241:
3238:
3235:
3232:
3229:
3226:
3223:
3208:
3207:
3196:
3193:
3190:
3167:
3164:
3161:
3141:
3135:
3018:
3014:
2997:
2994:
2892:
2888:
2873:
2870:
2867:
2839:
2835:
2809:
2805:
2801:
2798:
2795:
2792:
2772:
2769:
2764:
2760:
2756:
2753:
2733:
2730:
2727:
2724:
2721:
2718:
2715:
2712:
2709:
2679:
2676:
2673:
2670:
2650:
2647:
2642:
2638:
2613:
2608:
2604:
2600:
2595:
2591:
2585:
2581:
2575:
2571:
2567:
2564:
2561:
2558:
2555:
2533:
2529:
2525:
2520:
2516:
2510:
2506:
2500:
2496:
2492:
2489:
2486:
2458:
2455:
2452:
2449:
2430:
2429:
2418:
2415:
2412:
2407:
2404:
2401:
2398:
2395:
2390:
2386:
2382:
2378:
2374:
2371:
2368:
2365:
2362:
2359:
2356:
2353:
2350:
2327:
2324:
2321:
2318:
2292:
2289:
2286:
2283:
2280:
2277:
2274:
2271:
2268:
2265:
2262:
2257:
2253:
2249:
2246:
2243:
2240:
2237:
2234:
2231:
2228:
2225:
2221:
2217:
2214:
2211:
2208:
2205:
2202:
2199:
2196:
2193:
2190:
2187:
2184:
2181:
2161:
2157:
2153:
2150:
2147:
2144:
2141:
2138:
2133:
2129:
2104:
2100:
2095:
2091:
2086:
2082:
2078:
2075:
2053:
2049:
2045:
2038:
2034:
2029:
2025:
2022:
2018:
2014:
2011:
2008:
2005:
2002:
1980:
1976:
1953:
1949:
1921:
1918:
1915:
1912:
1909:
1906:
1903:
1900:
1897:
1894:
1891:
1886:
1882:
1878:
1875:
1872:
1869:
1866:
1863:
1860:
1857:
1854:
1850:
1846:
1843:
1840:
1837:
1834:
1831:
1828:
1825:
1822:
1802:
1798:
1794:
1791:
1786:
1782:
1757:
1753:
1748:
1744:
1739:
1735:
1731:
1728:
1706:
1702:
1698:
1691:
1687:
1682:
1678:
1675:
1671:
1667:
1645:
1641:
1618:
1614:
1578:
1575:
1572:
1538:
1535:
1532:
1529:
1526:
1523:
1520:
1517:
1514:
1492:
1488:
1484:
1481:
1478:
1475:
1455:
1452:
1447:
1443:
1439:
1436:
1402:
1399:
1396:
1393:
1390:
1387:
1384:
1381:
1378:
1358:
1355:
1352:
1349:
1327:
1323:
1298:
1295:
1292:
1289:
1286:
1283:
1280:
1277:
1274:
1252:
1248:
1244:
1241:
1238:
1235:
1215:
1212:
1207:
1203:
1199:
1196:
1160:
1157:
1154:
1151:
1148:
1145:
1121:
1118:
1115:
1112:
1099:
1098:
1095:
1092:
1089:
1086:
1083:
1080:
1077:
1074:
1071:
1068:
1065:
1062:
1059:
1056:
1053:
1050:
1039:
1036:
1033:
1030:
1019:
1018:
1015:
1012:
1009:
1006:
1003:
1000:
997:
994:
991:
988:
985:
982:
979:
976:
973:
970:
940:
937:
934:
931:
911:
900:
899:
888:
884:
881:
878:
875:
872:
869:
866:
863:
860:
857:
854:
851:
848:
845:
842:
819:
816:
813:
810:
791:
790:
779:
775:
772:
769:
766:
763:
760:
757:
754:
751:
748:
745:
742:
739:
713:
710:
707:
704:
701:
698:
695:
675:
672:
669:
666:
646:
643:
640:
637:
613:
610:
607:
604:
573:
570:
567:
543:
540:
537:
534:
510:
507:
504:
484:
481:
478:
466:
460:
443:
423:
403:
383:
363:
360:
357:
337:
317:
285:
282:
173:
170:
126:
112:The Jewish War
107:Roman soldiers
90:
87:
26:
24:
14:
13:
10:
9:
6:
4:
3:
2:
6047:
6036:
6033:
6031:
6028:
6026:
6023:
6021:
6018:
6016:
6015:Combinatorics
6013:
6012:
6010:
6001:
5998:
5996:
5992:
5987:
5982:
5981:
5976:
5973:
5968:
5965:
5961:
5958:
5957:
5953:
5947:(4): 207â218.
5946:
5942:
5937:
5932:
5927:
5923:
5918:
5913:
5908:
5903:
5899:
5895:
5891:
5887:
5882:
5877:
5873:
5869:
5864:
5859:
5853:
5849:
5845:
5841:
5837:
5833:
5828:
5824:
5820:
5815:
5810:
5806:
5802:
5798:
5793:
5789:
5785:
5781:
5777:
5772:
5768:
5764:
5759:
5754:
5750:
5746:
5742:
5737:
5732:
5727:
5723:
5719:
5715:
5710:
5706:
5702:
5698:
5693:
5689:
5687:0-262-03293-7
5683:
5679:
5678:
5673:
5669:
5665:
5661:
5657:
5656:
5651:
5644:
5640:
5633:
5628:
5624:
5623:
5617:
5613:
5609:
5605:
5601:
5597:
5593:
5589:
5585:
5580:
5576:
5572:
5568:
5564:
5559:
5555:
5551:
5550:Newman, J. R.
5547:
5543:
5542:
5536:
5532:
5530:9780060428037
5526:
5521:
5520:
5513:
5509:
5503:
5499:
5495:
5490:
5486:
5481:
5480:
5475:
5467:
5462:
5459:
5446:
5442:
5436:
5433:
5429:
5428:Robinson 1960
5424:
5421:
5417:
5412:
5409:
5406:, p. 19.
5405:
5400:
5397:
5394:
5389:
5386:
5382:
5381:
5374:
5372:
5368:
5364:
5359:
5356:
5352:
5347:
5344:
5340:
5335:
5332:
5328:
5323:
5320:
5308:
5304:
5297:
5294:
5287:
5282:
5259:
5256:
5253:
5241:
5233:
5225:
5222:
5216:
5213:
5209:
5204:
5201:
5196:
5192:
5189:
5183:
5167:
5164:
5161:
5151:
5143:
5140:
5134:
5131:
5127:
5122:
5119:
5114:
5110:
5107:
5101:
5095:
5080:
5072:
5069:
5063:
5060:
5056:
5051:
5048:
5043:
5039:
5036:
5030:
5020:
5017:
5012:
5004:
5001:
4995:
4992:
4988:
4983:
4980:
4975:
4971:
4968:
4962:
4956:
4947:
4944:
4941:
4938:
4935:
4923:
4912:
4909:
4903:
4900:
4897:
4894:
4891:
4885:
4875:
4872:
4869:
4859:
4853:
4848:
4842:
4839:
4836:
4830:
4823:
4822:
4821:
4818:
4801:
4795:
4791:
4787:
4773:
4769:
4750:
4747:
4744:
4741:
4735:
4715:
4695:
4672:
4666:
4659:
4654:
4640:
4637:
4634:
4614:
4591:
4588:
4582:
4579:
4576:
4570:
4562:
4557:
4546:
4543:
4537:
4534:
4531:
4528:
4525:
4519:
4513:
4507:
4504:
4501:
4495:
4488:
4487:
4486:
4469:
4465:
4462:
4456:
4453:
4450:
4444:
4436:
4433:
4430:
4422:
4411:
4408:
4405:
4402:
4396:
4393:
4390:
4387:
4384:
4378:
4369:
4363:
4360:
4357:
4351:
4344:
4343:
4342:
4328:
4325:
4317:
4309:
4286:
4263:
4260:
4257:
4254:
4251:
4245:
4225:
4222:
4214:
4206:
4183:
4180:
4177:
4157:
4134:
4131:
4128:
4122:
4098:
4095:
4087:
4076:
4073:
4070:
4044:
4036:
4029:
4022:
4017:
4014:4, 16, 31, 35
4012:
4007:
4002:
3997:
3992:
3987:
3986:
3985:
3960:
3957:
3954:
3951:
3945:
3942:
3939:
3933:
3930:
3924:
3918:
3911:
3896:
3893:
3887:
3881:
3878:
3875:
3867:
3859:
3855:
3851:
3845:
3842:
3836:
3833:
3826:
3812:
3809:
3806:
3786:
3783:
3775:
3767:
3763:
3759:
3753:
3750:
3744:
3741:
3738:
3724:
3715:
3711:
3707:
3701:
3698:
3692:
3689:
3682:
3668:
3665:
3659:
3653:
3650:
3647:
3641:
3637:
3633:
3630:
3625:
3621:
3617:
3613:
3606:
3603:
3600:
3591:
3583:
3582:
3581:
3567:
3564:
3561:
3558:
3555:
3552:
3549:
3540:
3526:
3523:
3520:
3494:
3474:
3468:
3457:
3449:
3445:
3441:
3435:
3432:
3426:
3423:
3420:
3417:
3411:
3408:
3402:
3396:
3389:
3388:
3387:
3373:
3370:
3361:
3337:
3333:
3329:
3326:
3321:
3317:
3313:
3309:
3302:
3299:
3296:
3287:
3266:
3263:
3255:
3247:
3243:
3239:
3233:
3230:
3224:
3221:
3194:
3191:
3188:
3181:
3180:
3179:
3165:
3162:
3159:
3152:for the case
3151:
3148:discovered a
3147:
3139:
3136:
3068:highestOneBit
3013:
3011:
3003:
2995:
2957:highestOneBit
2887:
2871:
2868:
2865:
2837:
2833:
2823:
2807:
2803:
2799:
2796:
2793:
2790:
2770:
2767:
2762:
2758:
2754:
2751:
2731:
2728:
2725:
2722:
2719:
2713:
2707:
2695:
2691:
2674:
2668:
2648:
2645:
2640:
2636:
2611:
2606:
2602:
2598:
2593:
2589:
2583:
2579:
2573:
2569:
2565:
2559:
2553:
2531:
2527:
2523:
2518:
2514:
2508:
2504:
2498:
2494:
2490:
2487:
2484:
2453:
2447:
2435:
2416:
2413:
2399:
2393:
2388:
2384:
2376:
2372:
2369:
2363:
2360:
2354:
2348:
2341:
2340:
2339:
2322:
2316:
2304:
2290:
2287:
2284:
2281:
2278:
2275:
2272:
2266:
2263:
2255:
2251:
2247:
2238:
2235:
2232:
2229:
2223:
2219:
2212:
2209:
2206:
2197:
2194:
2191:
2185:
2179:
2159:
2155:
2148:
2145:
2142:
2136:
2131:
2127:
2102:
2098:
2093:
2089:
2084:
2080:
2076:
2073:
2051:
2047:
2043:
2036:
2032:
2027:
2023:
2020:
2016:
2009:
2006:
2003:
1978:
1974:
1951:
1947:
1933:
1919:
1916:
1913:
1910:
1907:
1904:
1901:
1895:
1892:
1884:
1880:
1876:
1867:
1864:
1861:
1858:
1852:
1848:
1844:
1838:
1835:
1832:
1826:
1820:
1800:
1796:
1792:
1789:
1784:
1780:
1755:
1751:
1746:
1742:
1737:
1733:
1729:
1726:
1704:
1700:
1696:
1689:
1685:
1680:
1676:
1673:
1669:
1665:
1643:
1639:
1616:
1612:
1598:
1576:
1573:
1570:
1558:
1554:
1550:
1536:
1533:
1530:
1527:
1524:
1518:
1512:
1490:
1486:
1482:
1479:
1476:
1473:
1453:
1450:
1445:
1441:
1437:
1434:
1426:
1422:
1420:
1416:
1400:
1397:
1394:
1391:
1388:
1382:
1376:
1356:
1353:
1350:
1347:
1325:
1321:
1296:
1293:
1290:
1287:
1284:
1278:
1272:
1250:
1246:
1242:
1239:
1236:
1233:
1213:
1210:
1205:
1201:
1197:
1194:
1182:
1178:
1174:
1158:
1155:
1149:
1143:
1135:
1116:
1110:
1096:
1093:
1090:
1087:
1084:
1081:
1078:
1075:
1072:
1069:
1066:
1063:
1060:
1057:
1054:
1051:
1034:
1028:
1021:
1020:
1016:
1013:
1010:
1007:
1004:
1001:
998:
995:
992:
989:
986:
983:
980:
977:
974:
971:
966:
965:
962:
959:
955:
935:
929:
909:
886:
882:
879:
873:
867:
864:
861:
855:
852:
849:
846:
840:
833:
832:
831:
817:
814:
811:
808:
796:
777:
773:
770:
764:
758:
755:
752:
746:
743:
737:
730:
729:
728:
727:
711:
708:
702:
696:
693:
670:
664:
644:
641:
638:
635:
611:
608:
605:
602:
589:
587:
571:
568:
565:
538:
532:
524:
508:
505:
502:
482:
479:
476:
464:
461:
459:
457:
441:
421:
401:
381:
361:
358:
355:
335:
315:
303:
302:the SVG file,
299:
295:
290:
283:
281:
277:
273:
269:
265:
258:
254:
250:
246:
236:
232:
226:
222:
200:
190:
186:
178:
171:
169:
161:
159:
158:
153:
149:
145:
140:
131:
130:Josephus n.d.
125:
120:
118:
114:
113:
108:
104:
100:
96:
88:
86:
83:
80:
70:
66:
64:
60:
56:
52:
48:
44:
36:
32:
19:
6035:Permutations
5978:
5964:cut-the-knot
5944:
5940:
5921:
5871:
5867:
5831:
5804:
5800:
5779:
5775:
5748:
5744:
5721:
5717:
5704:
5700:
5675:
5642:
5638:
5621:
5587:
5583:
5566:
5562:
5553:
5540:
5518:
5497:
5494:Knuth, D. E.
5487:(in French).
5484:
5461:
5449:. Retrieved
5444:
5435:
5423:
5411:
5399:
5388:
5378:
5358:
5346:
5334:
5322:
5310:. Retrieved
5306:
5296:
4819:
4771:
4767:
4658:running time
4655:
4606:
4484:
4033:
3975:
3541:
3512:
3209:
3143:
3137:
2999:
2824:
2693:
2692:
2431:
2305:
2119:. Note that
1934:
1772:. Note that
1599:
1552:
1551:
1424:
1423:
1417:is given by
1180:
1172:
1102:
901:
792:
590:
558:people (and
468:
462:
307:
297:
293:
275:
271:
267:
263:
256:
252:
248:
244:
234:
230:
224:
220:
201:
187:
183:
168:= 3 below).
162:
155:
151:
136:
122:
110:
92:
84:
76:
54:
50:
40:
5922:Util. Math.
5416:Newman 1988
5363:Zabell 1976
5339:Bachet 1612
3150:closed-form
2473:itself. If
1559:is used on
1413:. Below, a
523:recursively
47:mathematics
6009:Categories
5912:1803.11340
5707:: 125â130.
5569:(1): 1â7.
5451:January 7,
5283:References
4774:-th, ...,
4708:and large
1993:such that
1658:such that
1177:power of 2
1134:increasing
726:recurrence
5980:MathWorld
5926:CiteSeerX
5876:CiteSeerX
5874:: 20â34.
5823:123160551
5767:122980022
5612:125735054
5584:Math. Gaz
5288:Citations
5257:≤
5223:≥
5193:−
5174:⌋
5165:−
5141:−
5111:−
5090:⌊
5040:−
5002:−
4972:−
4895:−
4799:⌋
4785:⌊
4748:
4653:instead.
4638:−
4529:−
4409:−
4388:−
4255:−
4181:−
4074:−
3943:−
3882:
3876:≈
3846:⋅
3837:
3754:⋅
3745:
3739:≈
3729:′
3702:⋅
3699:α
3693:
3654:
3648:≈
3631:
3607:
3601:≈
3596:′
3524:≥
3436:⋅
3433:α
3427:
3421:−
3371:−
3366:′
3338:α
3327:
3303:
3292:′
3264:≤
3234:⋅
3231:α
3225:
3195:0.8111...
3192:≈
3189:α
2794:≤
2744:, where
2599:…
2524:…
2406:⌋
2394:
2381:⌊
2373:−
2210:−
2146:−
2077:≤
2007:−
1902:−
1859:−
1730:≤
1477:≤
1419:induction
1237:≤
771:−
709:−
609:−
506:≠
456:inclusive
359:−
6025:Josephus
5776:J. Algor
5645:: 48â51.
5552:(1988).
5312:July 26,
5250:if
5210:⌋
5197:⌊
5180:if
5128:⌋
5115:⌊
5057:⌋
5044:⌊
5027:if
4989:⌋
4976:⌊
4932:if
4866:if
4111:, where
3980:through
3513:for all
3095:<<
2978:valueOfL
2939:valueOfL
2436:of size
1597:is odd.
1425:Theorem:
284:Solution
127:â
5995:YouTube
5898:2273820
5862:FUN2010
5836:Bibcode
5604:3608532
5476:Sources
5307:FĆrmulĂŠ
3062:Integer
3010:integer
2996:Bitwise
2951:Integer
2884:
2858:
1505:, then
1265:, then
958:A006257
956::
628:). Let
154:of the
89:History
5928:
5896:
5878:
5854:
5821:
5765:
5684:
5610:
5602:
5527:
5504:
5445:GitHub
4770:-th, 2
4019:16, 31
3843:0.8111
3751:0.8111
3642:0.8111
3056:return
3032:public
2969:return
2909:public
1553:Proof:
1132:is an
525:. Let
238:. If
99:Jewish
79:circle
73:black.
49:, the
5907:arXiv
5894:S2CID
5819:S2CID
5763:S2CID
5635:(PDF)
5608:S2CID
5600:JSTOR
3888:31.18
3879:round
3834:round
3742:round
3690:round
3651:round
3604:round
3424:round
3300:round
3222:round
3086:&
1415:proof
1175:is a
300:. In
270:) â (
251:>
5852:ISBN
5682:ISBN
5525:ISBN
5502:ISBN
5453:2018
5314:2021
5070:<
4945:<
4939:<
3660:9.68
2800:<
2783:and
2090:<
2066:and
1966:and
1743:<
1719:and
1631:and
1555:The
1483:<
1466:and
1243:<
1226:and
1183:and
954:OEIS
922:and
586:even
146:and
97:, a
53:(or
45:and
5993:on
5886:doi
5844:doi
5809:doi
5784:doi
5753:doi
5726:doi
5592:doi
5571:doi
5230:mod
5148:mod
5077:mod
5009:mod
4920:mod
4745:log
4627:to
4554:mod
4419:mod
4314:mod
4211:mod
4084:mod
3614:log
3353:or
3310:log
3140:= 3
3044:int
3035:int
3020:/**
2936:int
2921:int
2912:int
2894:/**
2696:If
2628:as
2385:log
1935:If
1600:If
1427:If
1017:16
795:odd
465:= 2
414:to
119:):
41:In
6011::
5977:.
5945:33
5943:.
5892:.
5884:.
5872:50
5870:.
5850:.
5842:.
5817:.
5805:33
5803:.
5799:.
5778:.
5761:.
5749:14
5747:.
5743:.
5720:.
5716:.
5703:.
5699:.
5670:;
5666:;
5662:;
5643:14
5641:.
5637:.
5606:.
5598:.
5588:44
5586:.
5567:26
5565:.
5443:.
5370:^
5305:.
4024:31
3984::
3982:41
3961:31
3946:31
3940:41
3897:31
3787:47
3776:10
3669:10
3634:41
3556:41
3539:.
3110:);
3089:((
3029:*/
3012:.
2966:);
2906:*/
2872:41
2822:.
2690:.
2440::
2338::
2172:.
1813:.
1549:.
1421:.
1097:1
1094:15
1091:13
1088:11
1014:15
1011:14
1008:13
1005:12
1002:11
999:10
458:.
280:.
274:+
268:mx
266:+
255:+
249:mx
247:+
233:+
225:mx
223:+
160:.
65:.
5983:.
5934:.
5915:.
5909::
5900:.
5888::
5860:.
5846::
5838::
5825:.
5811::
5790:.
5786::
5780:4
5769:.
5755::
5734:.
5728::
5722:9
5705:6
5690:.
5614:.
5594::
5577:.
5573::
5533:.
5510:.
5455:.
5316:.
5260:n
5254:k
5242:}
5234:k
5226:n
5220:)
5217:k
5214:,
5205:k
5202:n
5190:n
5187:(
5184:g
5168:1
5162:k
5157:)
5152:k
5144:n
5138:)
5135:k
5132:,
5123:k
5120:n
5108:n
5105:(
5102:g
5099:(
5096:k
5081:k
5073:n
5067:)
5064:k
5061:,
5052:k
5049:n
5037:n
5034:(
5031:g
5021:n
5018:+
5013:k
5005:n
4999:)
4996:k
4993:,
4984:k
4981:n
4969:n
4966:(
4963:g
4957:{
4948:k
4942:n
4936:1
4924:n
4916:)
4913:k
4910:+
4907:)
4904:k
4901:,
4898:1
4892:n
4889:(
4886:g
4883:(
4876:1
4873:=
4870:n
4860:0
4854:{
4849:=
4846:)
4843:k
4840:,
4837:n
4834:(
4831:g
4805:)
4802:k
4796:k
4792:/
4788:n
4782:(
4772:k
4768:k
4754:)
4751:n
4742:k
4739:(
4736:O
4716:n
4696:k
4676:)
4673:n
4670:(
4667:O
4641:1
4635:n
4615:0
4592:0
4589:=
4586:)
4583:k
4580:,
4577:1
4574:(
4571:g
4563:,
4558:n
4550:)
4547:k
4544:+
4541:)
4538:k
4535:,
4532:1
4526:n
4523:(
4520:g
4517:(
4514:=
4511:)
4508:k
4505:,
4502:n
4499:(
4496:g
4470:,
4466:1
4463:=
4460:)
4457:k
4454:,
4451:1
4448:(
4445:f
4437:,
4434:1
4431:+
4428:)
4423:n
4415:)
4412:1
4406:k
4403:+
4400:)
4397:k
4394:,
4391:1
4385:n
4382:(
4379:f
4376:(
4373:(
4370:=
4367:)
4364:k
4361:,
4358:n
4355:(
4352:f
4329:1
4326:+
4323:)
4318:n
4310:k
4307:(
4287:1
4267:)
4264:k
4261:,
4258:1
4252:n
4249:(
4246:f
4226:1
4223:+
4220:)
4215:n
4207:k
4204:(
4184:1
4178:n
4158:k
4138:)
4135:k
4132:,
4129:n
4126:(
4123:f
4113:n
4099:1
4096:+
4093:)
4088:n
4080:)
4077:1
4071:s
4068:(
4065:(
4045:s
3978:1
3958:=
3955:1
3952:+
3949:)
3937:(
3934:3
3931:=
3928:)
3925:n
3922:(
3919:f
3894:=
3891:)
3885:(
3873:)
3868:9
3864:)
3860:2
3856:/
3852:3
3849:(
3840:(
3813:9
3810:=
3807:m
3784:=
3781:)
3772:)
3768:2
3764:/
3760:3
3757:(
3748:(
3736:)
3725:m
3720:)
3716:2
3712:/
3708:3
3705:(
3696:(
3666:=
3663:)
3657:(
3645:)
3638:/
3626:2
3622:/
3618:3
3610:(
3592:m
3568:3
3565:=
3562:k
3559:,
3553:=
3550:n
3527:5
3521:n
3498:)
3495:1
3475:2
3472:(
3469:+
3466:)
3463:)
3458:m
3454:)
3450:2
3446:/
3442:3
3439:(
3430:(
3418:n
3415:(
3412:3
3409:=
3406:)
3403:n
3400:(
3397:f
3374:1
3362:m
3341:)
3334:/
3330:n
3322:2
3318:/
3314:3
3306:(
3297:=
3288:m
3267:n
3261:)
3256:m
3252:)
3248:2
3244:/
3240:3
3237:(
3228:(
3212:m
3166:3
3163:=
3160:k
3138:k
3131:}
3107:1
3104:|
3101:)
3098:1
3092:n
3083:)
3080:2
3077:*
3074:n
3071:(
3065:.
3059:~
3053:{
3050:)
3047:n
3041:(
3006:n
2990:}
2987:;
2984:1
2981:+
2975:*
2972:2
2963:n
2960:(
2954:.
2948:-
2945:n
2942:=
2930:{
2927:)
2924:n
2918:(
2869:=
2866:n
2854:l
2838:m
2834:2
2808:m
2804:2
2797:l
2791:0
2771:l
2768:+
2763:m
2759:2
2755:=
2752:n
2732:1
2729:+
2726:l
2723:2
2720:=
2717:)
2714:n
2711:(
2708:f
2698:n
2678:)
2675:n
2672:(
2669:f
2649:l
2646:+
2641:m
2637:2
2626:n
2612:1
2607:m
2603:b
2594:3
2590:b
2584:2
2580:b
2574:1
2570:b
2566:=
2563:)
2560:n
2557:(
2554:f
2532:m
2528:b
2519:3
2515:b
2509:2
2505:b
2499:1
2495:b
2491:1
2488:=
2485:n
2475:n
2471:n
2457:)
2454:n
2451:(
2448:f
2438:n
2417:1
2414:+
2411:)
2403:)
2400:n
2397:(
2389:2
2377:2
2370:n
2367:(
2364:2
2361:=
2358:)
2355:n
2352:(
2349:f
2326:)
2323:n
2320:(
2317:f
2307:l
2291:1
2288:+
2285:l
2282:2
2279:=
2276:1
2273:+
2270:)
2267:1
2264:+
2261:)
2256:1
2252:l
2248:2
2245:(
2242:(
2239:2
2236:=
2233:1
2230:+
2227:)
2224:2
2220:/
2216:)
2213:1
2207:n
2204:(
2201:(
2198:f
2195:2
2192:=
2189:)
2186:n
2183:(
2180:f
2160:2
2156:/
2152:)
2149:1
2143:l
2140:(
2137:=
2132:1
2128:l
2103:1
2099:m
2094:2
2085:1
2081:l
2074:0
2052:1
2048:l
2044:+
2037:1
2033:m
2028:2
2024:=
2021:2
2017:/
2013:)
2010:1
2004:n
2001:(
1979:1
1975:m
1952:1
1948:l
1937:n
1920:1
1917:+
1914:l
1911:2
1908:=
1905:1
1899:)
1896:1
1893:+
1890:)
1885:1
1881:l
1877:2
1874:(
1871:(
1868:2
1865:=
1862:1
1856:)
1853:2
1849:/
1845:n
1842:(
1839:f
1836:2
1833:=
1830:)
1827:n
1824:(
1821:f
1801:2
1797:/
1793:l
1790:=
1785:1
1781:l
1756:1
1752:m
1747:2
1738:1
1734:l
1727:0
1705:1
1701:l
1697:+
1690:1
1686:m
1681:2
1677:=
1674:2
1670:/
1666:n
1644:1
1640:m
1617:1
1613:l
1602:n
1595:n
1591:n
1577:1
1574:=
1571:n
1561:n
1537:1
1534:+
1531:l
1528:2
1525:=
1522:)
1519:n
1516:(
1513:f
1491:m
1487:2
1480:l
1474:0
1454:l
1451:+
1446:m
1442:2
1438:=
1435:n
1401:1
1398:+
1395:l
1392:2
1389:=
1386:)
1383:n
1380:(
1377:f
1357:1
1354:+
1351:l
1348:2
1326:m
1322:2
1311:l
1297:1
1294:+
1291:l
1288:2
1285:=
1282:)
1279:n
1276:(
1273:f
1251:m
1247:2
1240:l
1234:0
1214:l
1211:+
1206:m
1202:2
1198:=
1195:n
1185:l
1181:m
1173:n
1159:1
1156:=
1153:)
1150:n
1147:(
1144:f
1120:)
1117:n
1114:(
1111:f
1085:9
1082:7
1079:5
1076:3
1073:1
1070:7
1067:5
1064:3
1061:1
1058:3
1055:1
1052:1
1038:)
1035:n
1032:(
1029:f
996:9
993:8
990:7
987:6
984:5
981:4
978:3
975:2
972:1
968:n
939:)
936:n
933:(
930:f
910:n
887:.
883:1
880:+
877:)
874:j
871:(
868:f
865:2
862:=
859:)
856:1
853:+
850:j
847:2
844:(
841:f
818:1
815:+
812:x
809:2
799:x
778:.
774:1
768:)
765:j
762:(
759:f
756:2
753:=
750:)
747:j
744:2
741:(
738:f
712:1
706:)
703:j
700:(
697:f
694:2
674:)
671:j
668:(
665:f
645:j
642:2
639:=
636:n
626:x
612:1
606:x
603:2
593:x
572:2
569:=
566:k
556:n
542:)
539:n
536:(
533:f
509:2
503:k
483:2
480:=
477:k
463:k
442:1
422:n
402:1
382:k
362:1
356:k
336:k
316:n
298:k
294:n
278:)
276:x
272:n
264:p
262:(
257:x
253:n
245:p
240:x
235:x
231:n
221:p
216:x
212:p
208:n
204:m
197:k
193:n
166:k
115:(
20:)
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.