login
A215604
a(0)=0, a(n) = (n + a(floor(n/2))) mod 3.
0
0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 0, 2, 0, 1, 2, 1, 2, 2, 0, 2, 0, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 0, 2, 0, 1, 2, 1, 2, 2, 0, 2, 0, 1, 2, 1, 2, 2, 0, 2, 0, 1, 2, 1, 2, 2, 0, 2, 0, 2, 0, 2, 0, 0, 1, 0, 1, 2
OFFSET
0,6
PROG
(Python)
TOP = 1000
a = [0]*TOP
for n in range(1, TOP):
print a[n-1],
a[n] = (n + a[n//2]) % 3
CROSSREFS
Cf. A010060 ((n + a(floor(n/2))) mod 2).
Cf. A051065 ((n + a(floor(n/3))) mod 2).
Cf. A053838 ((n + a(floor(n/3))) mod 3).
Sequence in context: A131851 A345021 A104886 * A139351 A285677 A036578
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Aug 17 2012
STATUS
approved