OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
FORMULA
a(n+1) = a(n) + floor(Log(10, a(n))) + 1, with a(0) = 0, a(1) = 1.
a(n) = A064223(n), n>0. - R. J. Mathar, Sep 11 2008
MATHEMATICA
a[n_]:= a[n]= If[n<2, n, a[n-1] +Floor[Log10[a[n-1]]] +1];
Table[a[n], {n, 0, 100}] (* G. C. Greubel, Dec 10 2015; Jul 24 2022 *)
PROG
(PARI) lista(nn) = {ns = 0; v = vector(nn); for (i=2, nn, ns += #Str(v[i-1]); v[i] = ns; ); v; } \\ Michel Marcus, Dec 05 2015
(SageMath)
@CachedFunction
def a(n): return n if (n<2) else a(n-1) + floor(log(a(n-1), 10)) + 1 # a = A088235
[a(n) for n in (0..100)] # G. C. Greubel, Jul 24 2022
(Python)
from itertools import islice
def agen():
an = 0
while True: yield an; an += len(str(an))
print(list(islice(agen(), 67))) # Michael S. Branicky, Jul 26 2022
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
David Corbett (dcorbett42(AT)yahoo.co.nz), Sep 25 2003
EXTENSIONS
More terms from Alexandre Wajnberg, Jan 02 2006
STATUS
approved