The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 2
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, 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, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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:
+---+-------+
| 1 | 2 2 |
+---+---+---+
| 2 | 1 | 3 |
| +---+ |
| 2 | 3 3 |
+---+-------+
LINKS
FORMULA
A(n+3, k) = A(n, k+3) = A(n, k).
A(n, k) = A(k, n).
EXAMPLE
Array A(n, k) begins:
n\k | 1 2 3 4 5 6 7 8 9 10
----+-----------------------------
1 | 1 2 2 1 2 2 1 2 2 1
2 | 2 1 3 2 1 3 2 1 3 2
3 | 2 3 3 2 3 3 2 3 3 2
4 | 1 2 2 1 2 2 1 2 2 1
5 | 2 1 3 2 1 3 2 1 3 2
6 | 2 3 3 2 3 3 2 3 3 2
7 | 1 2 2 1 2 2 1 2 2 1
8 | 2 1 3 2 1 3 2 1 3 2
9 | 2 3 3 2 3 3 2 3 3 2
10 | 1 2 2 1 2 2 1 2 2 1
.
We can chose A(1, 1) = 1.
A(2, 1) cannot equal 1; we chose A(2, 1) = 2.
Likewise we chose A(1, 2).
A(2, 2) cannot equal 2 as this would imply a component with 3 or more 2's.
So, by necessity, we chose A(3, 1) = A(1, 3) = 2.
We chose A(2, 2) = 1.
We chose A(4, 1) = 1.
A(3, 2) cannot equal 1 or 2; we chose A(3, 2) = 3.
Likewise we chose A(2, 3) = 3.
We chose A(1, 4) = 1.
A(5, 1) cannot equal 1; we chose A(5, 1) = 2.
A(4, 2) cannot equal 1 (or 3); we chose A(4, 2) = 2.
By necessity, A(3, 3) = 3.
etc.
PROG
(PARI) A(n, k) = { [1, 2, 2; 2, 1, 3; 2, 3, 3][1+(n-1)%3, 1+(k-1)%3] }
CROSSREFS
Cf. A130196 (one-dimensional variant).
Sequence in context: A237523 A339812 A238568 * A238421 A105154 A076447
KEYWORD
nonn,tabl,easy
AUTHOR
Rémy Sigrist, Dec 13 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 18:46 EDT 2024. Contains 372720 sequences. (Running on oeis4.)