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.

A374441 Triangle read by rows: T(n, k) = binomial(n - floor(k/2), ceiling(k/2)) - binomial(n - ceiling(k/2), floor(k/2)).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 3, 0, 1, 0, 0, 4, 0, 3, 0, 0, 0, 5, 0, 6, 0, 1, 0, 0, 6, 0, 10, 0, 4, 0, 0, 0, 7, 0, 15, 0, 10, 0, 1, 0, 0, 8, 0, 21, 0, 20, 0, 5, 0, 0, 0, 9, 0, 28, 0, 35, 0, 15, 0, 1, 0, 0, 10, 0, 36, 0, 56, 0, 35, 0, 6, 0, 0, 0, 11, 0, 45, 0, 84, 0, 70, 0, 21, 0, 1, 0
Offset: 0

Views

Author

Peter Luschny, Jul 19 2024

Keywords

Comments

Member of the family of Fibonacci polynomials (A011973, A162515, ...) and Chebyshev polynomials (A053119).

Examples

			Triangle starts:
  [ 0]  0;
  [ 1]  0, 0;
  [ 2]  0, 1, 0;
  [ 3]  0, 2, 0,  0;
  [ 4]  0, 3, 0,  1, 0;
  [ 5]  0, 4, 0,  3, 0,  0;
  [ 6]  0, 5, 0,  6, 0,  1, 0;
  [ 7]  0, 6, 0, 10, 0,  4, 0,  0;
  [ 8]  0, 7, 0, 15, 0, 10, 0,  1, 0;
  [ 9]  0, 8, 0, 21, 0, 20, 0,  5, 0, 0;
  [10]  0, 9, 0, 28, 0, 35, 0, 15, 0, 1, 0;
		

Crossrefs

Cf. A374440 (odd columns agree).
Cf. A000071 (row sums), A065941, A194005, A103631, A007318.

Programs

  • Maple
    T := (n, k) -> if k::even then 0 else binomial(n - (k + 1)/2, (k + 1)/2) fi:
    # Or as a recurrence:
    T := proc(n, k) option remember; if k::even or k > n then 0 elif k = 1 then n - 1 else T(n - 1, k) + T(n - 2, k - 2) fi end:
    seq(seq(T(n, k), k = 0..n), n = 0..12);
  • Mathematica
    A374441[n_, k_] := If[OddQ[k], Binomial[n - (k + 1)/2, (k + 1)/2], 0];
    Table[A374441[n, k], {n, 0, 15}, {k, 0, n}] (* Paolo Xausa, Nov 16 2024 *)
  • Python
    from math import isqrt, comb
    def A374441(n):
        a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
        b = n-comb(a+1,2)
        return comb(a-(b+1>>1),b+1>>1) if b&1 else 0 # Chai Wah Wu, Nov 14 2024
    
  • Python
    from math import comb as binomial
    def row(n: int) -> list[int]:
        return [binomial(n - (k+1)//2, (k+1)//2) if k%2 else 0 for k in range(n+1)]
    for n in range(11): print(row(n))  # Peter Luschny, Nov 21 2024

Formula

T(n, k) = [x^(n-k)][z^n] (x / (1 - x*z - z^2)).
T(n, k) = binomial(n - (k + 1)/2, (k + 1)/2) if k is odd, and otherwise 0.
Sum_{k=0..n} T(n, k) = Fibonacci(n + 1) - 1.
Columns with odd index agree with the odd indexed columns of A374440.