OFFSET
0,2
COMMENTS
EXAMPLE
Consider a(0) = 1 as a 1 X 1 matrix, replace the 1 by the 3 X 3 matrix E = [1,1,1; 1,0,1; 1,1,1], then this matrix is the result. Concatenating all elements yields a(1) = concat(111,101,111) = 111101111.
Now reconsider a(1) as the previously given 3 X 3 matrix E. Replace every 1 by that same matrix E. This yields the 9 X 9 matrix
[ 1 1 1 1 1 1 1 1 1 ]
[ 1 0 1 1 0 1 1 0 1 ]
[ 1 1 1 1 1 1 1 1 1 ]
[ 1 1 1 0 0 0 1 1 1 ]
[ 1 0 1 0 0 0 1 0 1 ]
[ 1 1 1 0 0 0 1 1 1 ]
[ 1 1 1 1 1 1 1 1 1 ]
[ 1 0 1 1 0 1 1 0 1 ]
[ 1 1 1 1 1 1 1 1 1 ].
Concatenating all elements yields a(2) = 111111111101101101111111111111000111101000101111000111111111111101101101111111111.
MATHEMATICA
A293973[n_]:=FromDigits[Flatten[Nest[ArrayFlatten[{{#, #, #}, {#, 0, #}, {#, #, #}}]&, {{1}}, n]]]; Array[A293973, 4, 0] (* Paolo Xausa, May 12 2023 *)
PROG
(PARI) a(n, A=Mat(1), E=2^9-1-2^4)={for(k=1, n, A=matrix(3^k, 3^k, i, j, A[(i+2)\3, (j+2)\3]&&bittest(E, (i-1)%3*3+(j-1)%3))); fromdigits(apply(t->fromdigits(t~, 10), Vec(A)), 10^3^n)}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Oct 20 2017
STATUS
approved