login
A367623
Number of comma-children of n in base 3.
1
2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
OFFSET
1,1
LINKS
PROG
(Python)
from sympy.ntheory.factor_ import digits
def a(k, base=3):
m = k + base*(k%base)
return len([m+y for y in range(1, base) if digits(m+y, base)[1] == y])
print([a(n) for n in range(1, 96)]) # Michael S. Branicky, Dec 23 2023
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Dec 23 2023
STATUS
approved