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.

A278902 Number of 2 X 2 matrices with entries in {0,1,...,n} with determinant = trace and no entry repeated.

Original entry on oeis.org

0, 0, 0, 0, 0, 8, 12, 24, 28, 40, 48, 68, 72, 100, 120, 132, 144, 188, 208, 252, 280, 304, 336, 396, 416, 464, 512, 556, 592, 668, 704, 776, 844, 900, 960, 1020, 1056, 1148, 1240, 1308, 1348, 1456, 1524, 1628, 1728, 1792, 1872, 2004, 2080, 2188, 2292
Offset: 0

Views

Author

Indranil Ghosh, Nov 30 2016

Keywords

Comments

a(n) mod 4=0.

Crossrefs

Cf. A210286 (wherein the entries can be repeated).

Programs

  • Python
    def t(n):
        s=0
        for a in range(n+1):
            for b in range(n+1):
                for c in range(n+1):
                    for d in range(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)==a+d:
                                s+=1
        return s
    for i in range(241):
        print(str(i)+" "+str(t(i)))