%I #47 Jul 22 2020 05:23:59
%S 1,2,3,14,21,47,158,237,533,1199,4046,6069,13655,46085,103691,1181102,
%T 1771653,3986219,102162425,229865456,344798184,517197276,775795914,
%U 1163693871,3927466814,5891200221,13255200497,29824201118,44736301677,100656678773,226477527239,764361654431,2579720583704,3869580875556,5804371313334,8706556970001,19589753182502,29384629773753,66115416990944,99173125486416
%N Subsequence of A005428 where state = 2.
%C Excluding the initial 1, the values of n such that A054995(n) = 2. - _Ryan Brooks_, Jul 17 2020
%C From _Petros Hadjicostas_, Jul 20 2020: (Start)
%C From a(1) = 2 to a(22) = 775795914, the values appear in Table 18 (p. 374) in Schuh (1968) under the Survivor No. 2 column (in a variation of Josephus's counting off game where m people on a circle are labeled 1 through m and every third person drops out).
%C a(23) here is 1163693871 but 1063693871 in Schuh (1968). Burde (1987) agrees with Schuh (1968). See the table on p. 207 of the paper (with q = 1).
%C It seems Schuh (1968) made a calculation error and Burde (1987) copied it. See my comment for A073941 for more details. (End)
%D Fred Schuh, The Master Book of Mathematical Recreations, Dover, New York, 1968. [See Table 18, p. 374.]
%H David A. Corneth, <a href="/A081615/b081615.txt">Table of n, a(n) for n = 0..2862</a>
%H K. Burde, <a href="http://dx.doi.org/10.1016/0022-314X(87)90078-3">Das Problem der Abzählreime und Zahlentwicklungen mit gebrochenen Basen [The problem of counting rhymes and number expansions with fractional bases]</a>, J. Number Theory 26(2) (1987), 192-209. [The author deals with the representation of n in fractional bases k/(k-1) and its relation to counting-off games. Here k = 3. See the table on p. 207. See also the review in MathSciNet (MR0889384) by R. G. Stoneham.]
%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>
%o (PARI) /* In the program below, we use a truncated version of either A005428 or A073941 and choose those terms that correspond to "state" or "number of last survivor" equal to 2. See A073941 or Schuh (1968) for more details. */
%o first(n) = {my(res = vector(n), t = 1, wn = wo = gn = go = 2); res[1] = 1; for(i = 1, oo, c = wo % 2; if(go == 2, t++; res[t] = wo; if(t >= n, return(res))); wn = floor(wo*3/2) + c * (2 - go); gn = 3 * c + go * (-1)^c; wo = wn; go = gn; )} \\ _David A. Corneth_ and _Petros Hadjicostas_, Jul 21 2020
%Y Cf. A005428, A073941, A081614.
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_, Apr 23 2003
%E More terms from _Hans Havermann_, Apr 23 2003