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.

A368148 Square array A(n, k), n, k > 0, read and filled in the greedy way by upwards antidiagonals such that A(n, k) corresponds to the size of the connected component (relative to the Von Neumann neighborhood) of terms equal to A(n, k) including the position (n, k).

This page as a plain text file.
%I A368148 #10 Dec 16 2023 08:59:40
%S A368148 1,2,2,2,1,2,1,3,3,1,2,2,3,2,2,2,1,2,2,1,2,1,3,3,1,3,3,1,2,2,3,2,2,3,
%T A368148 2,2,2,1,2,2,1,2,2,1,2,1,3,3,1,3,3,1,3,3,1,2,2,3,2,2,3,2,2,3,2,2,2,1,
%U A368148 2,2,1,2,2,1,2,2,1,2,1,3,3,1,3,3,1,3,3,1,3,3,1
%N A368148 Square array A(n, k), n, k > 0, read and filled in the greedy way by upwards antidiagonals such that A(n, k) corresponds to the size of the connected component (relative to the Von Neumann neighborhood) of terms equal to A(n, k) including the position (n, k).
%C A368148 The array is doubly periodic (see first formula) and consists of the following repeating 3 X 3 pattern with two components of 1 1's, two components of 2 2's and one component of 3 3's:
%C A368148     +---+-------+
%C A368148     | 1 | 2   2 |
%C A368148     +---+---+---+
%C A368148     | 2 | 1 | 3 |
%C A368148     |   +---+   |
%C A368148     | 2 | 3   3 |
%C A368148     +---+-------+
%F A368148 A(n+3, k) = A(n, k+3) = A(n, k).
%F A368148 A(n, k) = A(k, n).
%e A368148 Array A(n, k) begins:
%e A368148   n\k | 1  2  3  4  5  6  7  8  9 10
%e A368148   ----+-----------------------------
%e A368148     1 | 1  2  2  1  2  2  1  2  2  1
%e A368148     2 | 2  1  3  2  1  3  2  1  3  2
%e A368148     3 | 2  3  3  2  3  3  2  3  3  2
%e A368148     4 | 1  2  2  1  2  2  1  2  2  1
%e A368148     5 | 2  1  3  2  1  3  2  1  3  2
%e A368148     6 | 2  3  3  2  3  3  2  3  3  2
%e A368148     7 | 1  2  2  1  2  2  1  2  2  1
%e A368148     8 | 2  1  3  2  1  3  2  1  3  2
%e A368148     9 | 2  3  3  2  3  3  2  3  3  2
%e A368148    10 | 1  2  2  1  2  2  1  2  2  1
%e A368148 .
%e A368148 We can chose A(1, 1) = 1.
%e A368148 A(2, 1) cannot equal 1; we chose A(2, 1) = 2.
%e A368148 Likewise we chose A(1, 2).
%e A368148 A(2, 2) cannot equal 2 as this would imply a component with 3 or more 2's.
%e A368148 So, by necessity, we chose A(3, 1) = A(1, 3) = 2.
%e A368148 We chose A(2, 2) = 1.
%e A368148 We chose A(4, 1) = 1.
%e A368148 A(3, 2) cannot equal 1 or 2; we chose A(3, 2) = 3.
%e A368148 Likewise we chose A(2, 3) = 3.
%e A368148 We chose A(1, 4) = 1.
%e A368148 A(5, 1) cannot equal 1; we chose A(5, 1) = 2.
%e A368148 A(4, 2) cannot equal 1 (or 3); we chose A(4, 2) = 2.
%e A368148 By necessity, A(3, 3) = 3.
%e A368148 etc.
%o A368148 (PARI) A(n,k) = { [1,2,2; 2,1,3; 2,3,3][1+(n-1)%3, 1+(k-1)%3] }
%Y A368148 Cf. A130196 (one-dimensional variant).
%K A368148 nonn,tabl,easy
%O A368148 1,2
%A A368148 _Rémy Sigrist_, Dec 13 2023