How many ways can we write a number as the sum of 3 squares (order matters)?
How many ways can we write a number as the sum of 3 squares? \(n=a^2+b^2+c^2\) One way we can approximate this for very large values is to say: \[R^2 =a^2+b^2+c^2\] Now we can look at each of the lattice points contained in a sphere and then look at the difference in volume of a tiny piece of it in the first octant, \[f(R)=\frac{1}{8} \frac{4}{3} \pi R^3 \] in terms of n, \[f(n)= \frac{\pi}{6}n^{3/2}\] Now I look at just the region around where the points are since this difference will be where we are counting our approximation to the number of solutions to \(n=a^2+b^2+c^2\)... \[f(n+\Delta n) - f(n) \approx \Delta n f'(n) = \frac{3 \pi}{4} \Delta n \sqrt{n}\] So then let's take \(\Delta n = \frac{n}{100}\) to get: \[\frac{3 \pi n^{3/2}}{400}\] This is approximately the number of positive integer solutions to \(n=a^2+b^2+c^2\). That being said, I think this is terrible. Is there a better alternative?
I have some ideas of how to improve on this, we can get the exact generating function for the number of ways to write \(n\) as the sum of 3 squares as \(g(n)\) counting the number of times. \[\sum_{n=3}^\infty g(n)x^{-n} = \left(\sum_{k=1}^\infty x^{-k^2} \right)^3\] This is exact, but what I'd like to do is approximate that summation there: \[\sum_{k=1}^\infty x^{-k^2} = \sum_{k=1}^\infty e^{-\ln x k^2} \approx \int_0^\infty e^{-\ln x y^2} dy = \sqrt{\frac{\pi}{4 \ln x}}\] This allows me to write: \[\sum_{n=3}^\infty g(n)x^{-n} \approx \left(\frac{\pi}{4 \ln x} \right)^{3/2}\] from here, if it wasn't questionable enough, I replace \(x\) with \(x^{-1}\) to get: \[\sum_{n=3}^\infty g(n)x^{n} \approx \left(\frac{-\pi}{4 \ln x} \right)^{3/2}\] and then I recognize that if I differentiate several times and evaluate at x=0 we will get only the constant term from the power series, so: \[\frac{1}{m!} \frac{d^m}{dx^m} \left[ \left(\frac{-\pi}{4 \ln x} \right)^{3/2} \right]_{x=0} \approx g(m)\] Problem is I don't see a particularly nice choice of closed form here for that derivative.
(Assuming of course that this even works, using the integral as an approximation to a generating function seems quite suspicious to me.)
Interesting parallels here, in the first case: \[g_1(n) =\frac{3 \pi }{4} \Delta n \sqrt{n}\] in the second case: \[g_2(n) = -\frac{\pi^{3/2}}{4} \frac{1}{n!} \frac{d^n}{dx^n} [\ln^{-3/2}(x) ]_{x=0}\] I am sorta seeing that the small \(\Delta n\) and \(\frac{1}{n!}\) are kind of similar, plus we have this \(\pi/4\) term going on as well; so not entirely different looking answers.
BTW this isn't just idle fooling around, in QM the energy of a particle in a box (of which you can combine many of these to derive PV=nRT) is: \[E = \frac{h^2}{8mV^{2/3}}(a^2+b^2+c^2)\] So the number of ways you can be in a state is related to its population since the more likely it is to be occupied is what dictates how the kinetic energy is distributed in the system. The derivation I started out with is the one given in my physical chemistry textbook, but I thought it'd be interesting to see if we (me :'( ?) could improve it.
perhaps finding the proof that all numbers can be expressed as the sum of three square numbers may shed some light.
Well, just thinking about it, I would wonder 1. do they have to be distinct and rational numbers? When I see a,b,c I think integer solutions but I doubt we are limiting it to that. If we are not, then we would have infinite possibilities. 2. if strictly integer solutions, we will have values that we cannot express as 3 distinct values. Thus we limit the potential values pool. 3. assuming we have 3 distinct values, and they are integers we have infinite results. with 3! possibilities for each result comprised of primes but the potential to duplicate when we go into composites. 4. good luck! Interesting thoughts!
Yeah, it is only positive integers! Some examples of stuff that counts: There's no way to make 0, 1 or 2 because we can only use 1 and larger, so the smallest number we can make is 3. There's only one way to make 3 and it's \(3=1^2+1^2+1^2\) There are 3 ways to make 6 and they're \(6=2^2+1^2+1^2=1^2+2^2+1^2=1^2+1^2+2^2\) since order matters. In general we'll have three main kinds of solutions, \(n=3a^2\) which counts once, \(n=2a^2+b^2\) which counts 3 times, and \(n=a^2+b^2+c^2\) which counts 6 times since ordering matters. Hopefully this sheds some light into the actual problem instead of trying to approximate it; however I have a feeling there's not going to be some magical nice answer to this one since I've seen it before. The first number I know of that can be expressed as the sum of 3 squares in at least 2 unique triplets of numbers in more than one way is 27 which has these: (wew) \[27=3^2+3^2+3^2 = 5^2+1^2+1^2 = 1^2+5^2+1^2=1^2+1^2+5^2\] @Bobo-i-bo I looked for what you said and found it I think this will help thanks, gonna check this out right now! https://en.wikipedia.org/wiki/Legendre%27s_three-square_theorem Also for anyone interested in the physics side of this, scroll down to the table at the bottom. http://www.physicspages.com/2013/01/05/infinite-square-well-in-three-dimensions/
@YanaSidlinskiy
Join our real-time social learning platform and learn together with your friends!