login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A125122
First differences of A034888.
2
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0
OFFSET
0,1
COMMENTS
This sequence is not periodic because log(3)/log(10) is an irrational number. - T. D. Noe, Jan 10 2007
FORMULA
a(n)=Number_of_digits{3^(n+1)}-Number_of digits{3^(n)} with n>=0.
EXAMPLE
a(1)=0 because 3^(1+1)=9 (one digit) 3^1=3 (one digit) and the difference is 0
a(4)=1 because 3^(4+1)=243 (three digits) 3^(4)=81 (two digits) and the difference is 1
MAPLE
P:=proc(n) local i, j, k, w, old; k:=3; for i from 1 by 1 to n do j:=k^i; w:=0; while j>0 do w:=w+1; j:=trunc(j/10); od; if i>1 then print(w-old); old:=w; else old:=w; fi; od; end: P(1000);
MATHEMATICA
Differences[IntegerLength[3^Range[0, 110]]] (* Harvey P. Dale, Jan 28 2015 *)
CROSSREFS
Sequence in context: A260393 A360113 A361123 * A101455 A000035 A188510
KEYWORD
easy,nonn,base
AUTHOR
STATUS
approved