Questions tagged [sums-of-squares]

For questions concerning various representation of integers as sums of squares, which are studied in number theory.

Filter by
Sorted by
Tagged with
17
votes
8answers
9k views

Diophantine equation $a^2+b^2=c^2+d^2$

I was reasonably certain I've seen this before, but I was wondering how to solve the Diophantine equation $$a^2+b^2=c^2+d^2$$ I tried a web search and found nothing on this one. I'm trying to avoid ...
16
votes
5answers
2k views

Integral solutions of $x^2+y^2+1=z^2$

I am interested in integral solutions of $$x^2+y^2+1=z^2.$$ Is there a complete theory comparable to the one for $x^2+y^2=z^2?$
16
votes
3answers
14k views

Number of integer solutions of $x^2 + y^2 = k$

I'm looking for some help disproving an answer provided on a StackOverflow question I posted about computing the number of double square combinations for a given integer. The original question is ...
8
votes
1answer
980 views

The sum of the first $n$ squares is a square: a system of two Pell-type-equations

This question comes from trying to see why 24 is the only non-trivial value of $n$ for which $$1^2+2^2+3^2+\cdots+n^2$$ is a perfect square. To this end, let $m,n \in \mathbb N$ be such that $1^2+2^2+...
47
votes
3answers
1k views

Any odd number is of form $a+b$ where $a^2+b^2$ is prime

This conjecture is tested for all odd natural numbers less than $10^8$: If $n>1$ is an odd natural number, then there are natural numbers $a,b$ such that $n=a+b$ and $a^2+b^2\in\mathbb P$. $\...
6
votes
6answers
8k views

Find all solutions: $x^2 + 2y^2 = z^2$

I'm use to finding the solutions of linear Diophantine equations, but what are you suppose to do when you have quadratic terms? For example consider the following problem: Find all solutions in ...
9
votes
8answers
1k views

Prove that if $3\mid a^2+b^2$ then $3\mid a$ and $3\mid b$.

For elements $a$ and $b$ in the ring $\Bbb{Z}$ prove that if $3\mid a^2+b^2$ then $3\mid a$ and $3\mid b$. I tried proving it but I just don't manage to. Maybe I am missing some basic claims in the ...
0
votes
1answer
998 views

Is this the general solution of finding the two original squares that add up to a given integer N?

Sometimes we are given an integer N and we want to know if it is the sum of two squares. We know that the sum of two consecutive triangular numbers is always a square. So we can write $$ S_1 = T_n +...
10
votes
4answers
2k views

If a prime can be expressed as sum of square of two integers, then prove that the representation is unique.

If a prime can be expressed as sum of two squares, then prove that the representation is unique. My attempt: If $a^2+b^2=p$, then it is obvious that $a,b$ of different parity. Now, I assume the ...
1
vote
4answers
3k views

$2017$ as the sum of two squares

Write the prime $2017$ as the sum of two squares $2017$ can be written as the sum of two squares because it is a prime of the form $p\equiv 1\ ($mod $4)$ Using an appropriate algorithm find the two ...
8
votes
5answers
9k views

Can an integer of the form $4n+3$ written as a sum of two squares?

Let $u$ be an integer of the form $4n+3$, where $n$ is a positive integer. Can we find integers $a$ and $b$ such that $u = a^2 + b^2$? If not, how to establish this for a fact?
4
votes
3answers
4k views

Show that an integer of the form $8k + 7$ cannot be written as the sum of three squares.

I have figured out a (long, and tedious) way to do it. But I was wondering if there is some sort of direct correlation or another path that I completely missed. My attempt at the program was as ...
9
votes
1answer
2k views

Rabin and Shallit Algorithm

I want to implement Rabin and Shallit algorithm for representing a positive integer as a sum of three squares. Can anyone give me a rough sketch of the method? I searched through the internet but ...
7
votes
1answer
339 views

Weighted sum of squares, in a finite field

Let $\mathbb{F}$ be a finite field. Let $a_1,\dots,a_n \in \mathbb{F}$ be given. I want to know whether there exists $x_1,\dots,x_n \in \mathbb{F}$ such that $$a_1 x_1^2 + a_2 x_2^2 + \dots + a_n ...
2
votes
0answers
226 views

