login
A094451
a(n) = A033485(n) modulo 3.
0
1, 2, 0, 2, 1, 1, 1, 0, 2, 0, 1, 2, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 1, 0, 0, 0, 1, 2, 1, 0, 2, 1, 0, 2, 0, 1, 1, 1, 1, 1, 1, 1, 2, 0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 1, 2, 2, 2, 1, 0, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 0, 1, 2
OFFSET
1,2
COMMENTS
Partials sums modulo 3 of the sequence : 1, a(1), a(1), a(2), a(2), a(3), a(3), a(4), a(4), a(5), ...
PROG
(Python)
from itertools import islice
from collections import deque
def A094451_gen(): # generator of terms
aqueue, f, b, a = deque([2]), True, 1, 2
yield from (1, 2)
while True:
a = (a+b) % 3
yield a
aqueue.append(a)
if f: b = aqueue.popleft()
f = not f
A094451_list = list(islice(A094451_gen(), 40)) # Chai Wah Wu, Jun 08 2022
CROSSREFS
Cf. A033485.
Sequence in context: A343606 A112553 A026610 * A056562 A280008 A135220
KEYWORD
easy,nonn
AUTHOR
Philippe Deléham, Jun 04 2004
STATUS
approved