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.

A384699 Triples of distinct primes whose sum is a perfect square ordered by increasing sum and then lexicographically.

Original entry on oeis.org

2, 3, 11, 3, 5, 17, 5, 7, 13, 2, 3, 31, 2, 5, 29, 2, 11, 23, 3, 5, 41, 3, 17, 29, 5, 7, 37, 5, 13, 31, 7, 11, 31, 7, 13, 29, 7, 19, 23, 13, 17, 19, 2, 3, 59, 2, 19, 43, 3, 5, 73, 3, 7, 71, 3, 11, 67, 3, 17, 61, 3, 19, 59, 3, 31, 47, 3, 37, 41, 5, 17, 59, 5, 23, 53, 5, 29, 47, 7, 13, 61, 7, 31, 43, 11, 17, 53
Offset: 1

Views

Author

Vincenzo Librandi, Jun 09 2025

Keywords

Comments

The list is a flattened sequence of all distinct unordered triples of primes (p_1, p_2, p_3), with p_1 < p_2 < p_3, such that p_1 + p_2 + p_3 is a perfect square. The triples are sorted in ascending order of the square value. The flattened list lists the primes in each triple in ascending order.

Examples

			The first triples are:
  (2, 3, 11) with sum 16.
  (3, 5, 17) with sum 25.
  (5, 7, 13) with sum 25.
  (2, 3, 31) with sum 36.
		

Crossrefs

Programs

  • Magma
    limit := 400; triplette := []; for k in [4..Isqrt(limit)] do s := k^2; P := PrimesUpTo(s); for i in [1..#P-2] do for j in [i+1..#P-1] do for l in [j+1..#P] do  if P[i] + P[j] + P[l] eq s then Append(~triplette, [P[i], P[j], P[l]]); end if; end for; end for; end for; end for; flat := &cat triplette;
  • Mathematica
    maxSquare=400; triplette=Reap[Do[s=k^2; primes=Select[Prime[Range[PrimePi[s]]], #