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.
%I A227501 #20 Oct 13 2022 06:39:09 %S A227501 1,3,6,6,6,18,6,12,18,18,12,36,12,18,36,24,18,54,18,36,36,36,24,72,30, %T A227501 36,54,36,30,108,30,48,72,54,36,108,36,54,72,72,42,108,42,72,108,72, %U A227501 48,144,42,90,108,72,54,162,72,72,108,90,60,216,60,90,108,96 %N A227501 Number of non-congruent solutions of x^2 - xy + y^2 == 1 (mod n). %H A227501 Amiram Eldar, <a href="/A227501/b227501.txt">Table of n, a(n) for n = 1..10000</a> %F A227501 Multiplicative: If p == 2 (mod 3) then a(p^s) = (p+1)*p^(s-1); if p == 1 (mod 3) then a(p^s) = (p-1)*p^(s-1); a(3^s) = 2*3^s. %F A227501 From _Amiram Eldar_, Oct 13 2022: (Start) %F A227501 a(n) = 2 * A227128(n) if n divisible by 3, and a(n) = A227128(n) otherwise. %F A227501 Sum_{k=1..n} a(k) ~ c * n^2, where c = 2/(3 * A086724) = 0.853276... . (End) %t A227501 Eisenstein[1] = 1; Eisenstein[n_] := Length@Select[Flatten[Table[{a, b}, {a, n}, {b,n}], 1], Mod[#[[1]]^2 + #[[2]]^2 - #[[1]]*#[[2]], n] == 1 &]; Array[Eisenstein,100] %t A227501 f[p_, e_] := If[Mod[p, 3] == 2, p + 1, p - 1]*p^(e - 1); f[3, e_] := 2*3^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Oct 13 2022 *) %o A227501 (PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] == 3, 2*3^f[i,2], f[i, 1]^(f[i,2] - 1) * (f[i,1] + (-1)^(f[i,1]%3))))}; \\ _Amiram Eldar_, Oct 13 2022 %Y A227501 Cf. A086724, A227128. %K A227501 nonn,mult %O A227501 1,2 %A A227501 _José María Grau Ribas_, Jul 13 2013