login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A035100 Number of bits in binary expansion of n-th prime. 20

%I #38 Nov 10 2022 11:16:44

%S 2,2,3,3,4,4,5,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,

%T 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,

%U 9,9,9,9,9,9,9,9,9,9,9,9,9

%N Number of bits in binary expansion of n-th prime.

%H Jamie Morken, <a href="/A035100/b035100.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from G. C. Greubel)

%p Digits := 40: [ seq(1+floor(evalf(log(ithprime(n))/log(2))), n=1..100) ];

%t f[n_]:=Length[IntegerDigits[Prime[n],2]]; Table[f[n],{n,5!}] (* _Vladimir Joseph Stephan Orlovsky_, Feb 07 2010 *)

%t IntegerLength[Prime[Range[100]],2] (* _Harvey P. Dale_, Nov 10 2022 *)

%o (PARI) a(n)=#binary(prime(n)) \\ _Charles R Greathouse IV_, Sep 23 2012

%Y Cf. A000040, A000523, A029837, A070939, A162145.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 29 04:19 EDT 2024. Contains 372097 sequences. (Running on oeis4.)