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.

A213991 Number of 2 X 2 0..n matrices whose square is also a 0..n matrix.

Original entry on oeis.org

11, 24, 36, 72, 92, 126, 148, 183, 243, 291, 321, 391, 431, 461, 521, 639, 677, 764, 812, 906, 980, 1040, 1062, 1196, 1362, 1414, 1492, 1632, 1696, 1836, 1912, 2011, 2097, 2177, 2269, 2565, 2667, 2723, 2825, 3067, 3145, 3319, 3377, 3523, 3699, 3803, 3821
Offset: 1

Views

Author

R. H. Hardin, Jun 30 2012

Keywords

Comments

Row 2 of A213990.

Examples

			Some solutions for n=3:
..1..1....0..2....0..1....1..0....1..3....0..0....0..3....0..0....0..3
..0..0....1..0....1..0....0..0....0..0....0..0....0..0....0..1....1..0
		

Crossrefs

Cf. A213990.

Programs

  • Python
    # see linked program for a much faster version
    from itertools import product
    def a(n): return sum(all(k <= n for k in [a*a+b*c, a*b+b*d, c*a+d*c, c*b+d*d]) for a, b, c, d in product(range(n+1), repeat=4))
    print([a(n) for n in range(1, 31)]) # Michael S. Branicky, Nov 24 2021