A213991 Number of 2 X 2 0..n matrices whose square is also a 0..n matrix.
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
Keywords
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
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..210 from R. H. Hardin)
- Michael S. Branicky, Python program
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
Comments