OFFSET
0,3
COMMENTS
We encode an n X n binary matrix reading it antidiagonal by antidiagonal, starting from the least significant bit. A given entry in the sequence therefore represents the infinite family of n X n matrices that can be obtained by adding zero antidiagonals. All of these matrices are symmetrical. This encoding makes it possible to obtain a sequence rather than a table.
LINKS
Philippe Beaudoin, Table of n, a(n) for n = 0..10000
FORMULA
a((2n+1)*2^(k-1)) = a(n*2^k) + a(2^(k-1)) for n >= 0 and k >= 1. - Eric Werley, Sep 13 2015
EXAMPLE
391 = 0b110000111 encodes all square matrices with the first four antidiagonals equal to ((1), (1, 1), (0, 0, 0), (0, 1, 1, 0)), for example, the 3 X 3 matrix:
1 1 0
1 0 1
0 1 0
and the 4 X 4 matrix:
1 1 0 0
1 0 1 0
0 1 0 0
0 0 0 0
and all larger square matrices constructed in the same way. Since 391 is in the sequence, all these matrices are symmetrical.
MATHEMATICA
b[n_] := Select[ Tuples[{0, 1}, n], # == Reverse@ # &]; FromDigits[#, 2]& /@ Join @@@ Tuples[ b/@ Range[7, 1, -1]] (* Giovanni Resta, Aug 12 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Philippe Beaudoin, Aug 11 2015
STATUS
approved