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 A157230 #31 Apr 13 2023 10:43:55 %S A157230 0,0,1,1,1,1,1,2,1,1,1,2,1,1,2,2,1,1,1,2,2,1,1,4,1,1,1,2,1,2,1,2,2,1, %T A157230 2,2,1,1,2,4,1,2,1,2,2,1,1,4,1,1,2,2,1,1,2,4,2,1,1,4,1,1,2,2,2,2,1,2, %U A157230 2,2,1,4,1,1,2,2,2,2,1,4,1,1,1,4,2,1,2 %N A157230 Number of primitive inequivalent sublattices of square lattice having mirrors parallel to the diagonals of the unit cell of the parent lattice of index n. %C A157230 After a(2), this matches A034380 except for n = 63, 65, 80, 85, ... - _R. J. Mathar_, Feb 27 2009 [Updated by _Andrey Zabolotskiy_, May 09 2018] %H A157230 Andrey Zabolotskiy, <a href="/A157230/b157230.txt">Table of n, a(n) for n = 1..5000</a> %H A157230 J. S. Rutherford, <a href="https://doi.org/10.1107/S010876730804333X">Sublattice enumeration. IV. Equivalence classes of plane sublattices by parent Patterson symmetry and colour lattice group type</a>, Act. Cryst. A65 (2009) 156-163, Table 5 symmetry *mm2. %F A157230 From _Andrey Zabolotskiy_, Sep 30 2018: (Start) %F A157230 a(n) = (A060594(n) - A019590(n))/2. %F A157230 a(n) = 2^(A046072(n)-1) for n>2. Thus a(n) = 1 if n>2 is in A033948, a(n) = 2 if n is in A272592, etc. (End) %t A157230 a[n_] := If[n <= 2, 0, Sum[Boole[Mod[k^2, n] == 1], {k, 1, n}]/2]; %t A157230 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Apr 12 2023 *) %Y A157230 Cf. A145393 (all sublattices of the square lattice), A019590, A157228, A157226, A157231, A304182, A060594, A046072, A033948, A272592. %K A157230 nonn %O A157230 1,8 %A A157230 _N. J. A. Sloane_, Feb 25 2009 %E A157230 New name and more terms from _Andrey Zabolotskiy_, May 09 2018