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!)
A126205 Number of 3's in decimal expansion of 3^n, with n>=0. 6
0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 0, 1, 1, 1, 1, 0, 1, 3, 2, 1, 1, 1, 1, 0, 0, 4, 1, 3, 1, 1, 0, 1, 1, 3, 1, 1, 0, 3, 2, 3, 2, 4, 1, 2, 3, 4, 0, 4, 2, 3, 3, 0, 7, 2, 2, 4, 4, 3, 2, 3, 4, 5, 6, 2, 4, 8, 3, 1, 2, 6, 3, 4, 5, 4, 3, 2, 6, 5, 4, 8, 0, 4, 4, 7, 2, 4, 3, 6, 5, 8, 5, 3, 7, 3, 2, 4, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,14
LINKS
EXAMPLE
a(21)=3 because 3^21=10460353203 with three 3's.
MAPLE
P:=proc(n) local i, k, x, y, w, cont; y:=3; k:=y; for i from 0 by 1 to n do x:=y^i; cont:=0; while x>0 do w:=x-trunc(x/10)*10; if w=k then cont:=cont+1; fi; x:=trunc(x/10); od; print(cont); od; end: P(100);
MATHEMATICA
DigitCount[3^Range[0, 100], 10, 3] (* Harvey P. Dale, May 26 2015 *)
CROSSREFS
Sequence in context: A115381 A115382 A112202 * A025913 A123230 A078821
KEYWORD
nonn,base
AUTHOR
STATUS
approved

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 March 29 06:15 EDT 2024. Contains 371265 sequences. (Running on oeis4.)