OFFSET
1,1
COMMENTS
a(n) = 1 for n = 4, 22, 76, ... (the numbers 222...2211 in ternary)
We now know that a(n) is finite for all n.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
Eric Angelini, Michael S. Branicky, Giovanni Resta, N. J. A. Sloane, and David W. Wilson, The Comma Sequence: A Simple Sequence With Bizarre Properties, arXiv:2401.14346, Youtube
EXAMPLE
For a(1) = 17, see A367355, which has 17 terms.
PROG
(Python)
from itertools import islice
from sympy.ntheory.factor_ import digits
def a(n, b=3): # generator of terms
an, y, c = n, 1, 0
while y < b:
an, y, c = an + b*(an%b), 1, c+1
while y < b:
if str(digits(an+y, b)[1]) == str(y):
an += y
break
y += 1
return c
print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Nov 18 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Nov 18 2023
STATUS
approved