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.

A344646 Array read by antidiagonals T(n,k) = ((n+k+1)^2 - (n+k+1) mod 2)/4 + min(n,k) for n and k >= 0.

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 4, 5, 5, 4, 6, 7, 8, 7, 6, 9, 10, 11, 11, 10, 9, 12, 13, 14, 15, 14, 13, 12, 16, 17, 18, 19, 19, 18, 17, 16, 20, 21, 22, 23, 24, 23, 22, 21, 20, 25, 26, 27, 28, 29, 29, 28, 27, 26, 25, 30, 31, 32, 33, 34, 35, 34, 33, 32, 31, 30, 36, 37, 38, 39, 40, 41, 41, 40, 39, 38, 37, 36
Offset: 0

Views

Author

Michel Marcus, May 25 2021

Keywords

Examples

			Array begins:
  0  1  2  4  6 ...
  1  3  5  7 10 ...
  2  5  8 11 14 ...
  4  7 11 15 19 ...
  6 10 14 19 24 ...
  ...
		

Crossrefs

Cf. A128282 (another pairing function).

Programs

  • Mathematica
    T[n_, k_] := ((n + k + 1)^2 - Mod[n + k + 1, 2])/4 + Min[n, k]; Table[T[k, n - k], {n, 0, 11}, {k, 0, n}] // Flatten (* Amiram Eldar, May 25 2021 *)
  • PARI
    T(n,k) = ((n+k+1)^2 - (n+k+1)%2)/4 + min(n,k);