Can the sum of two squares be used to determine if a number is square free?

Mathword (http://mathworld.wolfram.com/Squarefree.html) stated that "There is no known polynomial time algorithm for recognizing squarefree integers or for computing the squarefree part of an integer."...
4
votes
2answers
838 views

Fermat's 2 Square-Like Results from Minkowski Lattice Proofs

Minkowski's Convex Body Theorem for lattices in the plane: Suppose $\mathfrak{L}$ is a lattice in $\mathbf{R}^2$ defined as $\mathfrak{L}=\{m\vec{v_1}+n\vec{v_2}:m,n\in\mathbf{Z}\}$, where $\vec{v_1}$ ...
2
votes
0answers
296 views

Can the sum of two squares be used to factor large numbers?

The method described below is different from Euler sum of two squares factorization method. The method below does not require 2 sum of two squares representations to factor a number. This post was ...
13
votes
1answer
276 views

Integer solutions to $\prod\limits_{i=1}^{n}x_i=\sum\limits_{i=1}^{n}x_i^2$

Given integers $x_1,\dots,x_n>1$. Let's assume WLOG that ${x_1}\leq\ldots\leq{x_n}$. I want to prove that the only integer solutions to any equation of this type are: $x_{1,2,3 }=3\implies\prod\...
18
votes
2answers
506 views

Exploiting a Diophantine approximation of $\pi^4$ into giving a series of rationals for $\pi^4$

A note about this question: The original question asked seems likely impossible so I am really asking if we can exploit the technique below into giving us a 'nice' form for $\pi^4$. By nice form I ...
2
votes
0answers
801 views

On the number of ways of writing an integer as a sum of 3 squares using triangular numbers.

It is well known that integers can be represented as a sum of squares, two, three and more. In what follows will be given a way to represent integers as a sum of 3 squares using triangular numbers. It ...
3
votes
3answers
3k views

The number of ways of writing an integer as a sum of two squares

Given an integer $m=pq$, where $p,q$ are both primes such that $p\equiv 1 \pmod{4}, q\equiv 1 \pmod{4}$. It is known that $p$ can be written as a sum of two squares (of positive integers) in a unique ...
2
votes
1answer
559 views

writing $pq$ as a sum of squares for primes $p,q$

Let $p$ and $q$ be distinct primes congruent to $1$ mod $4$. How many ways are there to write $pq$ as a sum of squares? I know that any prime $p\equiv 1\pmod 4$ can be written uniquely as a sum of ...
2
votes
3answers
172 views

Does this equation have positive integer solutions?

The only solution I can find for $a^2 + b^2 + c^2 = d^2 + e^2 + f^2$ is $a=0$, $b=0$, $c=0$, $d=0$, $e=0$, $f=0$. Are there any positive integer solutions? Any where none of $a,b,c,d,e,f$ are ...
1
vote
0answers
166 views

Sum of two squares of an integer N, the simplest algorithm?

The algorithm is based on the following observation. An integer $b>a$ can be written as $b=a + k$ with a and k integers. So if we want to find a sum of 2 squares of an integer N, we start by ...
0
votes
5answers
2k views

Why is the square root of a sum not equal to the square root of each its addends?

Example: Let's presume one was attempting to isolate m below: A common mistake would be: $k^2 = m^2 + n^2 \to k = m +n$ Even though: $k^2 = m^2 + n^2 \to k \neq m +n$ If you apply a square root to ...
20
votes
1answer
645 views

Numbers that are the sum of the squares of their prime factors

A number which is equal to the sum of the squares of its prime factors with multiplicity: $16=2^2+2^2+2^2+2^2$ $27=3^2+3^2+3^2$ Are these the only two such numbers to exist? There has to be an easy ...
8
votes
2answers
218 views

Most even numbers is a sum $a+b+c+d$ where $a^2+b^2+c^2=d^2$

I have no idea how hard this conjecture is to prove: Any even number $n\ge 36$ can be written as $n=a+b+c+d$ where $a^2+b^2+c^2=d^2$ and $a,b,c,d\in\mathbb Z^+$. Small exceptions are $n=2, 4, 6, 10, ...
7
votes
3answers
295 views

$ \exists a, b \in \mathbb{Z} $ such that $ a^2 + b^2 = 5^k $

I saw this problem recently and found an elegant solution to it, and was curious to see if anybody would think of something else. Nice solutions to nice problems are fun to see! Problem: Prove ...
11
votes
3answers
784 views

Show that $x^2+y^2+z^2=999$ has no integer solutions

The question is asking us to prove that $x^2+y^2+z^2=999$ has no integer solutions. Attempt at a solution: So I've noticed that since 999 is odd, either one of the variables or all three of the ...
7
votes
3answers
248 views

Let $p$ be a prime so $p\equiv3\pmod4$. If $p|a^2+b^2$, then $p|a,b$

Let $p$ be a prime so $p\equiv3\pmod4$. If $p| a^2+b^2$, then $p| a,b$ How do I prove this small theorem? I know that it's quite useful. Are there other small theorems like this one? I am mostly ...
2
votes
5answers
173 views

Relationships between the elements $(a,b,c,d)$ of a solution to $A^2+B^2+4=C^2+D^2$

I have reduced a certain equation (in positive integers) to the equation $$A^2 + B^2 + 4 = C^2 + D^2. \quad(\star)$$ Assume the positive integers $(a,b,c,d)$ are any solution to $(\star)$. Are there ...
2
votes
2answers
243 views

How to derive the formula for the sum of the first $n$ perfect squares? [duplicate]

How do you derive the formula for the sum of the series when $S_n = \sum_{j=1}^n j^2$? The relationship $(n, S_n)$ can be determined by a polynomial in $n$. You are supposed to use finite differences ...
1
vote
2answers
146 views

Which numbers less than 5 billion have the most representations as the sums of two squares?

1842675848 has four representations as the sum of two squares: 1842675848 = 3518^2 + 42782^2 = 5458^2 + 42578^2 = 11338^2 + 41402^2 = 19702^2 + 38138^2. It got me to wonder which numbers in this ...
6
votes
1answer
812 views

Numbers as sum of distinct squares

Yesterday Polish Olympiad of Information Science ended, one of the questions was purely mathematical, Squares (PL). In the task, we have defined square ...
3
votes
4answers
131 views

Proof that $3 \mid \left( a^2+b^2 \right)$ iff $3 \mid \gcd \left( a,b\right)$

After a lot of messing around today I curiously observed that $a^2+b^2$ is only divisible by 3 when both $a$ and $b$ contain factors of 3. I am trying to prove it without using modular arithmetic (...
2
votes
3answers
2k views

Supposed $a,b \in \mathbb{Z}$. If $ab$ is odd, then $a^{2} + b^{2}$ is even.

Supposed $a,b \in \mathbb{Z}$. If $ab$ is odd, then $a^{2} + b^{2}$ is even. I'm stuck on the best way to get this started. My thinking is that I could use cases. i.e. Case 1: a is even and b is ...
2
votes
1answer
80 views

If $p\equiv 3\pmod{4}$ and $p\mid x^2+y^2$, prove $p\mid x,y$.

I have to prove that if $p$ is a prime number of the form $p = 4n - 1$, $n\in N$ and $x^2+y^2\equiv 0\pmod{p}$, then $x\equiv 0\pmod{p}$ and $y\equiv 0\pmod{p}$. I have gone about this as follows and ...
0
votes
2answers
803 views

Representing a given number as the sum of two squares.

There are four essentially different representations of $1885$ as the sum of squares of two positive integers. Find all of them. I am guessing the must be some nice way of solving $z= x^2 + y^2 $ ...
0
votes
1answer
30 views

$a =\prod_{i = 1}^{r} p_{i}^{ai}$ with $a_{i} > 0$ for each $i$ is the canonical representation of $a$…

$a =\prod_{i = 1}^{r} p_{i}^{ai}$ with $a_{i} > 0$ for each $i$ is the canonical representation of $a$, deduce a formula for the sum of the squares of the positive divisors of $a$. -The section we ...
-1
votes
2answers
16k views

Value of: $ \frac {1} {\sqrt {4} + \sqrt {5}} + \frac {1} {\sqrt {5} + \sqrt {6}} + … + \frac {1} {\sqrt {80} + \sqrt {81}}$ [closed]

I have the following question: Find the value of: $$ \frac {1} {\sqrt {4} + \sqrt {5}} + \frac {1} {\sqrt {5} + \sqrt {6}} + ... + \frac {1} {\sqrt {80} + \sqrt {81}}$$ The book ...
7
votes
0answers
338 views

Yet an other conjecture about odd numbers $n=a+b$ such that $a^2+b^2$ is prime

This question is related to A conjecture about an unlimited path and Any odd number is of form $a+b$ where $a^2+b^2$ is prime but I present it on its own if anyone would like to help finding ...
16
votes
1answer
232 views

A conjecture about an unlimited path

Conjecture: For all primes of the form $a^2+b^2$, there are natural numbers $s,t,u,v$ such that $\quad s^2+t^2,u^2+v^2$ are primes $\quad a+b=s+t$ $\quad u+v=s+t+2$ $\quad |s-u|+|t-v|=2$ This ...
10
votes
2answers
553 views

Finding all integers such that $a^2+4b^2 , 4a^2+b^2$ are both perfect squares

Are there any integers $a,b$, such that: $$a^2+4b^2 , 4a^2+b^2$$ are both perfect squares?
7
votes
1answer
520 views

Algorithm to find solution to $ax^2 + by^2 = 1$ in a finite field

Let $\mathbb{F}$ be a finite field, and let $a,b \in \mathbb{F}$ be given, subject to $a\ne 0, b \ne 0$. Consider the equation $$ax^2 + by^2 = 1.$$ It is guaranteed that there exists a solution to ...
3
votes
11answers
9k views

Natural number which can be expressed as sum of two perfect squares in two different ways?

Ramanujan's number is $1729$ which is the least natural number which can be expressed as the sum of two perfect cubes in two different ways. But can we find a number which can be expressed as the sum ...
12
votes
3answers
1k views

Can we prove a stronger claim?

Here it is asked whether for every $k>1$, there is a prime $p$ and $w_1,w_2,\cdots ,w_k>1$, such that $p$ divides $w_1^2+w_2^2+\cdots +w_k^2$, but none of the summands. Can we prove there is ...
7
votes
2answers
100 views

$\{a+b|a,b\in\mathbb N^+\wedge ma^2+nb^2\in\mathbb P\}=\{k>1|\gcd(k,m+n)=1\}$

Conjecture: $\{a+b|a,b\in\mathbb N^+\wedge ma^2+nb^2\in\mathbb P^{>2}\}=\{k>2|\gcd(k,m+n)=1\}$ if $m,n\in \mathbb N^+$ and $\gcd(m,n)=1$. This is a generalization of Any odd number is of form $...
4
votes
2answers
128 views

Why is a polynomial $f(x)$ sum of squares if $f(x)>0 $ for all real values of $x$? [duplicate]

If a polynomial $f(x)>0 $ for all real values of $x$, then $f(x)$ is sum of squares. Why is this true ? I understand that the roots of this $f(x)$ will be complex and hence will exist as ...
3
votes
0answers
81 views

Additive basis of order n: Sets which allow every integer to be expressed as the sum of at most n members of that set. [closed]

Every integer can be expressed as the sum of at most 3 triangular numbers. That is, the set of triangular numbers is an additive basis of order 3. The sum of the inverse triangular numbers is 2. (1/1 +...
2
votes
3answers
164 views

Solutions to a system of three equations with Pythagorean triples

Is there any solution to this system of equations where $x,y,z,s,w,t\in\mathbb{Z}$, none are $0$. \begin{align*} x^2+y^2=z^2\\\ s^2+z^2=w^2\\\ x^2+t^2=w^2 \end{align*} EDIT: Thank you zwim for the ...