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.

A376004 Limiting matrix {m_n}, where m_0 = 1 and m_{i+1} = [[m_i, A(m_i)], [B(m_i), C(m_i)]], read by antidiagonals, and A adds the corresponding x-coords to every element, B subtracts it, and C adds the corresponding y-coords.

This page as a plain text file.
%I A376004 #38 Sep 29 2024 15:11:52
%S A376004 1,1,1,1,1,1,2,1,0,1,1,2,1,0,1,2,1,1,2,0,1,3,2,1,2,-1,0,1,5,3,1,1,-1,
%T A376004 -1,-1,1,1,5,3,1,1,-1,-1,-1,1,2,1,4,4,1,2,-2,0,0,1,3,2,1,5,1,2,3,-1,
%U A376004 -1,0,1,5,3,1,1,2,2,2,4,-1,-1,-1,1,5,5,3,1,1,3,3,3,-3,-1,-1,-1,1
%N A376004 Limiting matrix {m_n}, where m_0 = 1 and m_{i+1} = [[m_i, A(m_i)], [B(m_i), C(m_i)]], read by antidiagonals, and A adds the corresponding x-coords to every element, B subtracts it, and C adds the corresponding y-coords.
%C A376004 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:
%C A376004           | M_n     A(M_n) |
%C A376004 M_{n+1} = |                |
%C A376004           | B(M_n)  C(M_n) |
%C A376004 A - adds the corresponding x-coords to the elements of the matrix
%C A376004 B - subtracts the corresponding x-coords to the elements of the matrix
%C A376004 C - adds the corresponding y-coords to the elements of the matrix
%C A376004 The coordinate system sets the top-left corner to be (0, 0).
%C A376004 Then we take the limiting matrix {M_n}, and turn it into an integer sequence by reading it by antidiagonals.
%H A376004 Bryle Morga, <a href="/A376004/b376004.txt">Table of n, a(n) for n = 1..10000</a>
%H A376004 Bryle Morga, <a href="/A376004/a376004.png">Visualization of the first 2 million terms.</a>
%e A376004 M_0 = [1] by definition. Constructing M_1 goes as follows:
%e A376004 A(M_0) = M_0 + [0] = [1]
%e A376004 B(M_0) = M_0 - [0] = [1]
%e A376004 C(M_0) = M_0 + [0] = [1]
%e A376004 So we have:
%e A376004             |  1    1 |
%e A376004 M_1 =       |  1    1 |
%e A376004 From this M_2 can be constructed:
%e A376004 A(M_2) = M_1+[[0, 1],[0, 1]] = [[1, 2], [1, 2]]
%e A376004 B(M_2) = M_1-[[0, 1],[0, 1]] = [[1, 0], [1, 0]]
%e A376004 C(M_2) = M_1+[[0, 0],[1, 1]] = [[1, 1], [2, 2]]
%e A376004       | 1 1 1 2 |
%e A376004       | 1 1 1 2 |
%e A376004 M_2 = | 1 0 1 1 |
%e A376004       | 1 0 2 2 |
%o A376004 (Python)
%o A376004 def expand(m):
%o A376004   i = len(m)
%o A376004   res = [[0 for _ in range(2*i)] for _ in range(2*i)]
%o A376004   for x in range(i):
%o A376004     for y in range(i):
%o A376004       res[y][x] = m[y][x]
%o A376004       res[y][x+i] = m[y][x] + x
%o A376004       res[y+i][x] = m[y][x] - x
%o A376004       res[y+i][x+i] = m[y][x] + y
%o A376004   return res
%o A376004 a = []
%o A376004 m = [[1]]
%o A376004 for _ in range(11):
%o A376004   m = expand(m)
%o A376004 for i in range(len(m)):
%o A376004   for j in range(i+1):
%o A376004     a.append(m[j][i-j])
%K A376004 sign,look,tabl
%O A376004 1,7
%A A376004 _Bryle Morga_, Sep 05 2024