OFFSET
1,2
COMMENTS
Conjecture: For each prime(n) there exists at least one positive integer a(n) such that prime(n) + a(n) and prime(n) + (a(n))^2 are both primes.
Alternative representation of this conjecture: If defining a(n)=0 for those n such that no positive integer a(n) exists to make both prime(n)+a(n) and prime(n) + (a(n))^2 primes, it is conjectured that a(n) > 0 for all n >= 1.
LINKS
Lei Zhou, Table of n, a(n) for n = 1..10000
EXAMPLE
n=1, the first prime number is 2. 3-2=1, 2+1^2=3 is a prime number. So a(1)=1;
n=2, the second prime number is 3. 5-3=2, 3+2^2=7 is a prime number. So a(2)=2;
n=3, the third prime number is 5. 7-5=2, 5+2^2=9 is not prime number. 11-5=6, 5+6^2=41 is a prime number. So a(3)=6;
...
n=13, the 13th prime is 41, 41+30=71, 41+30^2=941 are both prime numbers. For any number smaller than 30, there is not such a feature. So a(13)=30.
MATHEMATICA
Table[p = Prime[n]; pt = p; While[pt = NextPrime[pt]; diff = pt - p; ! (PrimeQ[p + diff^2])]; diff, {n, 1, 74}]
spi[n_]:=Module[{k=1, pn=Prime[n]}, While[!PrimeQ[pn+k]||!PrimeQ[pn+k^2], k++]; k]; Array[spi, 80] (* Harvey P. Dale, Aug 10 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Apr 02 2014
STATUS
approved