OFFSET
1,7
COMMENTS
Conjectures: there are only 11 primes (5,11,13,31,37,53,61,73,79,97,127) for which k does not exist and there is always at least a pair of twin primes between prime(n) and prime(n)^2.
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..25000
MATHEMATICA
Table[k = 0; While[k < Prime[n] && ! (PrimeQ[Prime[n]*(Prime[n] - k) - 1] && PrimeQ[Prime[n]*(Prime[n] - k) + 1]), k++]; If[k == Prime[n], k = -1]; k, {n, 100}]
CROSSREFS
KEYWORD
sign
AUTHOR
Pierre CAMI, Mar 13 2011
STATUS
approved