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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A129344 a(n) is the number of powers of 2 that have n decimal digits. 3
4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 4, 3, 3, 3, 4, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Ignoring the first term, first differences of A066343. [Andrew Woods, Jun 10 2013]

LINKS

Table of n, a(n) for n=1..93.

FORMULA

For n>1, a(n) = floor(n*L)-floor((n-1)*L) where L = log(10)/log(2). [Andrew Woods, Jun 10 2013]

EXAMPLE

a(1) is 4 because there are 4 one-digit powers of 2: 1, 2, 4, 8.

MATHEMATICA

Table[Transpose[ Select[Table[{n, 2^n}, {n, 0, 310}], IntegerDigits[ #[[2]]][[1]] == 1 &]][[1]][[k]] - Transpose[ Select[Table[{n, 2^n}, {n, 0, 310}], IntegerDigits[ #[[2]]][[1]] == 1 &]][[1]][[k - 1]], {k, 2, 94}]

PROG

(PARI) a(n) = my(k=0, i=0); while(#Str(2^k)!=n, k++); while(#Str(2^k)==n, i++; k++); i \\ Felix Fröhlich, Jan 19 2016

CROSSREFS

First differences of A067497. Also n such that 1 is the first digit of 2^n (cf. A000079).

Sequence in context: A281705 A026858 A188885 * A048853 A179845 A180217

Adjacent sequences:  A129341 A129342 A129343 * A129345 A129346 A129347

KEYWORD

base,nonn

AUTHOR

Tanya Khovanova, May 28 2007

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 March 27 08:32 EDT 2017. Contains 284146 sequences.