OFFSET
1,4
COMMENTS
Let p be an odd prime number, then A(p, k) is the number of distinct quadratic residues mod p^k. Let m = p1^k1^*p2^k2*..*pz^kz with p1..pz odd primes, then A(p1, k1)*A(p2, k2)*..*A(pz, kz) is the number of distinct quadratic residues mod m. For 2^t*m is floor((2^t+10)*(1/6))*A(p1, k1)*A(p2, k2)*..*A(pz, kz) the number of distinct quadratic residues mod 2^t*m.
FORMULA
EXAMPLE
The array A(n, k) begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1, 2, 3, 6, 11, 22, 43, 86, 171, 342
2, 4, 11, 31, 92, 274, 821, 2461, 7382, 22144
2, 7, 26, 103, 410, 1639, 6554, 26215, 104858, 419431
3, 11, 53, 261, 1303, 6511, 32553, 162761, 813803, 4069011
3, 16, 93, 556, 3333, 19996, 119973, 719836, 4319013, 25914076
4, 22, 151, 1051, 7354, 51472, 360301, 2522101, 17654704, 123582922
4, 29, 228, 1821, 14564, 116509, 932068, 7456541, 59652324, 477218589
5, 37, 323, 2953, 26573, 239149, 2152337, 19371025, 174339221, 1569052981
5, 46, 455, 4546, 45455, 454546, 4545455, 45454546, 454545455, 4545454546
PROG
(PARI) A(n, k) = (n^(k+1)+n*3)\(2*n+2)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Thomas Scheuerle, Dec 23 2023
STATUS
approved