cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A062803 Number of solutions to x^2 == y^2 (mod n).

This page as a plain text file.
%I A062803 #19 Jun 18 2025 01:02:11
%S A062803 1,2,5,8,9,10,13,24,21,18,21,40,25,26,45,64,33,42,37,72,65,42,45,120,
%T A062803 65,50,81,104,57,90,61,160,105,66,117,168,73,74,125,216,81,130,85,168,
%U A062803 189,90,93,320,133,130,165,200,105,162,189,312,185,114,117,360,121,122,273
%N A062803 Number of solutions to x^2 == y^2 (mod n).
%H A062803 Amiram Eldar, <a href="/A062803/b062803.txt">Table of n, a(n) for n = 1..10000</a>
%H A062803 László Tóth, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Toth/toth12.html">Counting Solutions of Quadratic Congruences in Several Variables Revisited</a>, J. Int. Seq. 17 (2014) # 14.11.6.
%F A062803 a(n) is multiplicative and, for an odd prime p, a(p) = 2*p - 1.
%F A062803 Multiplicative with a(2^e)=e*2^e and a(p^e)=((p-1)*e+p)*p^(e-1) for an odd prime p. - _Vladeta Jovovic_, Sep 22 2003
%F A062803 From _Ridouane Oudra_, Jun 17 2025: (Start)
%F A062803 a(n) = (-1)^n*gcd(n,2)*Sum_{d|n} (-1)^d*d*phi(n/d).
%F A062803 a(n) = A327767(n)*A332794(n).
%F A062803 a(2*n) = 2*A344372(n).
%F A062803 a(2*n+1) = A332794(2*n+1). (End)
%t A062803 f[2, e_] := e*2^e; f[p_, e_] := ((p-1)*e+p)*p^(e-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Sep 10 2020 *)
%Y A062803 Cf. A086933, A327767, A332794, A344372.
%K A062803 nonn,mult,easy
%O A062803 1,2
%A A062803 Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 19 2001
%E A062803 More terms from _Vladeta Jovovic_, Sep 22 2003