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.

A278377 Number of 2 X 2 matrices with all elements in {0,1,...,n} and determinant n with no elements repeated.

Original entry on oeis.org

0, 0, 0, 4, 8, 16, 40, 36, 72, 60, 128, 92, 232, 144, 260, 284, 332, 252, 564, 324, 680, 568, 696, 492, 1184, 628, 984, 964, 1392, 796, 1920, 924, 1820, 1512, 1752, 1568, 2820, 1380, 2244, 2104, 3340, 1660, 3864, 1900, 3544, 3388, 3300, 2264, 5652, 2632, 4616
Offset: 0

Views

Author

Indranil Ghosh, Nov 20 2016

Keywords

Crossrefs

Cf. A210282 (where the matrix elements can be repeated).

Programs

  • Python
    def a(n):
        s=0
        for a in range(0, n+1):
            for b in range(0, n+1):
                for c in range(0, n+1):
                    for d in range(0, n+1):
                        if (a!=b  and a!=d and b!=d and c!=a and c!=b and c!=d):
                            if a*d-b*c==n:
                                s+=1
        return s
    print([a(n) for n in range(0, 52)]) # Indranil Ghosh, Nov 20 2016