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.

A343037 Triangle T(n,k), n >= 2, 1 <= k <= n-1, read by rows, where T(n,k) is the difference between smallest square >= binomial(n,k) and binomial(n,k).

Original entry on oeis.org

2, 1, 1, 0, 3, 0, 4, 6, 6, 4, 3, 1, 5, 1, 3, 2, 4, 1, 1, 4, 2, 1, 8, 8, 11, 8, 8, 1, 0, 0, 16, 18, 18, 16, 0, 0, 6, 4, 1, 15, 4, 15, 1, 4, 6, 5, 9, 4, 31, 22, 22, 31, 4, 9, 5, 4, 15, 5, 34, 49, 37, 49, 34, 5, 15, 4, 3, 3, 3, 14, 9, 48, 48, 9, 14, 3, 3, 3, 2, 9, 36, 23, 23, 22, 49, 22, 23, 23, 36, 9, 2
Offset: 2

Views

Author

Seiichi Manyama, Apr 03 2021

Keywords

Examples

			binomial(50,3) = binomial(50,47) = 140^2. So T(50,3) = T(50,47) = 0.
Triangle begins:
  2;
  1,  1;
  0,  3,  0;
  4,  6,  6,  4;
  3,  1,  5,  1,   3;
  2,  4,  1,  1,   4,  2;
  1,  8,  8, 11,   8,  8,   1;
  0,  0, 16, 18,  18, 16,   0,   0;
  6,  4,  1, 15,   4, 15,   1,   4,  6;
  5,  9,  4, 31,  22, 22,  31,   4,  9,  5;
  4, 15,  5, 34,  49, 37,  49,  34,  5, 15,   4;
  3,  3,  3, 14,   9, 48,  48,   9, 14,  3,   3,  3;
  2,  9, 36, 23,  23, 22,  49,  22, 23, 23,  36,  9,  2;
  1, 16, 29,  4,  22, 36, 126, 126, 36, 22,   4, 29, 16, 1;
  0,  1, 16, 29, 121, 92,   9, 126,  9, 92, 121, 29, 16, 1, 0;
		

Crossrefs

Column k=1..2 give A068527, A175032.

Programs

  • Mathematica
    diff[n_] := Ceiling[Sqrt[n]]^2 - n; T[n_, k_] := diff @ Binomial[n, k]; Table[T[n, k], {n, 2, 14}, {k, 1, n - 1}] // Flatten (* Amiram Eldar, Apr 03 2021 *)
  • PARI
    T(n, k) = my(m=binomial(n, k)); if(issquare(m), 0, (sqrtint(m)+1)^2-m);

Formula

T(n,k) = T(n,n-k) = A068527(binomial(n,k)).
T(n^2,1) = T(n^2,n^2-1) = 0.
If 3 <= k <= n-3 and (n,k) is not (50,3) or (50,47), T(n,k) > 0.