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.

A380390 Array read by ascending antidiagonals: A(n, k) is equal to n/k if k | n, else to the concatenation of A003988(n, k) = floor(n/k) and A380389(n - k*floor(n/k), k).

Original entry on oeis.org

1, 2, 12, 3, 1, 13, 4, 112, 23, 14, 5, 2, 1, 12, 15, 6, 212, 113, 34, 25, 16, 7, 3, 123, 1, 35, 13, 17, 8, 312, 2, 114, 45, 12, 27, 18, 9, 4, 213, 112, 1, 23, 37, 14, 19, 10, 412, 223, 134, 115, 56, 47, 38, 29, 110, 11, 5, 3, 2, 125, 1, 57, 12, 13, 15, 111
Offset: 1

Views

Author

Stefano Spezia, Jan 23 2025

Keywords

Examples

			The array begins:
  1,  12,  13,  14,  15,  16, 17, 18, ...
  2,   1,  23,  12,  25,  13, 27, 14, ...
  3, 112,   1,  34,  35,  12, 37, 38, ...
  4,   2, 113,   1,  45,  23, 47, 12, ...
  5, 212, 123, 114,   1,  56, 57, 58, ...
  6,   3,   2, 112, 115,   1, 67, 34, ...
  7, 312, 213, 134, 125, 116,  1, 78, ...
  ...
A(3, 2) = 112 since 3/2 = 1 + 1/2.
A(4, 2) = 2 since 4/2 = 2.
		

Crossrefs

Cf. A000012 (diagonal), A000027 (1st column).

Programs

  • Mathematica
    A[n_, k_]:=If[Divisible[n, k], n/k, FromDigits[Join[IntegerDigits[q=Floor[n/k]], IntegerDigits[Numerator[r=n/k-q]],IntegerDigits[Denominator[r]]]]]; Table[A[n-k+1, k], {n, 12}, {k, n}]//Flatten