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.

A059306 Number of 2 X 2 singular integer matrices with elements from {0,...,n}.

Original entry on oeis.org

1, 10, 31, 64, 113, 170, 255, 336, 449, 570, 719, 848, 1057, 1210, 1423, 1664, 1921, 2122, 2447, 2672, 3041, 3386, 3727, 4000, 4497, 4858, 5263, 5696, 6225, 6570, 7231, 7600, 8177, 8730, 9263, 9872, 10689, 11130, 11727, 12384, 13265, 13754, 14703
Offset: 0

Views

Author

John W. Layman, Jan 25 2001

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := Table[{w, x, y, z} /. {ToRules[ Reduce[0 <= x <= n && 0 <= y <= n && 0 <= z <= n && w*z - x*y == 0, {x, y, z}, Integers]] }, {w, 0, n}] // Flatten[#, 1]& // Length; Table[Print[an = a[n]]; an, {n, 0, 42}] (* Jean-François Alcover, Oct 11 2013 *)
  • Python
    from math import gcd
    def A059306(n): return (2*n+1)*(n+1) + 4*sum(gcd(i, j) for i in range(1, n+1) for j in range(i, n+1)) # David Radcliffe, Aug 13 2025

Formula

a(n) = A134506(n) + (2n+1)^2. Shi's result (see formula section in A134506) shows that a(n) = kn^2 log n + cn^2 + O(n^e) where k = 12/Pi^2, e > 547/416 = 1.3149..., and c = 4.5113... - Chai Wah Wu, Nov 28 2016
a(n) = 4*A272718(n) + 2*n^2 + 3*n + 1. - David Radcliffe, Aug 13 2025

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jan 09 2003