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!)
A126209 Number of 7's in decimal expansion of 7^n. 6

%I #7 Sep 03 2015 19:07:49

%S 0,1,0,0,0,1,1,0,1,1,1,3,1,1,2,2,0,2,1,1,3,1,0,3,0,1,4,1,2,5,1,4,2,7,

%T 1,4,4,4,3,0,3,3,3,3,5,4,1,2,2,6,2,3,5,6,6,5,7,6,6,7,4,7,5,5,6,6,3,8,

%U 1,3,7,6,8,6,7,7,1,5,7,5,4,9,7,6,10,7,7,7,4,14,8,5,10,8,10,13,11,6,7,6,6

%N Number of 7's in decimal expansion of 7^n.

%p P:=proc(n) local i,k,x,y,w,cont; y:=7; 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);

%t DigitCount[7^Range[0,100],10,7] (* _Harvey P. Dale_, Sep 03 2015 *)

%Y Cf. A065710, A126205, A126206, A126207, A126208, A126210, A126211.

%K base,nonn

%O 0,12

%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Dec 20 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 24 19:31 EDT 2024. Contains 371962 sequences. (Running on oeis4.)