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!)
A290838 a(n) = smallest prime p such that 2p - 2n + 1 is prime. 2
2, 2, 3, 5, 5, 7, 7, 13, 11, 11, 11, 13, 13, 19, 17, 17, 17, 19, 19, 37, 23, 23, 23, 29, 29, 31, 29, 29, 29, 31, 31, 37, 37, 41, 37, 37, 37, 43, 41, 41, 41, 43, 43, 61, 47, 47, 47, 53, 53, 67, 53, 53, 53, 59, 59, 61, 59, 59, 59, 61, 61, 67, 67, 71, 67, 67, 67, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
a(n) > n. - Iain Fox, Nov 13 2017
LINKS
FORMULA
a(-n) = A290839(n+1) - Iain Fox, Dec 14 2017
MATHEMATICA
Table[j=0; found=False; While[!found, j++; found=PrimeQ[2Prime[j]-2n+1] && 2Prime[j]-2n+1>0]; Prime[j], {n, 67}]
(* Second program: *)
Table[SelectFirst[Prime@ Range[n^2], And[# > 0, PrimeQ@ #] &[2 # - 2 n + 1] &], {n, 67}] (* Michael De Vlieger, Aug 14 2017 *)
PROG
(PARI) a(n) = {my(p=2); while(!isprime(2*p-2*n+1), p = nextprime(p+1)); p; } \\ Michel Marcus, Aug 12 2017
(PARI) a(n) = forprime(p=n+1, , if(isprime(2*p - 2*n + 1), return(p))) \\ Iain Fox, Nov 13 2017
CROSSREFS
Sequence in context: A262463 A151800 A259430 * A056896 A089366 A113827
KEYWORD
nonn,easy
AUTHOR
XU Pingya, Aug 11 2017
EXTENSIONS
a(0) prepended by Iain Fox, Dec 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 March 29 09:44 EDT 2024. Contains 371268 sequences. (Running on oeis4.)