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.

A247108 Complementary Aitken's array: triangle of numbers {a(n,k), n >= 0, 0<=k<=n} read by rows, defined by a(0,0)=1, a(n,0)=-a(n-1,n-1), a(n,k)=a(n,k-1)+a(n-1,k-1).

Original entry on oeis.org

1, -1, 0, 0, -1, -1, 1, 1, 0, -1, 1, 2, 3, 3, 2, -2, -1, 1, 4, 7, 9, -9, -11, -12, -11, -7, 0, 9, -9, -18, -29, -41, -52, -59, -59, -50, 50, 41, 23, -6, -47, -99, -158, -217, -267, 267, 317, 358, 381, 375, 328, 229, 71, -146, -413, 413, 680, 997, 1355, 1736, 2111, 2439, 2668, 2739, 2593, 2180
Offset: 0

Views

Author

Chai Wah Wu, Nov 19 2014

Keywords

Comments

a(n,0) of the triangle is equal to A000587(n), the Rao Uppuluri-Carpenter numbers or complementary Bell numbers.

Examples

			Triangle begins:
00:      1
01:     -1      0
02:      0     -1     -1
03:      1      1      0     -1
04:      1      2      3      3      2
05:     -2     -1      1      4      7      9
06:     -9    -11    -12    -11     -7      0      9
07:     -9    -18    -29    -41    -52    -59    -59    -50
08:     50     41     23     -6    -47    -99   -158   -217   -267
09:    267    317    358    381    375    328    229     71   -146   -413
		

Crossrefs

Programs

  • Haskell
    a247108 n k = a247108_tabl !! n !! k
    a247108_row n = a247108_tabl !! n
    a247108_tabl = iterate (\row -> scanl (+) (- last row) row) [1]
    -- Reinhard Zumkeller, Nov 22 2014
  • Mathematica
    a[0, 0] = 1;
    a[n_, 0] := -a[n - 1, n - 1];
    a[n_, k_] /; 0 <= k <= n := a[n, k] = a[n, k - 1] + a[n - 1, k - 1];
    a[, ] = 0;
    Table[a[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 20 2019 *)
  • Python
    from itertools import accumulate
    A247108_list = blist = [1]
    for _ in range(10**2):
        b = -blist[-1]
        blist = list(accumulate([b]+blist))
        A247108_list += blist