OFFSET
0,10
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
EXAMPLE
a(11)=3 because 4^11 = 4194304 with three 4's.
MAPLE
P:=proc(n) local i, k, x, y, w, cont; y:=4; 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);
# Alternative:
map(n -> numboccur(4, convert(4^n, base, 10)), [$0..100]); # Robert Israel, Jul 18 2018
MATHEMATICA
DigitCount[4^#, 10, 4]&/@Range[0, 150] (* Harvey P. Dale, Feb 01 2011 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Dec 20 2006
STATUS
approved