Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sums-of-squares]

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

9
votes
0answers
148 views
+100

Standalone proof of a conditional part of Lagrange’s Four-Square Theorem?

Lagrange’s Four-Square Theorem — a special case of the Fermat-Cauchy Polygonal Number Theorem (FCPNT) — states that every natural number can be written as the sum of the squares of at most four ...
8
votes
0answers
227 views

Looking for all sequences such that $a_i^2+a_j^2=a_k^2+a_l^2$ whenever $i^2+j^2=k^2+l^2$

I'm working in a difficult functional equation, and I have reduced the problem to the following question ($\mathbb{N}$ denotes the set of non negative integers $0,1,2,3,4\cdots$) Question: Can we ...
7
votes
0answers
309 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 ...
7
votes
0answers
110 views

Applying iterated function on the sum of the squares of the prime factors of $30$

Let $f(n)$ denote the sum of the squares of the prime factors of $n$ with multiplicity. For example, $f(60)=f(2\cdot2\cdot3\cdot5)=2^2+2^2+3^2+5^2=42$. Denote the iterated function $f^k(n)=\...
6
votes
0answers
156 views

Which primes $\mathfrak{p}$ can be written as sums of two squares in $\mathbb{Q}(\sqrt[3]{2})$?

which primes $\mathfrak{p}$ can be written as sums of two squares in $\mathbb{Q}(\sqrt[3]{2})$? I am asking to solve an equation: $$ \mathfrak{p} = \big(a_1+a_2\sqrt[3]{2}+a_3\sqrt[3]{4}\big)^2 + \...
5
votes
0answers
115 views

Odd of the form $a^2+b^2+c^2+ab+ac+bc$.

The computation below shows that (for $a,b,c \in \mathbb{N}$) the form $$a^2+b^2+c^2+ab+ac+bc$$ covers every odd integer less than $10^5$ except those in $$I= \{ 5, 15, 23, 29, 41, 53, 59, 65, ...
5
votes
0answers
366 views

Probability of having at least $j$ collisions when tossing $m$ balls into $n$ bins

Suppose that we throw $m$ balls into $n$ bins uniformly and independantly at random. We consider collisions as distinct unordered pairs, e.g., if 3 balls are tossed in one bin, we count 3 collisions. ...
4
votes
0answers
75 views

Can a positive polynomial on sphere be represented as the sum of squares of spherical harmonics

Let $p\in {\mathbb{R}}[x_1,\ldots, x_d]$ be a homogenous polynomial degree $2n$. We know that if $p$ is positive on $[-\pi,\pi]^d$, $p$ is sum of squares polynomial, i.e. $p$ can be witten as sum of ...
4
votes
0answers
151 views

Iterations of $x^2 + y^2$

We construct a sequence $S$ of distinct positive integers as follows 1) the sequence $S$ starts as $1,2,3$ 2) If $x,y$ are in the sequence , then $x^2 + y^2 $ is also in the sequence. 3) the ...
4
votes
0answers
132 views

Even numbers has the form $a+b$ where $\frac{a^2+b^2}{2}$ is prime

Conjecture: All even numbers $n>2$ can be written $n=a+b$ where $a,b\in\mathbb N^+$ and $\frac{a^2+b^2}{2}\in\mathbb P$. Is tested for $n<10,000,000$. This conjecture is related to and maybe ...
4
votes
0answers
752 views

Gauss' “Eureka” theorem

Gauss proved that every integer is expressible as the sum of three triangular numbers. I was wondering if the proof is anywhere to be found?
3
votes
0answers
67 views

Proof algorithm to find representations as sum of two squares

I saw in a book the following algorithm to find, given a prime $p\equiv 1 \pmod 4$, integers $a $ and $b $ such that $p=a^2+b^2$. Step 1 : Find an integer $0 <m <p$ such that $m^2\equiv -1\...
3
votes
0answers
80 views

Express Integer as the sum of $k$ squares

I'm looking for a way to efficiently determine the solutions ( i.e. sets of $x_1^2, x_2^2, ..., x_k^2 $ ) that satisfy     $$n^2 = x_1^2 + x_2^2 + x_3^2 + ... + x_k^2 $$ $$x_1, x_2, ...,...
3
votes
0answers
1k views

How to prove Sum of squares of $n$ numbers is unique

I was solving a programming problem where I needed to prove that sum of squares of $n$ numbers is unique. i. e. if calculate the sum of squares of equal number of positive integers then if they are ...
2
votes
0answers
287 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 ...
2
votes
0answers
216 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."...
2
votes
0answers
73 views

Sums of descending squares

I am interested in integers that can be expressed as a sum of squares. Specifically I am interested in integers that can be expressed as follows: $n=6*Sum (k^2+(k-a)^2+(k-2a)^2.....1^2)$ These ...
2
votes
0answers
85 views

Hard for-all-integer-problems proveable for very great integer limits

