|
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
MAPLE
|
b:= proc(n) option remember; iquo(3*b(n-1), 2) end: b(1):= 2:
a:= n-> irem(b(n), 2):
|
|
MATHEMATICA
|
|
|
PROG
|
(Python)
def a(n):
val = 2
for i in range(n):
val += val//2
return val%2
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|