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 A385104 #13 Jun 25 2025 10:19:43 %S A385104 1,1,1,1,2,0,2,2,0,0,1,2,0,0,2,1,2,0,1,2,0,1,2,2,0,2,0,0,2,4,0,0,2,0, %T A385104 0,0,3,2,0,0,2,0,0,2,0,1,2,0,0,2,1,2,0,0,2,1,2,0,2,2,2,0,0,0,2,0,2,4, %U A385104 0,0,4,0,0,0,0,2,0,0,1,2,0,2,2,0,0,0,0,2,2,0,2,1,2,2,0,2,0,0,1,2 %N A385104 Triangle read by rows: T(n,k) is the number of residue classes obtained by solving mod(x^2,n) = k for x over the integers, n >= 1, k >= 0. %C A385104 The sum of each row is n. %H A385104 Jason Bard, <a href="/A385104/b385104.txt">Table of n, a(n) for n = 1..11325</a> %F A385104 T(n,0) = A000188(n). %F A385104 T(n,1) = A060594(n). %F A385104 T(n,n-1) = A000089(n). %e A385104 Triangle starts: %e A385104 1 %e A385104 1 1 %e A385104 1 2 0 %e A385104 2 2 0 0 %e A385104 1 2 0 0 2 %e A385104 1 2 0 1 2 0 %e A385104 1 2 2 0 2 0 0 %e A385104 2 4 0 0 2 0 0 0 %e A385104 3 2 0 0 2 0 0 2 0 %e A385104 1 2 0 0 2 1 2 0 0 2 %e A385104 ... %t A385104 dat[n_] := Table[Reduce[Mod[x^2, n] == k, x, Integers], {k, 0, n - 1}]; countConditions[cond_] := Which[cond === False, 0, MatchQ[cond, x \[Element] Integers], 1, True, Length@Cases[cond, Equal[x, _], Infinity]]; counts = Flatten[Table[countConditions /@ dat[n], {n, 1, 20}]] %o A385104 (PARI) T(n, k) = sum(i=1, n, Mod(i,n)^2 == k); %o A385104 row(n) = vector(n, i, T(n, i-1)); \\ _Michel Marcus_, Jun 23 2025 %Y A385104 Cf. A000089, A000188, A060594, A096008. %K A385104 nonn,tabl %O A385104 1,5 %A A385104 _Jason Bard_, Jun 18 2025