login
A014234
Largest prime <= 2^n.
54
2, 3, 7, 13, 31, 61, 127, 251, 509, 1021, 2039, 4093, 8191, 16381, 32749, 65521, 131071, 262139, 524287, 1048573, 2097143, 4194301, 8388593, 16777213, 33554393, 67108859, 134217689, 268435399, 536870909, 1073741789, 2147483647, 4294967291, 8589934583, 17179869143, 34359738337, 68719476731, 137438953447
OFFSET
1,1
COMMENTS
For n>1 largest prime factor of the denominator of A027611(2^n) = 2^n*(2^n)-th harmonic number. - Alexander Adamchuk, Aug 02 2006
REFERENCES
D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 2, p. 390.
MAPLE
a:= n-> prevprime(2^n+1):
seq(a(n), n=1..40); # Alois P. Heinz, Apr 23 2020
MATHEMATICA
PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; Table[ Abs[ PrevPrim[2^n]], {n, 1, 30} ]
Join[{2}, NextPrime[2^Range[2, 40], -1]] (* Harvey P. Dale, Jun 26 2011 *)
PROG
(C++) // see link above
(PARI) a(n) = precprime(2^n) \\ Michel Marcus, Aug 08 2013
CROSSREFS
Cf. A013603 (2^n - a(n)).
See comment for the relationship to A027611.
These primes have indices A007053 = number of primes <= 2^n.
The opposite is A104080, delta A092131, indices A372684.
For squarefree instead of prime we have A372889, indices A143658.
A036378 counts primes between powers of 2, A293697 adds them up.
Sequence in context: A071899 A242389 A102644 * A124430 A002013 A171416
KEYWORD
nonn
AUTHOR
EXTENSIONS
Terms for n=31, n=32 added by Fred Curtis (fred(AT)f2.org), Dec 08 2009
STATUS
approved