OFFSET
1,1
COMMENTS
The game eliminates a(n) - 1 white and a(n) black stones; the a(n)-th white stone survives. The game is known under different names; e.g., "Sankt Peters Spiel" or "Ludus Sancti Petri" or "Josephus problem".
It gives sequences for every step length s from 2.
s=2: 2^n - 1;
s=3: 3, 5, 8, 30, 69, 104, 354, 798, 1797, 2696, 9102, 20481.
s=5: this sequence.
Apparently, this is Seki Takakazu's sequence of "limitative numbers" with m = 5. - Petros Hadjicostas, Jul 18 2020
LINKS
R. Baumann, Computer Knobelei, LOG IN, Heft Nr. 165, pp. 68-71, 2010 (in German).
Saburô Uchiyama, On the generalized Josephus problem, Tsukuba J. Math. 27(2) (2003), 319-339; see p. 337. [Has about 50 sequences related to Seki Takakazu's "limitative numbers"]
Saburô Uchiyama, On the generalized Josephus problem, Tsukuba J. Math. 27(2) (2003), 319-339 [jstor stable version]; see p. 337.
Wikipedia, Seki Takakazu.
EXAMPLE
The solution for a(3) = 11: (WBWBWBWBWWBBBWWWBBBWBW);
White stones: (5, 10, 15, 20, 3, 9, 16, 22, 7, 14, 1);
Black stones: (8, 18, 4, 17, 6, 21, 13, 12, 20, 2, 11).
MAPLE
s:=5: s1:=s-1: a:=1:
for p from 2 to 100000 by 2 do
b:=(a+s1) mod p +1:
if (b=1) then printf("%9d", p-1): end if:
a:=(b+s1) mod (p+1) +1:
if (a=1) then printf("%9d", p): end if:
end do:
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Weisenhorn, Feb 10 2012
STATUS
approved