login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest prime p such that 2p*n^2 - 1 is prime, or 0 if no such prime exists.
1

%I #14 Jul 09 2017 16:20:31

%S 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,

%T 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,

%U 7,3,19,3,3,31,3,19,151,3,5,3,7,5,3,97

%N Smallest prime p such that 2p*n^2 - 1 is prime, or 0 if no such prime exists.

%H Harvey P. Dale, <a href="/A209494/b209494.txt">Table of n, a(n) for n = 1..1000</a>

%e 2 is in the sequence because 2 and 2*2*1^2 - 1 = 3 are both primes.

%t 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 *)

%o (PARI) a(n)=forprime(p=2,default(primelimit),if(isprime(2*p*n^2-1),return(p))) \\ _Charles R Greathouse IV_, Mar 09 2012

%Y Cf. A066049.

%K nonn

%O 1,1

%A _Gerasimov Sergey_, Mar 09 2012