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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(n) is the greatest k such that 2^k does not exceed prime(n). - David James Sycamore, Sep 14 2021
LINKS
FORMULA
a(n) = A000523(A000040(n)); A098391(n) = A000523(a(n)).
a(n) = A035100(n) - 1. - Michel Marcus, Sep 17 2017
MAPLE
map(ilog2, select(isprime, [2, seq(2*i+1, i=1..1000)])); # Robert Israel, Jun 08 2015
MATHEMATICA
Floor[Log[2, Prime[Range[105]]]] (* data *) (* parameter changed by Hartmut F. W. Hoft, Jun 02 2015 *)
PROG
(PARI) a(n) = logint(prime(n), 2); \\ Michel Marcus, Sep 17 2017
CROSSREFS
Sequence in context: A070319 A057142 A320837 * A371672 A157792 A171896
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Sep 06 2004
STATUS
approved

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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)