Questions tagged [sums-of-squares]

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

108 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
55 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
51 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
90 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
847 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
116 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
83 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
84 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
1answer
74 views

Mutual difference of vectors squared, does it have a name?

Given a set of $n$ vectors $\def\vv{\vec{v}} \vv_i$ with the additional property that they all have the same absolute value $||\vv_i||=c$, define the average of the vectors as $\vv = \frac{1}{n}\sum_{...
1
vote
0answers
287 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
1answer
95 views

Application of the Jacobian

I have been stuck on this question for a while now to no success. Help would be appreciated. Consider $x$ and $y$ such that $(x, p) =(y, p) = 1$. For what $p$ does their exist $x$ and $y$ such ...
1
vote
0answers
136 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
476 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 ...
1
vote
1answer
206 views

SOS relaxations for polynomial optimization

I do not understand how SOS (Sum-Of-Squares) relaxation for polynomial optimization works in some cases. For instance, consider the polynomial optimization problem: \begin{equation} \begin{array}{c}...
0
votes
0answers
46 views

How often can a number be written as a linear combination of the squares of its prime divisors?

Peter asked here "Can a number be equal to the sum of the squares of its prime divisors?" and, it seems clear that if $$n=p_1^{a_1}\cdots p_k^{a_k},$$ and $$f(n):=p_1^2+\cdots+p_k^2$$ that then $n=f(n)...
0
votes
0answers
36 views

Gauss' Proof of Lagrange Four-Square Theorem?

I read recently that Gauss provided a proof of Lagrange's Four-Square Theorem using his ideas about equivalence classes of quadratic forms (i.e. linear substitution of variables) somehow applied to $w^...
0
votes
0answers
29 views

ternary quadratic form as a sum two squares of linear forms

Let $\phi(x,y)=ax^2+2bxy+cy^2$ be a binary quadratic form with integer coefficients. Pall proved in 1951 that $\phi(x,y)$ can be written as the sum of two squares of two linear forms if and only if $...
0
votes
0answers
21 views

What is a closed form partial sum formula for the q-digamma function?

It is known that the partial sum of the digamma function can be expressed in closed form, but what of the q-digamma function? $$\sum_{x=1}^n\psi_q{\small(x)}\ =\ ?$$ $$q\in\mathbb N$$
0
votes
0answers
141 views

Can factoring with the sum of 4 squares be made more efficient?

We have seen that it was possible to use the sum of two squares to factor numbers (see Can the sum of two squares be used to factor large numbers? ) The main drawback is the fact that the method ...
0
votes
0answers
17 views

How to calculate $\sum_{i=0}^N\lfloor ai\rfloor^2$ for $0<a<1$ and $N\approx10^{16}$?

I have an irrational number $0<a<1$ for which I need to calculate the sum $$\sum_{i=0}^N\lfloor ai\rfloor^2\mbox{ mod }m.$$ Here $m$ is an $8$-digit number and $N$ is a $15$-digit number. The ...
0
votes
0answers
135 views

Primality test using the sum of 2 squares representation of a prime $p^2= a^2+b^2$

We have seen that the sum of two squares (2 sq rep) of an integer $N^2$ can be used to factor $N$. Can the sum of two squares be used to factor large numbers? Here we use the same method to show ...
0
votes
0answers
28 views

Find the next least number N that is N+1 = X^2 and (N/2)+1 = y^2?

To go with this following task to create a proper equation ? Many numbers, especially from smaller ones, can rightly claim that they are of particular interest to scientists. In the kingdom of ...
0
votes
0answers
29 views

Does bounded version of Lagrange's 4-square theorem follow from this result?

Let $S_4(n)$ be the number of ways of representing $n$ as a sum of 4 integer squares and suppose I can give you a proof of the result that $\sum_{i=1}^nS_4(i) \sim \frac{\pi^2}{2}n^2$. Is this result ...
0
votes
0answers
30 views

What is the error propagation for $r = \sqrt{a^2+b^2}$ if the error in $\delta a$ and $\delta b$ are known?

Suppose I have some value $r$ which is defined as $$r = \sqrt{a^2+b^2}$$ where $a$ and $b$ have errors of $\delta a $ and $\delta b$, respectively. What is $\delta r$? Using "standard" error ...
0
votes
0answers
39 views

How to find how similar two vectors are, while giving weight to their lengths?

I asked a question about this yesterday and got a really good response! Apparently I should use the euclidian (sum of squares) distance between the two vectors. This works well, but I'm having a bit ...
0
votes
0answers
43 views

Optimization of sum of squares over permutations

Suppose I have fixed, positive values $n_1, \cdots, n_\ell$ and $T$. I'm looking for an algorithm to optimize \begin{align*} f(\boldsymbol{n}) = T\left(\sum_{j=1}^{\ell}\left(\sum_{i=1}^{j}n_i\right)^...
0
votes
0answers
68 views

How many numbers up to $x$ are sums of two squares?

I know that the primes which are representable as a sum of two squares are a specific type of prime, that is, $p=4k+1$, where $k$ is a positive integer. and from this, I could deduce which integers ...
0
votes
1answer
246 views

Matrix notation for weighted sum of squares

While going through page 1 of Lecture 24: Weighted and Generalized Least Squares [PDF], I got the following questions. Weighted sum of squares is defined as below: $$ \sum_{i = 0}^{n}{w_i(Y_i - X_ib)...
0
votes
1answer
24 views

What the difference is between TypeI/II/III SS in ANOVA?

My background is not mathematics and I do not really understand what this mathematical symbols means: Type I SS: SS(A) SS(B|A) SS (AB|A, B) Type II SS: SS(A|B) SS(B|A) SS (AB|A, B) Type III SS: SS (A|...
0
votes
1answer
47 views

Confusion about sum of squares.

First, I want to declare that this problem have been solved by myself, I just want to share my work to everyone. It has known that a prime has the form $4k+3$ cannot be sum of two squares, and also a ...
0
votes
0answers
33 views

Is there reference sheets or techniques to writing numbers as sums of squares?

For example if I wanted to write $x$ as the sum of $n$ squares in $m$ different ways, is there something I can just look up? Also I have other constraints with what I am working with, if I knew $x$ I ...
0
votes
1answer
49 views

Five Trig Functions who's squares add to a constant?

I was trying to think of a set of five trig functions in which the first trig function is multiplied by some constant a, the second by a different constant b, the third by a different constant c, the ...
0
votes
1answer
1k views

How to compute SSR with just residuals and Xi?

How do we calculate SSR? I know SSE is the square of residuals all added together, but SSR is a subtraction between prediction for each observation and the population mean. Not sure how calculate SSR. ...
0
votes
1answer
40 views

Explain the following derivation

Can you explain the derivation in the given image? Which steps lead to the incorrect conclusion?
0
votes
1answer
786 views

Put quadratic form into sum of squares

Is there a method or process that doesn't require a matrix to put quadratic forms into a sum of squares ? Two examples that I find extremely challenging. i) $q(x, y, z) = (x − y) ^2 + (y − z) ^2 − ...
0
votes
0answers
63 views

Why $a^4 + b^4$ ($a, b$ are positive integers) is not a perfect square?

I've realized that there are maybe no positive integers $(a, b)$ that $a^4 + b^4$ is a perfect square, because I tested for $a, b \le 10000$ and cannot find any solution. I think that's weird, and ...
0
votes
1answer
266 views

Are the 4 square representations of a sum of 4 squares of an integer equivalent?

Every integer $N$ can be represented by a sum of 4 squares $N=a^2+b^2+c^2+d^2$. We usually have more than one representation for a given integer N. For example $7*13=91$ has the following ...
0
votes
0answers
101 views

Proof verification: Alternative proof of Lagrange's four square theorem.

We assume Fermat's two-square theorem to begin with. Note that, in our proof, the terms numbers and natural numbers are everywhere taken to mean nonnegative integers. Lemma 1: The product of two ...
0
votes
1answer
33 views

Extract zero from 2D polynomial

If I have simple polynomial like this: $12 - 8 x - x^2 + x^3$ and I know that it has zero at x=2, I can get Taylor series near x=2, which is $5(x-1)^2$ and I get this picture: So in 1D case I can ...
0
votes
0answers
44 views

Can someone prove this? Difference between two exponents sum

$$y^n-x^m-\int^{n}_{m}x^\phi\ln{x}\text{ d}\phi\doteq\sum^{n}_{i=1}\sum^i_{\rho=0}\left((-1)^\rho\cdot\frac{\prod\limits_{j_1=\rho+1}^{i}(j_1)}{(i-\rho)!y^\rho}y^ix^\rho\right)\frac{\prod\limits_{j_2=...
0
votes
0answers
69 views

Problem on Natural numbers and perfect squares

What is the smallest natural number to be added to the natural number $n$ to make it a perfect square?
0
votes
1answer
36 views

Composition formula for $ax^2 \pm by^2$

It is well known that $(x^2+y^2)(u^2+v^2)=(xu+yv)^2 + (xv-uy)^2$, thus it suffices to characterize the primes $p$ with $x^2+y^2=p$. Are there any similar composition formulae for $ax^2+by^2$ and $ax^2-...
0
votes
0answers
389 views

A simple algorithm for representing a square of the form $4k+1$ as a sum of 3 squares

Let's start with an example, $N=n^2=7^2=49$. $49$ can also be produced by simply writing $49= (6+1)^2 = 36 + 2\cdot6 + 1 = 36 + 13$. So if we can find a way to represent 13 as a sum of two squares, we ...
0
votes
0answers
59 views

A method to study the factorization of very big numbers

Is there a method to construct very big numbers in a given interval, with rectangular distribution, by selecting prime factors randomly? I want to study factorizations of the kind $a=b\cdot c$, where ...
0
votes
0answers
50 views

Given A number N conver it to 2 square form

I have a number N i want to subtract square of x from N , where x is any integer ...
0
votes
0answers
65 views

Density and SOS polynomials

Is the set of sum of square (SOS) polynomials dense (in a sense to precise) in the set of non negative polynomials of degree less than $d$? I don't even know how to ask a well posed question... here ...
0
votes
1answer
64 views

How to prove that there is No solution

Let $d$ be a square-free positive integer $d>1$. Then there are no integers $x,y,z,t,a,b,c$ with $x\neq \pm z$, and $xt-yz\neq 0$ such that: $$\begin{cases} x^2+y^2=a^2 d \\ z^2+t^2=b^2 d \\ (x-z)^...
0
votes
1answer
58 views

How can I prove $Q(x,y,z)=x^{2}+y^{2}+z^{2}$ represents integer mod p?

p is an odd prime. Clearly Q represents all squares modulo p and all integers divisible by p, so the problem is really just the nonsquares modulo p. I started by letting $t$ be the smallest ...