OFFSET
1,5
COMMENTS
A coincidence site lattice (CSL), or coincidence sublattice, is a full-rank sublattice arising as an intersection of the parent lattice with its copy rotated around the origin. It is necessarily primitive.
A primitive sublattice of the square lattice is a CSL if it is square (i. e., similar to the parent lattice) and has odd index.
In this sequence, any two CSLs differing by any isometry are counted as distinct.
a(n) is also the number of ordered pairs of coprime integers (p, q) with p >= 0 and q > 0 such that p^2 + q^2 = n^2.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Michael Baake and Peter Zeiner, Geometric enumeration problems for lattices and embedded Z-modules, arXiv:1709.07317 [math.MG], 2017; in: Aperiodic Order, vol. 2: Crystallography and Almost Periodicity, eds. M. Baake and U. Grimm, Cambridge University Press, Cambridge (2017), pp. 73-172.
FORMULA
Multiplicative with a(p^e) = 2 if p == 1 (mod 4), otherwise 0.
a(4*n+1) = A031358(n), other terms are 0.
a(n) = 2 * A024362(n) for n > 1.
From Amiram Eldar, Oct 23 2023: (Start)
Dirichlet g.f.: Product_{primes p == 1 (mod 4)} (1 + 1/p^s)/(1 - 1/p^s).
Sum_{k=1..n} a(k) = (1/Pi) * n + O(sqrt(n)*log(n)).
(both from Baake and Zeiner, 2017) (End)
EXAMPLE
a(5) = 2 index-5 CSLs have bases (2, 1), (-1, 2) and (1, 2), (-2, 1).
MATHEMATICA
csl[1] = 1;
csl[n_] := With[{f = First@Transpose@FactorInteger@n}, If[Union@Mod[f, 4] == {1}, 2^Length@f, 0]];
Array[csl, 87]
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 1]%4 == 1, 2, 0)); } \\ Amiram Eldar, Oct 23 2023
CROSSREFS
Cf. A031358 (nonzero quadrisection), A004613 (positions of nonzero terms), A024362, A154269, A338690, A271102.
KEYWORD
nonn,mult
AUTHOR
Andrey Zabolotskiy, Jan 20 2022
STATUS
approved