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!)
A098388 a(n) = floor(log_2(prime(n))). 5

%I #32 Sep 14 2021 17:37:15

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

%T 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,

%U 8,8,8,8,8,8,8,8,8,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

%N a(n) = floor(log_2(prime(n))).

%C a(n) is the greatest k such that 2^k does not exceed prime(n). - _David James Sycamore_, Sep 14 2021

%H T. D. Noe, <a href="/A098388/b098388.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000523(A000040(n)); A098391(n) = A000523(a(n)).

%F a(n) = A035100(n) - 1. - _Michel Marcus_, Sep 17 2017

%p map(ilog2, select(isprime,[2,seq(2*i+1,i=1..1000)])); # _Robert Israel_, Jun 08 2015

%t Floor[Log[2, Prime[Range[105]]]] (* data *) (* parameter changed by _Hartmut F. W. Hoft_, Jun 02 2015 *)

%o (PARI) a(n) = logint(prime(n), 2); \\ _Michel Marcus_, Sep 17 2017

%Y Cf. A000040, A000523, A023196, A035100, A098391.

%K nonn,easy

%O 1,3

%A _Reinhard Zumkeller_, Sep 06 2004

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 September 6 18:47 EDT 2024. Contains 375718 sequences. (Running on oeis4.)