A300845 a(n) is the smallest prime q such that q^2 + q*p + p^2 is a prime number where p is n-th prime, or 0 if no such q exists.
3, 2, 7, 2, 3, 2, 3, 11, 3, 3, 3, 2, 7, 3, 19, 7, 7, 2, 11, 13, 2, 5, 37, 19, 11, 3, 5, 3, 5, 13, 3, 7, 7, 2, 7, 5, 2, 3, 37, 7, 3, 29, 13, 5, 3, 11, 17, 29, 37, 2, 13, 3, 2, 67, 19, 7, 7, 5, 3, 3, 29, 43, 23, 7, 5, 3, 3, 5, 7, 2, 43, 3, 2, 17, 17, 7, 19, 2, 13, 23, 43, 3, 7, 2, 2, 7, 7, 2, 7
Offset: 1
Keywords
Examples
a(3) = 7 because 7^2 + 7*5 + 5^2 = 109 is prime number and 7 is the least prime with this property.
Links
- Wikipedia, Schinzel's Hypothesis H
Programs
-
Maple
f:= proc(p) local q; q:= 1; do q:= nextprime(q); if isprime(q^2+q*p+p^2) then return q fi; od end proc: map(f, select(isprime, [2,seq(i,i=3..1000,2)])); # Robert Israel, Mar 13 2018
-
Mathematica
Table[Block[{q = 2}, While[! PrimeQ[q^2 + q p + p^2], q = NextPrime@ q]; q], {p, Prime@ Range@ 89}] (* Michael De Vlieger, Mar 14 2018 *)
-
PARI
a(n) = {my(p=prime(n)); forprime(q=2, ,if(isprime(p^2+p*q+q^2), return(q)))}
Comments