OFFSET
0,1
COMMENTS
It is conjectured that all sequence terms are <= 5. The terms with a(n)=5 were provided by W. Edwin Clark.
LINKS
Robert E. Dressler, Louis Pigno, and Robert Young, Sums of squares of primes, Nordisk Mat. Tidskr. 24 (1976), 39-40.
Hugo Pfoertner, Conjectured minimal representations of n by squaresof distinct primes (Table for n<=400).
EXAMPLE
The following are representation with the minimal number of terms:
a(0)=4: 0=7^2-11^2-17^2+19^2;
a(1)=3: 1=7^2+11^2-13^2;
a(4)=1: 4=2^2;
a(5)=2: 5=3^2-2^2;
a(6)=5: 6=-(2^2)+3^2+7^2+11^2-13^2.
PROG
(Python)
from sympy import prime
from itertools import combinations, product, count
from functools import cache
@cache
def A001248_list(n): return list(prime(i)**2 for i in range(1, n+1))
@cache
def A088910(n, num_primes=30):
for k in count(1):
for c in combinations(Q, k-1):
for s in product([1, -1], repeat=k-1):
v=abs(n-sum(x*y for x, y in zip(c, s)))
if v in S and v not in c: return k # Tyler Busby, Nov 30 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Oct 24 2003
STATUS
approved
