login

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

A129257
Primes p such that k-1, k+1 are composite, where k = absolute value of q^2 - p*r and p, q, r are consecutive primes.
1
53, 79, 109, 131, 197, 199, 269, 293, 313, 353, 359, 373, 383, 433, 443, 463, 503, 521, 571, 577, 593, 613, 617, 643, 659, 673, 701, 709, 719, 733, 751, 773, 787, 797, 811, 827, 839, 863, 877, 883, 919, 937, 953, 967, 977, 991, 997, 1013, 1031, 1033, 1039
OFFSET
1,1
COMMENTS
Primes that are not in A127566.
LINKS
EXAMPLE
79, 83, 89 are consecutive primes, 83^2 - 79*89 = -142. Both 141 = 3*47 and 143 = 11*13 are composite, hence 79 is a term.
MATHEMATICA
Transpose[Select[Partition[Prime[Range[200]], 3, 1], AllTrue[Abs[ #[[2]]^2- #[[1]]*#[[3]]]+{1, -1}, CompositeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 04 2015 *)
PROG
(Magma) [ p: p in PrimesInInterval(2, 1060) | not IsPrime(k-1) and not IsPrime(k+1) where k is Abs(q^2 - p*r) where r is NextPrime(q) where q is NextPrime(p) ];
CROSSREFS
Cf. A127566.
Sequence in context: A043212 A043992 A032421 * A125875 A059245 A268753
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Apr 08 2007
STATUS
approved