cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A126209 Number of 7's in decimal expansion of 7^n.

This page as a plain text file.
%I A126209 #7 Sep 03 2015 19:07:49
%S A126209 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 A126209 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 A126209 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 A126209 Number of 7's in decimal expansion of 7^n.
%p A126209 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 A126209 DigitCount[7^Range[0,100],10,7] (* _Harvey P. Dale_, Sep 03 2015 *)
%Y A126209 Cf. A065710, A126205, A126206, A126207, A126208, A126210, A126211.
%K A126209 base,nonn
%O A126209 0,12
%A A126209 _Paolo P. Lava_ and _Giorgio Balzarotti_, Dec 20 2006