OFFSET
1,2
COMMENTS
Conjecture: a(2) = 4; if s > 1 then a(2^s) = 2^(2s-1); if p == 1 (mod 4) then a(p^s) = (p+1)*p^(2s-1); if p == 3 (mod 4) then a(p^s) = (p-1)*p^(2s-1).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..2500
L. Toth, Counting Solutions of Quadratic Congruences in Several Variables Revisited, J. Int. Seq. 17 (2014) # 14.11.6.
MATHEMATICA
a[1] = 1; a[n_] := Sum[If[Mod[a^2-b^2-c^2, n] == 1, 1, 0], {a, n}, {b, n}, {c, n}]; Table[a[n], {n, 10}]
PROG
(PARI)
M(n, f)={sum(i=0, n-1, Mod(x^(f(i)%n), x^n-1))}
a(n)={polcoeff(lift(M(n, i->i^2) * M(n, i->-(i^2))^2 ), 1%n)} \\ Andrew Howroyd, Jun 24 2018
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
José María Grau Ribas, Jul 16 2013
STATUS
approved