cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A165966 Triangular numbers that are sums of twin prime pairs.

Original entry on oeis.org

36, 120, 276, 300, 2556, 3240, 5460, 8256, 12720, 23436, 26796, 34980, 41616, 46056, 56616, 59340, 103740, 122760, 139656, 147696, 157080, 185136, 195000, 231540, 277140, 333336, 353220, 386760, 401856, 516636, 609960, 860016, 1001820
Offset: 1

Views

Author

Zak Seidov, Oct 01 2009

Keywords

Comments

All terms are multiples of 12.

Examples

			36 = 8*9/2 is a term since it is triangular and the sum of the twin primes 17 and 19.
120 = 15*16/2 is a term since it is triangular and the sum of the twin primes 59 and 61.
		

Crossrefs

Subsequence of A111163 and of A054735.

Programs

  • Mathematica
    tri[n_] := n*(n+1)/2; Select[tri /@ Range[10^3], And @@ PrimeQ[#/2 + {-1, 1}] &] (* Amiram Eldar, Dec 27 2019 *)
  • 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

Formula

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