|
|
A226109
|
|
Triangular numbers t such that t - 4, t - 2, t + 2, t + 4 are four primes.
|
|
1
|
|
|
15, 105, 1485, 18915, 666435, 2143485, 4174605, 10059855, 10440165, 28196295, 95295915, 124591005, 155064855, 171023265, 206258205, 298400235, 311737965, 347701635, 389470095, 459332895, 460424685, 498948255, 526517475, 537575655, 615496155, 645500415, 885763005, 963144105
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
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 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);
}
}
}
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|