OFFSET
1,1
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
87 is a term as 87 = 2^2 + 3^2 + 5^2 + 7^2.
MATHEMATICA
Select[Range@1000,
Length[PowersRepresentations[#, 4, 2] // Select[AllTrue@PrimeQ] //
Select[DuplicateFreeQ]] > 0 &]
PROG
(Python)
from itertools import combinations as comb
ps=[p**2 for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]]
a=[n for n in range(1001) if n in [sum(n) for n in list(comb(ps, 4))]]
print(a)
(PARI) upto(n) = {if(n <= 86, return([])); my(pr = primes(primepi(sqrtint(n - 38))), res = List()); forvec(v = vector(4, i, [1, #pr]), c = sum(i = 1, #v, pr[v[i]]^2); if(c <= n, listput(res, c)), 2); listsort(res, 1); res} \\ David A. Corneth, Jul 12 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Zhining Yang, May 25 2023
STATUS
approved