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 A256452 #20 Aug 18 2024 11:45:55 %S A256452 1,1,1,1,3,1,1,1,1,3,1,1,3,1,3,1,3,1,1,3,1,1,1,1,5,3,1,1,3,3,1,1,1,3, %T A256452 3,1,3,1,3,3,3,1,1,1,3,1,1,1,1,5,3,3,3,1,3,1,1,3,1,3,3,1,1,1,9,1,1,3, %U A256452 1,3,1,1,3,3,5,1,1,3,1,3,1,3,1,1,9,1,3 %N A256452 Number of integer solutions to n^2 = x^2 + y^2 with x>0, y>=0. %H A256452 Amiram Eldar, <a href="/A256452/b256452.txt">Table of n, a(n) for n = 1..10000</a> %F A256452 Multiplicative with a(p^e) = 2*e + 1 if p == 1 (mod 4), otherwise a(p^e) = 1. %F A256452 a(n) = 1 + 2*A046080(n) if n>0. %F A256452 a(n) = A046109(n)/4 for n > 0. - _Hugo Pfoertner_, Sep 21 2023 %F A256452 a(n) = A002654(n^2). - _Ridouane Oudra_, Aug 18 2024 %p A256452 a:= n-> add(`if`(d::odd, (-1)^((d-1)/2), 0), d=numtheory[divisors](n^2)): seq(a(n), n=1..100); # _Ridouane Oudra_, Aug 18 2024 %t A256452 a[ n_] := Sum[ Mod[ Length@Divisors[n^2 - k^2], 2], {k, n}]; %t A256452 a[ n_] := Length @ FindInstance[ n^2 == x^2 + y^2 && x > 0 && y >= 0, {x, y}, Integers, 10^9]; (* _Michael Somos_, Aug 15 2016 *) %t A256452 f[p_, e_] := If[Mod[p, 4] == 1, 2*e + 1, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Sep 12 2020 *) %o A256452 (PARI) {a(n) = sum(k=1, n, issquare(n^2 - k^2))}; %Y A256452 Cf. A046080, A046109, A002654. %K A256452 nonn,mult %O A256452 1,5 %A A256452 _Michael Somos_, Mar 29 2015