OFFSET
0,2
COMMENTS
The number of segments in each digit 0 to 9 is [6,2,5,5,4,5,6,3,7,6].
Conjecture: Taking the least significant digit of each term is not an eventually periodic sequence.
LINKS
Dominic McCarty, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = a(n-1) + A006942(a(n-1)).
EXAMPLE
For n=1, the preceding a(0) = 0 is 6 segments so that a(1) = 0 + 6 = 6.
MATHEMATICA
s={0}; Do[AppendTo[s, Last[s]+ Plus @@ (IntegerDigits@ Last[s] /. {0 -> 6, 1 -> 2, 2 -> 5, 3 -> 5, 7 -> 3, 8 -> 7, 9 -> 6})], {n, 54}]; s (* James C. McMahon, Aug 19 2024 *)
PROG
(Python)
from itertools import islice
def b(n): return sum([6, 2, 5, 5, 4, 5, 6, 3, 7, 6][int(d)] for d in str(n))
def agen(): # generator of terms
yield (an:=0)
while True: yield (an:=an+b(an))
print(list(islice(agen(), 55))) # Michael S. Branicky, Jul 28 2024
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
David J. Ellis, Jul 23 2024
STATUS
approved