Sums of squares of primes

Edwin Clark eclark at math.usf.edu
Wed Oct 22 20:22:12 CEST 2003


On Wed, 22 Oct 2003, Pfoertner, Hugo wrote:

> SeqFans,
> 
> yesterday I've found the thread in sci.math:
> "Sum of unique prime squares?"
> http://mathforum.org/discuss/sci.math/t/547283
> 
> In an answer Robert Israel wrote:
> <<
> Actually it seems that all positive integers at least up to 1000 can be 
> written as differences of sums of squares of distinct primes.  I wouldn't
> be surprised if this was true for all positive integers, but I don't 
> immediately see a way to prove it.
> >>
> 
> I wrote a little program with the idea to find a new sequence
> "Minumum number of terms needed to represent n as a sum of
> the squares of primes, admitting also negative terms".
> 
> From my preliminary result the sequence should start (from n=0):
> 4,3,4,4,1,2,?,?,4,1,4,4,3,2,4,3,2,?,?,4,3,...
> 
> 
> I checked the first 100 primes and four terms in the sum with the following
> result (sorry, 101 lines):

[snip,snip]

> 
> Question:
> Can we replace all ? with "5"? Can 6,7,17,18,... be written as sum or
> difference
> of 5 distinct squares of primes? Is 5 terms the maximum?

I find that just using the first 12 primes all numbers from 1 to 1123
can be written in the form sum(s[i]*p[i]^2, i=1..k) where s[i] is 1 or -1,
the primes p[i] are distinct and k <=5. The problem is showing that the
number of terms is "minimum". (You did mean minimum and not maximum
above? Or maybe you meant that all positive integers can be so expressed
with at most 5 primes?)

Here's my sequence of least number of terms using just the primes to 37:
for n from 0 to 200:
4, 3, 4, 4, 1, 2, 5, 5, 4, 1, 4, 4, 3, 2, 4, 3, 2, 5, 5, 4, 3, 2, 4,
3, 2, 1, 4, 4, 3, 2, 3, 5, 4, 3, 2, 4, 3, 4, 3, 3, 2, 5, 5, 4, 3, 2,
4, 3, 2, 1, 4, 4, 3, 2, 3, 5, 4, 3, 2, 4, 5, 4, 3, 3, 4, 3, 5, 4, 3,
4, 3, 3, 2, 3, 2, 4, 3, 4, 3, 4, 4, 3, 4, 3, 5, 4, 4, 3, 4, 5, 5, 4,
3, 4, 4, 3, 2, 3, 4, 4, 3, 4, 5, 5, 4, 3, 4, 4, 3, 4, 4, 3, 2, 5, 5,
4, 3, 2, 4, 3, 2, 1, 4, 4, 3, 2, 3, 5, 4, 3, 2, 4, 5, 4, 3, 3, 4, 3,
5, 4, 3, 4, 3, 3, 2, 3, 2, 4, 3, 4, 3, 4, 4, 3, 4, 3, 3, 4, 4, 3, 2,
3, 5, 4, 3, 2, 3, 3, 2, 1, 2, 4, 3, 2, 3, 4, 4, 3, 2, 3, 5, 4, 3, 3,

--Edwin Clark







More information about the SeqFan mailing list