OFFSET
1,1
COMMENTS
k is always an even number.
Agrees with A049545 for the first 26 terms; first divergence is at 109.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
31, 37, 41 are consecutive primes, 31^2 - 37*41 = -556. 557 is prime, hence 31 is a term.
53, 59, 61 are consecutive primes, 59^2 - 53*61 = 248. Both 247 = 13*19 and 249 = 3*83 are composite, hence 53 is not in the sequence.
MATHEMATICA
Transpose[Select[Partition[Prime[Range[70]], 3, 1], Or@@PrimeQ[Abs[ #[[2]]^2- #[[1]]*#[[3]]]+{1, -1}]&]][[1]] (* Harvey P. Dale, Oct 28 2013 *)
PROG
(Magma) [ p: p in PrimesInInterval(2, 335) | IsPrime(k-1) or IsPrime(k+1) where k is Abs(q^2 - p*r) where r is NextPrime(q) where q is NextPrime(p) ]; /* Klaus Brockhaus, Apr 06 2007 */
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot, Apr 02 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus, Apr 06 2007
STATUS
approved