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.

A377930 Square array A(n, k), n, k > 0, read by antidiagonals; A(n, k) = max(A007814(n), A007814(k)).

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 2, 1, 1, 2, 0, 2, 0, 2, 0, 1, 1, 2, 2, 1, 1, 0, 1, 0, 2, 0, 1, 0, 3, 1, 1, 2, 2, 1, 1, 3, 0, 3, 0, 2, 0, 2, 0, 3, 0, 1, 1, 3, 2, 1, 1, 2, 3, 1, 1, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 2, 1, 1, 2, 3, 1, 1, 3, 2, 1, 1, 2, 0, 2, 0, 2, 0, 3, 0, 3, 0, 2, 0, 2, 0
Offset: 1

Views

Author

Rémy Sigrist, Nov 11 2024

Keywords

Comments

Let K_0 = [0], and for any m > 0, K_m is obtained by arranging four copies of K_{m-1} around a "plus" shape made of m's as follows:
+---------+---+---------+
| | m | |
| | | |
| K_{m-1} | . | K_{m-1} |
| | . | |
| | . | |
+---+ +---------+ +---------+
K_0 = | 0 |, for m > 0, K_m = |m ... m ... m|
+---+ +---------+ +---------+
| | . | |
| | . | |
| K_{m-1} | . | K_{m-1} |
| | | |
| | m | |
+---------+---+---------+
The square array A is the limit of K_m as m tends to infinity.

Examples

			Array A(n, k) begins:
    +---+---+---+---+---+---+---+
    | 0 | 1 | 0 | 2 | 0 | 1 | 0 |
    +---+   +---+   +---+   +---+
    | 1   1   1 | 2 | 1   1   1 |
    +---+   +---+   +---+   +---+
    | 0 | 1 | 0 | 2 | 0 | 1 | 0 |
    +---+---+---+   +---+---+---+
    | 2   2   2   2   2   2   2 |
    +---+---+---+   +---+---+---+
    | 0 | 1 | 0 | 2 | 0 | 1 | 0 |
    +---+   +---+   +---+   +---+
    | 1   1   1 | 2 | 1   1   1 |
    +---+   +---+   +---+   +---+
    | 0 | 1 | 0 | 2 | 0 | 1 | 0 |
    +---+---+---+---+---+---+---+
		

Crossrefs

Programs

  • Mathematica
    A[n_,k_]:=Max[IntegerExponent[n,2],IntegerExponent[k,2]]; Table[A[n-k+1,k],{n,13},{k,n}]//Flatten (* Stefano Spezia, Nov 13 2024 *)
  • PARI
    A(n, k) = max(valuation(n, 2), valuation(k, 2))

Formula

A(n, k) = A(k, n).
A(n, 0) = A(n, n) = A007814(n).