[seqfan] A096018
israel at math.ubc.ca
israel at math.ubc.ca
Sat Jun 23 02:37:46 CEST 2018
A096018 is "Number of Pythagorean quadruples mod n; i.e., number of solutions to w^2 + x^2 + y^2 = z^2 mod n."
The Formula section states:
-----------------
a(n) is multiplicative. For the powers of primes p, there are several cases. For p=2, we have a(2^k) = 2^(3k). For odd primes p with p=1 (mod 4), we have a(p^k) = p^(2k-1) (p^(k+1)+p^k-1). For odd primes p with p=3 (mod 4), there are cases for odd and even exponents: a(p^(2k+1)) = p^(4k+1) (p^(2k+2)-(p^(2k+1)-1)/(p-1)-1) and a(p^(2k)) = p^(4k-1) (p^(2k+1)-(p^(2k)-1)/(p-1)).
------------------
But this doesn't seem to work for p=7. The formulas would give a(7^(2*0+1)) = 329 and a(7^(2*1)) = 114905, but Data has a(7) = 301 and direct calculation gives a(49) = 105301.
Can anybody suggest a fix?
Cheers,
Robert
More information about the SeqFan
mailing list