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.

A305883 Triangle read by rows: row n lists the pairs (p, q) such that p, q are primes, p+q=2*n and p < q.

Original entry on oeis.org

3, 5, 3, 7, 5, 7, 3, 11, 3, 13, 5, 11, 5, 13, 7, 11, 3, 17, 7, 13, 3, 19, 5, 17, 5, 19, 7, 17, 11, 13, 3, 23, 7, 19, 5, 23, 11, 17, 7, 23, 11, 19, 13, 17, 3, 29, 13, 19, 3, 31, 5, 29, 11, 23, 5, 31, 7, 29, 13, 23, 17, 19, 7, 31, 3, 37, 11, 29, 17, 23, 5, 37, 11, 31
Offset: 4

Views

Author

Seiichi Manyama, Jun 13 2018

Keywords

Examples

			  n  | (p,q)
  ---+----------------------------
   4 | (3,  5);
   5 | (3,  7);
   6 | (5,  7);
   7 | (3, 11);
   8 | (3, 13), (5, 11);
   9 | (5, 13), (7, 11);
  10 | (3, 17), (7, 13);
  11 | (3, 19), (5, 17);
  12 | (5, 19), (7, 17), (11, 13);
		

Crossrefs

Cf. A002373, A020481, A061357 (the size of row n), A078496, A078587.

Programs

  • Mathematica
    row[n_] := Select[Table[{p, 2 n - p}, {p, Prime[Range[PrimePi[n]]]}], Less @@ # && AllTrue[#, PrimeQ]&] // Union;
    Table[row[n], {n, 4, 25}] // Flatten (* Jean-François Alcover, Jun 16 2018 *)