login
A356556
Parity of A061418.
0
0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0
OFFSET
1
COMMENTS
Can be described as follows: starting from a single pair of animals, and assuming any pair of animals can produce one offspring per day (as in the game Minecraft), a(n) = 0 on days with an even number of animals and 1 on days with an odd number.
While this sequence is easily generated from A061418, the reverse is also true. If we let r = sum of a(n)(2/3)^n = 0.755459... then the n-th term of A061418 is given by ceiling((4-r)/3*(3/2)^n).
The sequence is related to K(3) from the Josephus problem (A083286) via sum r = 4 - 2*K(3).
LINKS
E. T. H. Wang and Phillip C. Washburn, Problem E2604, American Mathematical Monthly, 84 (1977), 821-822.
FORMULA
a(n) = A061418(n) mod 2.
MAPLE
b:= proc(n) option remember; iquo(3*b(n-1), 2) end: b(1):= 2:
a:= n-> irem(b(n), 2):
seq(a(n), n=1..200); # Alois P. Heinz, Sep 20 2022
MATHEMATICA
A061418[n_] := A061418[n] = If[n==1, 2, Quotient[3*A061418[n-1], 2]];
a[n_] := Mod[A061418[n], 2];
Table[a[n], {n, 1, 200}] (* Jean-François Alcover, Dec 26 2022 *)
PROG
(Python)
def a(n):
val = 2
for i in range(n):
val += val//2
return val%2
CROSSREFS
Cf. A061418.
Sequence in context: A038219 A330731 A138710 * A330037 A255817 A071674
KEYWORD
easy,nonn
AUTHOR
Jacob Fauman, Aug 12 2022
STATUS
approved