OFFSET
1,1
EXAMPLE
a(1) = 2 because 2 is the smallest prime p such that 1*p+1 is prime.
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
CROSSREFS
KEYWORD
sign
AUTHOR
Jean-Marc Rebert, Sep 29 2024
STATUS
approved