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!)
A225403 Smallest prime q such that 2*prime(n)*q^prime(n)+1 is also prime. 3
2, 3, 7, 5, 7, 41, 283, 3, 127, 11161, 1427, 17, 8011, 821, 607, 2161, 4903, 509, 1607, 127, 11261, 8273, 12037, 58207, 419, 11491, 2153, 1789, 9059, 67843, 29, 5641, 1999, 2459, 1699, 15299, 35747, 2531, 10987, 26497, 36781, 719, 24709, 13721, 29803, 1049 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
2*2*2^2+1 = 17 prime so a(1) = 2,
2*3*2^3+1 = 49 composite,
2*3*3^3+1 = 163 prime so a(2) = 3,
2*5*2^5+1 = 321 composite,
2*5*3^5+1 = 2431 composite,
2*5*5^5+1 = 31251 composite,
2*5*7^5+1 = 168071 prime so a(3) = 7.
PROG
(PFGW & SCRIPTIFY)
SCRIPT
DIM n, 0
DIM k
DIM q
DIM pp
DIMS t
OPENFILEOUT myfile, a(n).txt
LABEL a
SET n, n+1
IF n>250 THEN END
SET k, 0
LABEL b
SET k, k+1
SET q, p(k)
SETS t, %d, %d\,; n; q
SET pp, 2*p(n)*q^p(n)+1
PRP pp, t
IF ISPRP THEN GOTO c
GOTO b
LABEL c
WRITE myfile, t
GOTO a
(PARI) a(n) = my(q=2); while(!isprime(2*prime(n)*q^prime(n)+1), q = nextprime(q+1)); q; \\ Michel Marcus, Sep 23 2019
CROSSREFS
Sequence in context: A357579 A334126 A341717 * A069786 A128804 A223702
KEYWORD
nonn
AUTHOR
Pierre CAMI, May 13 2013
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 February 24 16:16 EST 2024. Contains 370307 sequences. (Running on oeis4.)