login
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
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
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
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Sep 06 2004
STATUS
approved