A384699 Triples of distinct primes whose sum is a perfect square ordered by increasing sum and then lexicographically.
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
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.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1839
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]]], #
Comments