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.

A134506 Number of 2 X 2 singular integer matrices with elements from {1,...,n}.

Original entry on oeis.org

0, 1, 6, 15, 32, 49, 86, 111, 160, 209, 278, 319, 432, 481, 582, 703, 832, 897, 1078, 1151, 1360, 1537, 1702, 1791, 2096, 2257, 2454, 2671, 2976, 3089, 3510, 3631, 3952, 4241, 4502, 4831, 5360, 5505, 5798, 6143, 6704, 6865, 7478, 7647, 8144, 8721, 9078, 9263
Offset: 0

Views

Author

Graziano Aglietti (mg5055(AT)mclink.it), Jan 20 2008, Feb 04 2008

Keywords

Comments

a(2k) is even. a(4k+i) = i (mod 4), for i = 0, 1, 2, 3. - Aldo González Lorenzo, Oct 14 2011

Crossrefs

Cf. A059306 (similar but with elements from {0, ..., n}).

Programs

  • Mathematica
    a = {}; For[n = 2, n < 50, n++, s = 0; For[j = 1, j < n + 1, j++, For[c = 1, c < n + 1, c++, s = s + Length[Select[Divisors[c*j], # < n + 1 && c*j/# < n + 1 &]]]]; AppendTo[a, s]]; a (* Stefan Steinerberger, Feb 06 2008 *)
  • PARI
    a(n) = {my(nnb = 0); for (i=1, n, for (j=1, n, pij = i*j; for (k=1, n, for (l=1, n, if (pij == k*l, nnb++););););); nnb;} \\ Michel Marcus, Feb 03 2016
    
  • PARI
    a(n)=sum(i=1,n,sum(j=1,n,my(ij=i*j);sumdiv(ij,k, k<=n && ij/k<=n))) \\ Charles R Greathouse IV, Feb 03 2016
    
  • PARI
    a(n)=2*sum(i=2,n,sum(j=1,i-1,my(ij=i*j);sumdiv(ij,k, k<=n && ij/k<=n))) + sum(i=1,n,my(i2=i^2);sumdiv(i2,k, k<=n && i2/k<=n)) \\ Charles R Greathouse IV, Feb 03 2016

Formula

Shi proves that a(n) = kn^2 log n + cn^2 + O(n^e) where k = 12/Pi^2, e > 547/416 = 1.3149..., and c is a complicated constant given in the paper (see p. 320 and pp. 314-315). - Charles R Greathouse IV, Feb 03 2016
a(n) = A059306(n) - (2n+1)^2. - Chai Wah Wu, Nov 28 2016

Extensions

More terms from Stefan Steinerberger, Feb 06 2008
a(0) added by Chai Wah Wu, Nov 28 2016