login
A209494
Smallest prime p such that 2p*n^2 - 1 is prime, or 0 if no such prime exists.
1
2, 3, 3, 7, 3, 5, 3, 3, 5, 3, 7, 3, 3, 37, 13, 7, 3, 11, 31, 3, 5, 3, 19, 11, 13, 7, 3, 3, 19, 3, 31, 3, 5, 7, 3, 5, 13, 3, 11, 37, 61, 13, 3, 7, 3, 19, 73, 5, 7, 19, 11, 3, 31, 7, 3, 31, 31, 3, 7, 3, 19, 3, 3, 31, 3, 19, 151, 3, 5, 3, 7, 5, 3, 97
OFFSET
1,1
LINKS
EXAMPLE
2 is in the sequence because 2 and 2*2*1^2 - 1 = 3 are both primes.
MATHEMATICA
spp[n_]:=Module[{n2=n^2, p=2}, While[!PrimeQ[2p*n2-1], p=NextPrime[p]]; p]; Array[spp, 80] (* Harvey P. Dale, Jul 09 2017 *)
PROG
(PARI) a(n)=forprime(p=2, default(primelimit), if(isprime(2*p*n^2-1), return(p))) \\ Charles R Greathouse IV, Mar 09 2012
CROSSREFS
Cf. A066049.
Sequence in context: A340753 A239472 A234943 * A082910 A023646 A056225
KEYWORD
nonn
AUTHOR
Gerasimov Sergey, Mar 09 2012
STATUS
approved