OFFSET
1,1
COMMENTS
Subsequence of A129752.
Proper subsequence of A226196. - Alex Ratushnyak, May 30 2013
MATHEMATICA
Select[Accumulate[Range[0, 70]], Union[PrimeQ[{# - 4, # - 2, # + 2, # + 4}]] == {True} &] (* Alonso del Arte, May 27 2013 *)
PROG
(Java)
import java.math.BigInteger;
public class A226109 {
public static void main (String[] args) {
for (long n = 1; n < (1L << 31); n++) {
long p2 = n * (n + 1)/2 + 2, m2 = p2 - 4;
BigInteger b = BigInteger.valueOf(p2);
if (!b.isProbablePrime(80)) continue;
b = BigInteger.valueOf(m2);
if (!b.isProbablePrime(80)) continue;
b = BigInteger.valueOf(p2 + 2);
if (!b.isProbablePrime(80)) continue;
b = BigInteger.valueOf(m2 - 2);
if (!b.isProbablePrime(80)) continue;
System.out.printf("%d, ", p2 - 2);
}
}
}
(Magma) A000217:=func<m | m*(m+1) div 2>; [A000217(t): t in [0..10^5] | forall{A000217(t)+i: i in [-4, -2, 2, 4] | IsPrime(A000217(t)+i)}]; // Bruno Berselli, May 27 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, May 26 2013
STATUS
approved