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.

This page as a plain text file.
%I A213991 #11 Nov 24 2021 08:22:36
%S A213991 11,24,36,72,92,126,148,183,243,291,321,391,431,461,521,639,677,764,
%T A213991 812,906,980,1040,1062,1196,1362,1414,1492,1632,1696,1836,1912,2011,
%U A213991 2097,2177,2269,2565,2667,2723,2825,3067,3145,3319,3377,3523,3699,3803,3821
%N A213991 Number of 2 X 2 0..n matrices whose square is also a 0..n matrix.
%C A213991 Row 2 of A213990.
%H A213991 Michael S. Branicky, <a href="/A213991/b213991.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..210 from R. H. Hardin)
%H A213991 Michael S. Branicky, <a href="/A213991/a213991.py.txt">Python program</a>
%e A213991 Some solutions for n=3:
%e A213991 ..1..1....0..2....0..1....1..0....1..3....0..0....0..3....0..0....0..3
%e A213991 ..0..0....1..0....1..0....0..0....0..0....0..0....0..0....0..1....1..0
%o A213991 (Python) # see linked program for a much faster version
%o A213991 from itertools import product
%o A213991 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))
%o A213991 print([a(n) for n in range(1, 31)]) # _Michael S. Branicky_, Nov 24 2021
%Y A213991 Cf. A213990.
%K A213991 nonn
%O A213991 1,1
%A A213991 _R. H. Hardin_, Jun 30 2012