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.

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.

Original entry on oeis.org

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, 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, 2, 2, 1, 4, 1, 1, 2, 2, 2, 2, 1, 4, 1, 1, 1, 4, 2, 1, 2
Offset: 1

Views

Author

N. J. A. Sloane, Feb 25 2009

Keywords

Comments

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]

Crossrefs

Cf. A145393 (all sublattices of the square lattice), A019590, A157228, A157226, A157231, A304182, A060594, A046072, A033948, A272592.

Programs

  • Mathematica
    a[n_] := If[n <= 2, 0, Sum[Boole[Mod[k^2, n] == 1], {k, 1, n}]/2];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Apr 12 2023 *)

Formula

From Andrey Zabolotskiy, Sep 30 2018: (Start)
a(n) = (A060594(n) - A019590(n))/2.
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)

Extensions

New name and more terms from Andrey Zabolotskiy, May 09 2018