login
Triangular numbers that are sums of twin prime pairs.
3

%I #14 Dec 27 2019 11:55:54

%S 36,120,276,300,2556,3240,5460,8256,12720,23436,26796,34980,41616,

%T 46056,56616,59340,103740,122760,139656,147696,157080,185136,195000,

%U 231540,277140,333336,353220,386760,401856,516636,609960,860016,1001820

%N Triangular numbers that are sums of twin prime pairs.

%C All terms are multiples of 12.

%H Amiram Eldar, <a href="/A165966/b165966.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A105174(n)*(A105174(n) + 1)/2.

%e 36 = 8*9/2 is a term since it is triangular and the sum of the twin primes 17 and 19.

%e 120 = 15*16/2 is a term since it is triangular and the sum of the twin primes 59 and 61.

%t tri[n_] := n*(n+1)/2; Select[tri /@ Range[10^3], And @@ PrimeQ[#/2 + {-1, 1}] &] (* _Amiram Eldar_, Dec 27 2019 *)

%o (PARI) lista(nn) = {for (n = 1, nn, trg = n*(n+1)/2; if (!(trg % 2) && isprime(trg/2-1) && isprime(trg/2+1), print1(trg, ", ")););} \\ _Michel Marcus_, Oct 16 2013

%Y Subsequence of A111163 and of A054735.

%Y Cf. A000217, A001359, A105174.

%K nonn

%O 1,1

%A _Zak Seidov_, Oct 01 2009