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.

A103451 Triangular array T read by rows: T(n, 0) = T(n, n) = 1, T(n, k) = 0 for 0 < k < n.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Paul Barry, Feb 06 2005

Keywords

Comments

Equals Pascal's triangle (A007318) where all elements > 1 are replaced with zero. Therefore it might be called "binomial skeleton".
Row sums are in A040000, antidiagonal sums are in A040001. When construed as a lower triangular matrix, the matrix inverse is A103452.

Examples

			First few rows are:
  1;
  1, 1;
  1, 0, 1;
  1, 0, 0, 1;
  1, 0, 0, 0, 1;
  1, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Programs

  • Magma
    r:=14; T:=ScalarMatrix(r, 1); for n in [1..r] do T[n, 1]:=1; end for; &cat[ [ T[n, k]: k in [1..n] ]: n in [1..r] ];
    
  • Magma
    /* As triangle */ [[Binomial(n, k-n)+Binomial(n, -k)-Binomial(0, n+k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jul 20 2016
    
  • Mathematica
    Table[Boole[n == 0 || Mod[k, n] == 0], {n, 0, 14}, {k, 0, n}] (* or *)
    Table[Binomial[n, k - n] + Binomial[n, -k] - Binomial[0, n + k], {n, 0, 14}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 19 2016 *)
  • PARI
    for(n=0,15, for(k=0,n, print1(if(k==0||k==n, 1, 0), ", "))) \\ G. C. Greubel, Dec 08 2018
    
  • Python
    from math import isqrt, comb
    def A103451(n):
        if n==0: return 1
        a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
        return int(not (n-comb(a+1,2))%a) # Chai Wah Wu, Jun 24 2025
  • Sage
    def A103451(n,k): return 1 if (k==0 or k==n) else 0
    flatten([[A103451(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Feb 14 2021
    

Formula

a(n) = A097806(n-1) for n > 0. - Philippe Deléham, Oct 16 2007
T(n,k) = C(n,k-n) + C(n,-k) - C(0,n+k), 0 <= k <= n. - Eric Werley, Jul 01 2011
From Stefano Spezia, Jul 04 2024: (Start)
G.f.: (1 - x^2*y)/((1 - x)*(1 - x*y)).
E.g.f.: BesselI(0, 2*sqrt(x*y)) + exp(x) - 1. (End)

Extensions

Edited by Klaus Brockhaus, Jan 26 2011