OFFSET
1,7
COMMENTS
Start with M_0 = [[1]]. M_n is a 2^n X 2^n matrix. M_{n+1} is constructed from M_n as follows:
| M_n A(M_n) |
M_{n+1} = | |
| B(M_n) C(M_n) |
A - adds the corresponding x-coords to the elements of the matrix
B - subtracts the corresponding x-coords to the elements of the matrix
C - adds the corresponding y-coords to the elements of the matrix
The coordinate system sets the top-left corner to be (0, 0).
Then we take the limiting matrix {M_n}, and turn it into an integer sequence by reading it by antidiagonals.
LINKS
Bryle Morga, Table of n, a(n) for n = 1..10000
Bryle Morga, Visualization of the first 2 million terms.
EXAMPLE
M_0 = [1] by definition. Constructing M_1 goes as follows:
A(M_0) = M_0 + [0] = [1]
B(M_0) = M_0 - [0] = [1]
C(M_0) = M_0 + [0] = [1]
So we have:
| 1 1 |
M_1 = | 1 1 |
From this M_2 can be constructed:
A(M_2) = M_1+[[0, 1],[0, 1]] = [[1, 2], [1, 2]]
B(M_2) = M_1-[[0, 1],[0, 1]] = [[1, 0], [1, 0]]
C(M_2) = M_1+[[0, 0],[1, 1]] = [[1, 1], [2, 2]]
| 1 1 1 2 |
| 1 1 1 2 |
M_2 = | 1 0 1 1 |
| 1 0 2 2 |
PROG
(Python)
def expand(m):
i = len(m)
res = [[0 for _ in range(2*i)] for _ in range(2*i)]
for x in range(i):
for y in range(i):
res[y][x] = m[y][x]
res[y][x+i] = m[y][x] + x
res[y+i][x] = m[y][x] - x
res[y+i][x+i] = m[y][x] + y
return res
a = []
m = [[1]]
for _ in range(11):
m = expand(m)
for i in range(len(m)):
for j in range(i+1):
a.append(m[j][i-j])
CROSSREFS
AUTHOR
Bryle Morga, Sep 05 2024
STATUS
approved