login
A031016
Write n in base 7, then complement each digit (d -> 6-d) and juxtapose.
10
5, 4, 3, 2, 1, 0, 5, 6, 5, 5, 5, 4, 5, 3, 5, 2, 5, 1, 5, 0, 4, 6, 4, 5, 4, 4, 4, 3, 4, 2, 4, 1, 4, 0, 3, 6, 3, 5, 3, 4, 3, 3, 3, 2, 3, 1, 3, 0, 2, 6, 2, 5, 2, 4, 2, 3, 2, 2, 2, 1, 2, 0, 1, 6, 1, 5, 1, 4, 1, 3, 1, 2, 1, 1, 1, 0, 0, 6, 0, 5, 0, 4, 0, 3, 0, 2, 0, 1, 0, 0
OFFSET
1,1
LINKS
MATHEMATICA
6-Flatten[ IntegerDigits[ Range@50, 7]] (* Robert G. Wilson v, Jul 01 2014 *)
PROG
(Python)
from sympy.ntheory import digits
from itertools import count, islice
def agen(): # generator of terms
for n in count(1): yield from [6-d for d in digits(n, 7)[1:]]
print(list(islice(agen(), 90))) # Michael S. Branicky, Nov 09 2025
KEYWORD
nonn,base
STATUS
approved