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.

A126211 Number of 9's in decimal expansion of 9^n.

This page as a plain text file.
%I A126211 #5 Aug 24 2012 10:49:58
%S A126211 0,1,0,1,0,2,0,2,0,1,0,2,1,1,2,3,0,3,5,3,2,5,2,5,2,4,3,5,0,3,2,4,3,3,
%T A126211 2,4,4,5,3,2,3,6,2,3,4,5,2,6,2,3,1,8,6,6,5,3,7,7,2,5,8,8,6,5,5,8,10,6,
%U A126211 3,9,7,8,5,7,6,8,6,10,7,5,6,10,10,10,8,9,7,12,14,12,7,6,8,5,10,10,2,14,6,6
%N A126211 Number of 9's in decimal expansion of 9^n.
%p A126211 P:=proc(n) local i,k,x,y,w,cont; y:=9; 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);
%Y A126211 Cf. A065710, A126205, A126206, A126207, A126208, A126209, A126210.
%K A126211 base,nonn
%O A126211 0,6
%A A126211 _Paolo P. Lava_ and _Giorgio Balzarotti_, Dec 20 2006