Hardy-Ramanujan Journal |
We consider a q-analog r2(n,q) of the number of representations of an integer as a sum of two squares r2(n). This q-analog is generated by the expansion of a product that was studied by Kronecker and Jordan. We generalize Jacobi's two squares formula from r2(n) to r2(n,q). We characterize the signs in the coefficients of r2(n,q) using the prime factors of n. We use r2(n,q) to characterize the integers which are the length of the hypotenuse of a primitive Pythagorean triangle.