login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A126206 Number of 4's in decimal expansion of 4^n. 6
0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 1, 3, 0, 1, 2, 2, 2, 1, 1, 3, 0, 3, 3, 3, 2, 2, 2, 3, 1, 2, 2, 3, 4, 3, 1, 3, 3, 4, 2, 4, 2, 4, 2, 2, 3, 4, 3, 3, 3, 3, 2, 2, 3, 5, 2, 4, 2, 4, 4, 3, 3, 3, 4, 4, 6, 5, 5, 4, 2, 9, 5, 2, 4, 6, 4, 7, 4, 2, 5, 4, 3, 4, 8, 4, 7, 9, 2, 8, 4, 7, 3, 10, 9, 5, 3, 5, 8, 8, 3, 10, 4 (list; graph; refs; listen; history; text; internal format)
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]  [From Harvey P. Dale, Feb 01 2011]

CROSSREFS

Cf. A065710, A126205, A126207, A126208, A126209, A126210, A126211.

Sequence in context: A228786 A140699 A140256 * A119709 A253556 A252735

Adjacent sequences:  A126203 A126204 A126205 * A126207 A126208 A126209

KEYWORD

nonn,base,changed

AUTHOR

Paolo P. Lava and Giorgio Balzarotti, Dec 20 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified July 18 12:02 EDT 2018. Contains 312737 sequences. (Running on oeis4.)