login

Revision History for A376579

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
Least prime p such that p*n+1 is prime, or -1 if no such prime exists.
(history; published version)
#8 by N. J. A. Sloane at Wed Oct 23 01:26:55 EDT 2024
STATUS

proposed

approved

#7 by Michel Marcus at Sun Sep 29 04:03:25 EDT 2024
STATUS

editing

proposed

#6 by Michel Marcus at Sun Sep 29 04:03:20 EDT 2024
PROG

(PARI) a(n) = if (n%2, if (isprime(2*n+1), 2, -1), my(p=2); while(!isprime(p*n+1), p = nextprime(p+1)); p); \\ Michel Marcus, Sep 29 2024

STATUS

proposed

editing

#5 by Jean-Marc Rebert at Sun Sep 29 03:00:01 EDT 2024
STATUS

editing

proposed

#4 by Jean-Marc Rebert at Sun Sep 29 02:59:48 EDT 2024
EXAMPLE

a(1) = 2 because 2 is the smallest prime p such that 21*p+1 is prime.

STATUS

proposed

editing

#3 by Jean-Marc Rebert at Sun Sep 29 02:56:48 EDT 2024
STATUS

editing

proposed

#2 by Jean-Marc Rebert at Sun Sep 29 02:53:59 EDT 2024
NAME

allocated for Jean-Marc Rebert

Least prime p such that p*n+1 is prime, or -1 if no such prime exists.

DATA

2, 2, 2, 3, 2, 2, -1, 2, 2, 3, 2, 3, -1, 2, 2, 7, -1, 2, -1, 2, 2, 3, 2, 3, -1, 2, -1, 7, 2, 2, -1, 3, 2, 3, 2, 2, -1, 5, 2, 7, 2, 3, -1, 2, -1, 3, -1, 2, -1, 2, 2, 3, 2, 2, -1, 2, -1, 19, -1, 3, -1, 5, 2, 3, 2, 3, -1, 2, 2, 3, -1, 13, -1, 2, 2, 3, -1, 2, -1, 3, 2, 19

OFFSET

1,1

EXAMPLE

a(1) = 2 because 2 is the smallest prime p such that 2*p+1 is prime.

CROSSREFS
KEYWORD

allocated

sign

AUTHOR

Jean-Marc Rebert, Sep 29 2024

STATUS

approved

editing

#1 by Jean-Marc Rebert at Sun Sep 29 02:53:59 EDT 2024
NAME

allocated for Jean-Marc Rebert

KEYWORD

allocated

STATUS

approved