login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088235 Total number of digits (in base 10) in all preceding terms in the sequence. 4

%I #35 Jul 26 2022 10:09:11

%S 0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,

%T 42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,

%U 88,90,92,94,96,98,100,103,106,109,112,115,118,121,124,127,130,133

%N Total number of digits (in base 10) in all preceding terms in the sequence.

%H G. C. Greubel, <a href="/A088235/b088235.txt">Table of n, a(n) for n = 0..5000</a>

%F a(n+1) = a(n) + floor(Log(10, a(n))) + 1, with a(0) = 0, a(1) = 1.

%F a(n) = A064223(n), n>0. - _R. J. Mathar_, Sep 11 2008

%t a[n_]:= a[n]= If[n<2, n, a[n-1] +Floor[Log10[a[n-1]]] +1];

%t Table[a[n], {n,0,100}] (* _G. C. Greubel_, Dec 10 2015; Jul 24 2022 *)

%o (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

%o (SageMath)

%o @CachedFunction

%o def a(n): return n if (n<2) else a(n-1) + floor(log(a(n-1),10)) + 1 # a = A088235

%o [a(n) for n in (0..100)] # _G. C. Greubel_, Jul 24 2022

%o (Python)

%o from itertools import islice

%o def agen():

%o an = 0

%o while True: yield an; an += len(str(an))

%o print(list(islice(agen(), 67))) # _Michael S. Branicky_, Jul 26 2022

%Y Cf. A064223, A088236.

%K base,easy,nonn

%O 0,3

%A David Corbett (dcorbett42(AT)yahoo.co.nz), Sep 25 2003

%E More terms from _Alexandre Wajnberg_, Jan 02 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)