# Sum of 3 squares

tarheelborn

## Homework Statement

Prove that if a prime number is a sum of three squares of different primes, then one of the primes must be equal to 3.

## The Attempt at a Solution

I really have no idea where to start this one.

Mentor

## Homework Statement

Prove that if a prime number is a sum of three squares of different primes, then one of the primes must be equal to 3.

## The Attempt at a Solution

I really have no idea where to start this one.

Start with an equation that represents the given part of what you're trying to prove.

tarheelborn
So something like:

Let p, q, r, and s be prime. Then if s = p^2 + q^2 + r^2, either p, q, or r must = 3.

The only theorem I have on 3 squares is that N >=1 is a sum of three squares if and only if N <> 4^n(8m+7), for some m, n >= 0.

Homework Helper
If p is a prime different from 3, what is p^2 mod 3?

JDW
A couple of hints:

Try writing your primes as p = 3k + r, r = 0, 1, 2. (Note if k != 1, r cannot be zero, then p isn't prime)

Consider values mod 3

tarheelborn
So p would have to be 1(mod 3) ==> a^2+b^2+c^2==0(mod 3) ==> 3|p which is a contradiction, right?
{"ft_lang_label":"__label__en","ft_lang_prob":0.91329026,"math_prob":0.9988962,"size":258,"snap":"2022-40-2023-06","text_gpt3_token_len":72,"char_repetition_ratio":0.09448819,"word_repetition_ratio":0.0,"special_character_ratio":0.251938,"punctuation_ratio":0.05882353,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999013,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-09-28T19:16:28Z\",\"WARC-Record-ID\":\"<urn:uuid:7340491e-72ce-44cf-bde4-a93478fac2f1>\",\"Content-Length\":\"70333\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:e43edfab-b5fb-41d2-9569-fd4ee99d3385>\",\"WARC-Concurrent-To\":\"<urn:uuid:02d709eb-314f-4823-88cb-bfad7c01a0f9>\",\"WARC-IP-Address\":\"172.67.68.135\",\"WARC-Target-URI\":\"https://www.physicsforums.com/threads/sum-of-3-squares.397566/\",\"WARC-Payload-Digest\":\"sha1:AE6MFI4T2TEQPLX4TA56SP2VQNTMZ5JQ\",\"WARC-Block-Digest\":\"sha1:R6P4QOGPYADRYQ44D6BPKEQ6TZYCTIQL\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030335276.85_warc_CC-MAIN-20220928180732-20220928210732-00629.warc.gz\"}"}