The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A123252 a(n) = smallest prime of the form 2^k + 2n - 1, k = 0, 1, ..., or 0 if there is none. 2
3, 5, 7, 11, 11, 13, 17, 17, 19, 23, 23, 31, 29, 29, 31, 47, 37, 37, 41, 41, 43, 47, 47, 79, 53, 53, 61, 59, 59, 61, 317, 67, 67, 71, 71, 73, 89, 79, 79, 83, 83, 211, 89, 89, 97, 107, 97, 97, 101, 101, 103, 107, 107, 109, 113, 113, 241, 131, 149, 127, 137, 127, 127, 131 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If n == 0 (mod 3) then the exponent k must be odd, if n>1 and n == 1 (mod 3) then k must be even and if n == 2 (mod 3) then k can be either.
Records: 3, 5, 7, 11, 13, 17, 19, 23, 31, 47, 79, 317, 1163, 1048847, 536871199, 2^955 + 773, ..., . - Robert G. Wilson v
LINKS
FORMULA
a(n) = 2^A067760(n-1) + 2n-1 if A067760(n-1) > 0, 0 if A067760(n-1) = 0. - Robert Israel, Jan 14 2017
EXAMPLE
For n = 4, p = 2 -> 2^2+(2*4-1) = 11, the fourth entry because 2^1+(2*4-1) which equals 9 is not a prime.
MATHEMATICA
f[n_] := Block[{p = 1}, While[ !PrimeQ[2^p + 2n - 1], p++ ]; 2^p + 2n - 1]; Array[f, 64] (* Robert G. Wilson v *)
PROG
(PARI) g2(n) = forstep(k=1, n, 2, for(p=1, n, y=k+2^p; if(isprime(y), print1(y", "); break)))
CROSSREFS
Cf. A067760.
Sequence in context: A241957 A112070 A208643 * A352185 A066168 A058024
KEYWORD
nonn
AUTHOR
Cino Hilliard, Oct 08 2006
EXTENSIONS
Edited and extended by Robert G. Wilson v, Nov 11 2006
Name edited by Robert Israel, Jan 14 2017
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 May 13 19:11 EDT 2024. Contains 372522 sequences. (Running on oeis4.)