OFFSET
1,1
COMMENTS
If one is trying to decide whether an n+1 digit binary number is prime, this is the largest prime for which one needs to test divisibility. For example a six digit number like 110101 must be below 64, so only primes up to 7 are needed to test divisibility. Compare with sequence A132153.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
MAPLE
seq(prevprime(floor(2^((n+1)*1/2))+1), n=1..40); # Emeric Deutsch
MATHEMATICA
PrevPrim[n_] := Block[{k = n}, While[ !PrimeQ@k, k-- ]; k]; f[n_] := PrevPrim@ Floor@ Sqrt[2^(n + 1)]; Array[f, 42] (* Robert G. Wilson v *)
Table[Prime[PrimePi[2^((n + 1)/2)]], {n, 1, 50}] (* Stefan Steinerberger *)
lp[n_]:=Module[{c=2^((n+1)/2)}, If[PrimeQ[c], c, NextPrime[c, -1]]]; Array[lp, 50] (* Harvey P. Dale, Aug 25 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Anthony C Robin, Jan 03 2008
EXTENSIONS
More terms from Stefan Steinerberger, R. J. Mathar, Robert G. Wilson v and Emeric Deutsch, Jan 06 2008
STATUS
approved