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.

This page as a plain text file.
%I A384699 #20 Jun 18 2025 17:29:15
%S A384699 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,
%T A384699 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,
%U A384699 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
%N A384699 Triples of distinct primes whose sum is a perfect square ordered by increasing sum and then lexicographically.
%C A384699 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.
%H A384699 Vincenzo Librandi, <a href="/A384699/b384699.txt">Table of n, a(n) for n = 1..1839</a>
%e A384699 The first triples are:
%e A384699   (2, 3, 11) with sum 16.
%e A384699   (3, 5, 17) with sum 25.
%e A384699   (5, 7, 13) with sum 25.
%e A384699   (2, 3, 31) with sum 36.
%t A384699 maxSquare=400; triplette=Reap[Do[s=k^2; primes=Select[Prime[Range[PrimePi[s]]], #<s&]; Do[If[Total[triple]==s, Sow[Sort[triple]]], {triple, Subsets[primes, {3}]}] {k, 4, Sqrt[maxSquare]}]][[2, 1]]; triplettePiatte=Flatten[DeleteDuplicates[triplette]]
%o A384699 (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;
%Y A384699 Cf. A000040, A000290, A183168.
%K A384699 nonn,tabf
%O A384699 1,1
%A A384699 _Vincenzo Librandi_, Jun 09 2025