A094451 a(n) = A033485(n) modulo 3.
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
Crossrefs
Cf. A033485.
Programs
-
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
Comments