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.

A126210 Number of 8's in decimal expansion of 8^n.

This page as a plain text file.
%I A126210 #7 Jan 28 2013 16:54:04
%S A126210 0,1,0,0,0,1,0,0,0,1,1,2,1,4,1,4,1,3,4,4,1,3,3,2,2,3,0,2,4,1,3,1,1,4,
%T A126210 3,3,3,4,5,3,4,4,5,4,4,3,5,7,4,10,5,3,7,7,4,8,3,6,7,4,10,6,5,3,5,10,8,
%U A126210 9,7,10,5,12,6,10,5,7,2,9,11,9,11,7,7,5,2,9,6,7,5,13,12,10,8,4,9,6,6,10,10
%N A126210 Number of 8's in decimal expansion of 8^n.
%p A126210 P:=proc(n) local i,k,x,y,w,cont; y:=8; 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 A126210 DigitCount[8^Range[0,100],10,8] (* _Harvey P. Dale_, Jan 28 2013 *)
%Y A126210 Cf. A065710, A126205, A126206, A126207, A126208, A126209, A126211.
%K A126210 base,nonn
%O A126210 0,12
%A A126210 _Paolo P. Lava_ and _Giorgio Balzarotti_, Dec 20 2006