Computational experiments suggests the conjecture: All big enough odd numbers $N$ is of the form $N=\sum_{k=1}^n m_k$, where $\sum_{k=1}^n m_k^2$ is prime and all $m_k\in\mathbb Z^+$. Since the ...
2
votes
0answers
103 views

Sums of more than one combination of squares.

I'm interested in examples like these, where the sum of $n$ squares equals the sum of another $n$ squares. $3^2 + 11^2 \quad = \quad 7^2 + 9^2 \quad = \quad 130$ $5^2 + 6^2 + 10 ^ 2 \quad = \quad 4^...
2
votes
0answers
781 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 ...
2
votes
0answers
57 views

Definite sum of a decreasing series

can we find a closed form for following sum: \begin{equation} \sum_{i=0}^{n} a^{i^2} = a^0 + a^1 + a^4+a^9 +...a^{n^2} \end{equation} where $0<a<1$ , what if $n \rightarrow \infty$ ?
2
votes
0answers
35 views

Nonnegative vs SOS

Consider the polynomial $f(x_1, \cdots, x_n)$, I want to characterize $f$ being nonnegative, i.e., $f\geq 0$. For $n=1$, this is equivalent to saying that $f$ is SOS (sum of square). However, in ...
2
votes
0answers
649 views

Which integers are a sum of two relatively prime squares?

It's well known that a positive integer $n$ is a sum of two squares if and only if every prime of the form $4m + 3$ that divides $n$ appears with even multiplicity in the prime factorization of $n$. ...
2
votes
0answers
55 views

Polynomial Density Theorem

So I was consider Lagrange's 4-square theorem and came up with this generalization: Given a polynomial with rational coefficients $$P(x) = a_0 + a_1x + ... + a_nx^n$$ Determine if there exists ...
2
votes
0answers
126 views

Showing a Hermitian preserving map is not necessarily positivity preserving?

Say I have a linear map, which is not positivity preserving $$\phi: \mathscr H \to \mathscr H$$where $\mathscr H$ is the set of $n \times n$ Hermitian matrices. Then does there exist a positive ...
1
vote
0answers
92 views

Numbers that are the sum of 2 distinct nonzero squares in exactly 1 way

Is there a formula that says if a number is the sum of 2 distinct nonzero squares ? This is the sequence I'm trying to emulate: 5, 10, 13, 17, etc.. http://oeis.org/A004431 (Invalid it contains 85, ...
1
vote
0answers
57 views

$\exists\infty$ many pairs of consecutive squares s.t. their sum is also a square

