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.

A059283 Triangle T(n,k) (0<= k <=n) read by rows. Left edge is 1, 0, 0, ... Otherwise each entry is sum of entry to left, entries immediately above it to left and right and entry directly above it 2 rows back.

Original entry on oeis.org

1, 0, 1, 0, 2, 3, 0, 2, 8, 11, 0, 2, 14, 36, 47, 0, 2, 20, 78, 172, 219, 0, 2, 26, 138, 424, 862, 1081, 0, 2, 32, 216, 856, 2314, 4476, 5557, 0, 2, 38, 312, 1522, 5116, 12768, 23882, 29439, 0, 2, 44, 426, 2476, 9970, 30168, 71294, 130172, 159611, 0, 2, 50, 558
Offset: 0

Views

Author

N. J. A. Sloane, Jan 24 2001

Keywords

Examples

			1; 0,1; 0,2,3; 0,2,8,11; 0,2,14,36,47; ... [36 = 14 + 8 + 11 + 3 for example].
		

Crossrefs

Right edge is A059284. Cf. A059226.
Cf. A224729 (central terms), A122542.

Programs

  • Haskell
    a059283 n k = a059283_tabl !! n !! k
    a059283_row n = a059283_tabl !! n
    a059283_tabl = [1] : [0,1] : f [1] [0,1] where
       f us vs = ws : f vs ws where
         ws = scanl1 (+) $ zipWith (+)
                           ([0]++us++[0]) $ zipWith (+) ([0]++vs) (vs++[0])
    -- Reinhard Zumkeller, Apr 17 2013
  • Mathematica
    t[0, 0] = 1; t[, 0] = 0; t[n, k_] /; 0 <= k <= n := t[n, k] = t[n, k-1] + t[n-1, k-1] + t[n-1, k] + t[n-2, k-1]; t[, ] = 0; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 11 2013 *)

Formula

T(0, 0)=1; T(n, 0)=0, n>0; T(n, k)=T(n, k-1)+T(n-1, k-1)+T(n-1, k)+T(n-2, k-1), n, k>0
G.f. for T(n, k): ((1+2*w+w^2)*z^2+(-1-2*w-w^2)*z-w*(-3*w^2-6*w+1)^(1/2)+2*w)/(1+w)^2/((1+w)*z^2+(w-1)*z+w) (expand first as series in z, then in w).

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jan 25 2001