A014234 Largest prime <= 2^n.
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
Keywords
References
- D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 2, p. 390.
Links
- T. D. Noe, Table of n, a(n) for n=1..1000
- Fred Curtis, C++ program for A014234
- Harry J. Smith, PrimePi2 - Computes the Prime Pi(x) counting function [Broken link]
- Harry J. Smith, PrimePi2 - Computes the Prime Pi(x) counting function [Cached copy]
Crossrefs
Programs
-
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 *)
-
PARI
a(n) = precprime(2^n) \\ Michel Marcus, Aug 08 2013
Extensions
Terms for n=31, n=32 added by Fred Curtis (fred(AT)f2.org), Dec 08 2009
Comments