First of all, the term "pairs" is two of them, I assume (question's formulation is rather difficult to understand for me). So I guess this is the statement: $$\exists\infty\text{ many pairs of ...
1
vote
0answers
38 views

why sum of squares equals to assign the variable evenly in linear programming

I have a quesiton about linear programming. My objective is trying to make the utilization evenly. Example $U_{1}, U_{2},...,U_{k} $ $\sum_{i=1..k} U_{i} = C $ $C$ is some constant. $U_{i}$ is ...
1
vote
0answers
79 views

Can Gauss-Newton algorithm give better optimization performances than Newton algorithm?

I am currently facing the problem of a robotic manipulator calibration: the goal is to find the best correction that must be applied to a set of kinematic parameters describing the robot model, in ...
1
vote
0answers
150 views

How to interpret this visual proof for Archimedes' derivation of Sum of Squares?

I'm interested in knowing how was the first closed form solution of the sum of squares derived (for historical context/curiosity). I stumbled across an MAA Page that provides a visual proof, without ...
1
vote
0answers
87 views

The sum of the squares of $5$ consecutive primes is again prime. True for infinite many quintuples?

Let $(p,q,r,s,t)$ be a quintuple of consecutive primes. Are there infinite many such tuples such that $$p^2+q^2+r^2+s^2+t^2$$ is prime again ? Motivation : $p^2$ is never prime $p^2+q^2$ is ...
1
vote
0answers
55 views

Finding the pdf of sum of squared weighted gaussian variables

I have 3 sets of weighted gaussians that are part of 3 different Gaussian Mixture Models, phi1,phi2 and phi3. phi1 has n1 gaussian components with weights wj, mean mu_j and variance eta_j_squared, j ...
1
vote
0answers
89 views

Product of SOS polynomials in the Gram matrix form by odd degree monomials.

This might be elementary, but I'm struggling to write the product of a sums of squares polynomial and an odd power of a variable using its Gram matrix. Following Pablo Parrilo's notation, let $p(x,y):...
1
vote
0answers
35 views

Can someone show me a simple example of finding simple squared error in k-means?

I'm working on some homework and one of our assignments asks us to find the final mean of each cluster and the SSE (sum of squared error). I haven't been able to find anything online and was wondering ...
1
vote
0answers
161 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 ...
1
vote
0answers
129 views

Primes as sum of squares in finite field

Is there an algorithm to find integers such that the following holds true : ${a_1}^2 + {a_2}^2 \dots + {a_k}^2 \equiv p $ $(mod $ $n)$, where $p$ is a prime and $n$ is any general integer. By ...
1
vote
0answers
65 views

The largest “root-sum” in a four-square representation

Well-known is the fact that every natural number can be represented as the sum of four integer squares — this proposition is often called Lagrange’s four-square theorem. Perhaps less well-known is ...
1
vote
0answers
54 views

Is this fraction a natural number only in case ${n_1}^2+{n_2}^2+{n_3}^2={m_1}^2+{m_2}^2+{m_3}^2$?

Suppose that $m_1,m_2,m_3,n_1,n_2,n_3 \in \mathbb N$ and $m_1<m_2<m_3$ and $n_1<n_2<n_3$. If $\dfrac {{n_1}^2+{n_2}^2+{n_3}^2-3}{{m_1}^2+{m_2}^2+{m_3}^2-3}$ is a natural number, ...
1
vote
0answers
47 views

Linear Regression: Fitting a cubic polynomial model in R and comparison with quadratic fit

Let $Y_i=\beta_0 +\beta_1 x_i+\beta_2 x_i^2+\beta_3 x_i^3+\epsilon^2$ I need to plot the model: $E(Y)=\gamma_0+\gamma_1(x)+\gamma_2(x^2-4)+\gamma_3(x^3-7x)$ (Orthogonal polynomials) ...
1
vote
0answers
86 views

How is distributed the sum of square of correlated z-score?

I have a $1\times k$ matrix representing $z$-scores and each element is correlated to each other according to a covariance matrix $\Sigma$. I would like to compute their sum of square and to know the ...
1
vote
0answers
840 views

Sum of Residuals equal to Zero

It is clear that running a regression, the sum of Residuals should equal Zero. I also understand that when running a weighted regression the sum of weighted Residuals should equal Zero. My model is ...
1
vote
0answers
111 views

Generalizing Landau-Ramanujan Theorem for sum of three squares

Let $S_{3}(x)$ denote the number of positive integers not exceeding x which can be expressed as a sum of three squares. Can we find an asymptotic formula for $S_{3}(x)$, maybe using Landau-Ramanujan ...
1
vote
0answers
29 views

From 4 squares to 2 squares

Let $r_k(n)$ denote the number of representations of $n$ as a sum of $k$ squares of integers. Suppose I know that $r_4(n) = 8\sum_{4 \nmid d \mid n} d$ (Jacobi's Theorem). Is there a way to deduce ...
1
vote
0answers
79 views

Integer $2n^2+2$ as the sum of 2,3,4, and 5 squares

If $n-1$ and $n+1$ are both primes, establish that the integer $2n^2+2$ can be represented as the sum of 2, 3, 4, and 5 squares. I managed to solve 2 and 4 squares, since: $$2n^2+2 = (n+1)^2+(1-n)^2= ...
1
vote
0answers
83 views

On Catalan's complete solution to the equation $T^2=U^2+V^2+W^2$

Catalan proved the following: If $t,u,v,w$ are coprime integers such that \begin{equation*} t^2 = u^2 + v^2 + w^2, \end{equation*} then there exist integers $\alpha,\beta,\gamma,\delta$ such that \...
1
vote
0answers
283 views

Sum of two squares - Number of steps in Fermat descent

If a prime $p$ can be written as the sum of two squares, then one can construct this representation via Fermat descent if we know an $x$ such that $x^2 \equiv -1 \mod p$. Is there a possibility to say ...
1
vote
0answers
64 views

Given a closed form for a series, what can be said about the sum of the squares of its terms?

Suppose I have an integer sequence $\{a_k\}$, and suppose I know a closed form in terms of $n$ for this sum: $$\displaystyle\sum\limits_{k=1}^{n} a_k$$ Given this, is it always (or ever) possible to ...
1
vote
0answers
126 views

When $Ax^2+By^2=z^2$ has a solution in integers?

Consider the Diophantine equation $Ax^2+By^2=z^2$, with positive integer parameters $A$ and $B$ (not necessarily square-free or co-prime). When does this equation have a non-trivial solution? Can one ...
1
vote
0answers
276 views

Prove the inequality $\sum_{i,j = 1}^n {{A_{i,j}}({x_i}^2 - {x_i}{x_j})} \ge 0 $

A is a square matrix with positive elements and x is a real vector (both of them n>1 dimensional). Prove that for any such matrix and vector $$\sum\limits_{i,j = 1}^n {{A_{i,j}}({x_i}^2 - {x_i}{x_j})} ...
1
vote
0answers
472 views

Optimization: Minimizing Quadratic Vector Valued Functions

I have a vector valued function $F: \mathbf{R}^{n} \rightarrow \mathbf{R}^{m}$, which consists of quadratic taylor approximations. So one could say that function F consists of stacked approximations ...