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.

Showing 1-3 of 3 results.

A011971 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, 2, 2, 3, 5, 5, 7, 10, 15, 15, 20, 27, 37, 52, 52, 67, 87, 114, 151, 203, 203, 255, 322, 409, 523, 674, 877, 877, 1080, 1335, 1657, 2066, 2589, 3263, 4140, 4140, 5017, 6097, 7432, 9089, 11155, 13744, 17007, 21147, 21147, 25287, 30304, 36401, 43833, 52922, 64077, 77821, 94828, 115975
Offset: 0

Views

Author

Keywords

Comments

Also called the Bell triangle or the Peirce triangle.
a(n,k) is the number of equivalence relations on {0, ..., n} such that k is not equivalent to n, k+1 is not equivalent to n, ..., n-1 is not equivalent to n. - Don Knuth, Sep 21 2002 [Comment revised by Thijs van Ommen (thijsvanommen(AT)gmail.com), Jul 13 2008]
Named after the New Zealand mathematician Alexander Craig Aitken (1895-1967). - Amiram Eldar, Jun 11 2021

Examples

			Triangle begins:
00:       1
01:       1      2
02:       2      3      5
03:       5      7     10     15
04:      15     20     27     37     52
05:      52     67     87    114    151    203
06:     203    255    322    409    523    674    877
07:     877   1080   1335   1657   2066   2589   3263   4140
08:    4140   5017   6097   7432   9089  11155  13744  17007  21147
09:   21147  25287  30304  36401  43833  52922  64077  77821  94828 115975
10:  115975 137122 162409 192713 229114 272947 325869 389946 467767 562595 678570
...
		

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 205.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 212.
  • Donald E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 418).
  • Charles Sanders Peirce, On the Algebra of Logic, American Journal of Mathematics, Vol. 3, pages 15-57, 1880. Reprinted in Collected Papers (1935-1958) and in Writings of Charles S. Peirce: A Chronological Edition (Indiana University Press, Bloomington, IN, 1986).
  • Jeffrey Shallit, A triangle for the Bell numbers, in V. E. Hoggatt, Jr. and M. Bicknell-Johnson, A Collection of Manuscripts Related to the Fibonacci Sequence, 1980, pp. 69-71.

Crossrefs

Borders give Bell numbers A000110. Diagonals give A005493, A011965, A011966, etc., A011968, A011969. Cf. A046934, A011972 (duplicates removed).
Main diagonal is in A094577. Mirror image is in A123346.

Programs

  • GAP
    T:=Flat(List([0..9],n->List([0..n],k->Sum([0..k],i->Binomial(k,i)*Bell(n-k+i))))); # Muniru A Asiru, Oct 26 2018
  • Haskell
    a011971 n k = a011971_tabl !! n !! k
    a011971_row n = a011971_tabl !! n
    a011971_tabl = iterate (\row -> scanl (+) (last row) row) [1]
    -- Reinhard Zumkeller, Dec 09 2012
    
  • Maple
    A011971 := proc(n,k) option remember; if n=0 and k=0 then 1 elif k=0 then A011971(n-1,n-1) else A011971(n,k-1)+A011971(n-1,k-1); fi: end;
    for n from 0 to 12 do lprint([ seq(A011971(n,k),k=0..n) ]); od:
    # Compare the analogue algorithm for the Catalan numbers in A030237.
    BellTriangle := proc(len) local P, T, n; P := [1]; T := [[1]];
    for n from 1 to len - 1 do P := ListTools:-PartialSums([P[-1], op(P)]);
    T := [op(T), P] od; T end:
    BellTriangle(6); ListTools:-Flatten(%); # Peter Luschny, Mar 26 2022
  • Mathematica
    a[0, 0] = 1; a[n_, 0] := a[n, 0] = a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; Flatten[ Table[ a[n, k], {n, 0, 9}, {k, 0, n}]] (* Robert G. Wilson v, Mar 27 2004 *)
    Flatten[Table[Sum[Binomial[k, i]*BellB[n-k+i], {i, 0, k}], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, May 24 2016, after Vladeta Jovovic *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A011971 = blist = [1]
    for _ in range(10**2):
        b = blist[-1]
        blist = list(accumulate([b]+blist))
        A011971 += blist # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 19 2014
    

Formula

Double-exponential generating function: Sum_{n, k} a(n-k, k) x^n y^k / n! k! = exp(e^{x+y}-1+x). - Don Knuth, Sep 21 2002 [U coordinates, reversed]
a(n,k) = Sum_{i=0..k} binomial(k,i)*Bell(n-k+i). - Vladeta Jovovic, Oct 15 2006

Extensions

Peirce reference from Jon Awbrey, Mar 11 2002
Reference to my paper from Jeffrey Shallit, Jan 23 2015
Moved a comment to A056857 where it belonged. - N. J. A. Sloane, May 02 2015.

A123346 Mirror image of the Bell triangle A011971, which is also called the Pierce triangle or Aitken's array.

Original entry on oeis.org

1, 2, 1, 5, 3, 2, 15, 10, 7, 5, 52, 37, 27, 20, 15, 203, 151, 114, 87, 67, 52, 877, 674, 523, 409, 322, 255, 203, 4140, 3263, 2589, 2066, 1657, 1335, 1080, 877, 21147, 17007, 13744, 11155, 9089, 7432, 6097, 5017, 4140, 115975, 94828, 77821, 64077, 52922, 43833, 36401, 30304, 25287, 21147
Offset: 0

Views

Author

N. J. A. Sloane, Oct 14 2006

Keywords

Comments

a(n,k) is k-th difference of Bell numbers, with a(n,1) = A000110(n) for n>0, a(n,k) = a(n,k-1) - a(n-1, k-1), k<=n, with diagonal (k=n) also equal to Bell numbers (n>=0). - Richard R. Forberg, Jul 13 2013
From Don Knuth, Jan 29 2018: (Start)
If the offset here is changed from 0 to 1, then we can say:
a(n,k) is the number of equivalence classes of [n] in which 1 not equiv to 2, ..., 1 not equiv to k.
In Volume 4A, page 418, I pointed out that a(n,k) is the number of set partitions in which k is the smallest of its block.
And in exercise 7.2.1.5--33, I pointed out that a(n,k) is the number of equivalence relations in which 1 not equiv to 2, 2 not equiv to 3, ..., k-1 not equiv to k. (End)

Examples

			Triangle begins:
    1
    2   1
    5   3   2
   15  10   7  5
   52  37  27 20 15
  203 151 114 87 67 52
  ...
		

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 418).

Crossrefs

Cf. A011971. Borders give Bell numbers A000110. Diagonals give A005493, A011965, A011966, A011968, A011969, A046934, A011972, A094577, A095149, A106436, A108041, A108042, A108043.

Programs

  • Haskell
    a123346 n k = a123346_tabl !! n !! k
    a123346_row n = a123346_tabl !! n
    a123346_tabl = map reverse a011971_tabl
    -- Reinhard Zumkeller, Dec 09 2012
    
  • Mathematica
    a[n_, k_] := Sum[Binomial[n - k, i - k] BellB[i], {i, k, n}];
    Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Aug 03 2018 *)
  • Python
    # requires python 3.2 or higher. Otherwise use def'n of accumulate in python docs.
    from itertools import accumulate
    A123346_list = blist = [1]
    for _ in range(2*10**2):
        b = blist[-1]
        blist = list(accumulate([b]+blist))
        A123346_list += reversed(blist)
    # Chai Wah Wu, Sep 02 2014, updated Chai Wah Wu, Sep 20 2014

Formula

a(n,k) = Sum_{i=k..n} binomial(n-k,i-k)*Bell(i). - Vladeta Jovovic, Oct 14 2006

Extensions

More terms from Alexander Adamchuk and Vladeta Jovovic, Oct 14 2006

A363732 Triangle read by rows. The triangle algorithm applied to (-1)^n/n!.

Original entry on oeis.org

1, -2, 1, 5, -4, 1, -15, 15, -6, 1, 52, -60, 30, -8, 1, -203, 260, -150, 50, -10, 1, 877, -1218, 780, -300, 75, -12, 1, -4140, 6139, -4263, 1820, -525, 105, -14, 1, 21147, -33120, 24556, -11368, 3640, -840, 140, -16, 1, -115975, 190323, -149040, 73668, -25578, 6552, -1260, 180, -18, 1
Offset: 0

Views

Author

Peter Luschny, Jun 18 2023

Keywords

Comments

The triangle algorithm, as understood here, is a transformation that maps a sequence of integers (a(n) : n >= 0) to a polynomial sequence. A polynomial sequence is a sequence of polynomials (P(n,x) : n >= 0) with degree(P(n, x)) = n for all n >= 0.
The polynomials P(n, x) are recursively defined by P(n, x) = p(n, 0, x), where the initial sequence is p(0, m, x) = a(m), and for n > 0 is given by
p(n, m, x) = (m + 1)*p(n - 1, m + 1, x) - (m + 1 - x)*p(n - 1, m, x).
Here we identify the polynomial sequence with the infinite lower triangular array of its coefficients, T(n, k) = [x^k] P(n, x). We call the mapping (a(n) : n >= 0) -> (T(n, k) : 0 <= k <= n) the 'triangle algorithm', following the lead of Kawasaki and Ohno.
Evaluating P(n, x) at different values of x gives rise to a multitude of other sequences; in particular, the transformation a(n) -> b(n) = P(n, 1) will be called the Akiyama-Tanigawa transform of a.
The triangle algorithm was studied by Akiyama and Tanigawa, Chen, Imatomi, Arakawa and Kaneko, Kawasaki and Ohno, and others, at first in connection with the Bernoulli and Poly-Bernoulli numbers.
.
The paradigmatic examples are:
a(n) = 1 -> x^n, the standard base of polynomials, A023531.
a(n) = n + 1 -> binomial(n, k), Pascal triangle, A007318.
a(n) = n + 1 -> P(n, 1) powers of 2, A000079.
a(n) = n + 1 -> P(n, 0) the all 1's sequence A000012.
a(n) = 2^n -> [x^k] P(n, x), A154921.
a(n) = 2^n -> P(n, 0) Fubini numbers, A000670.
a(n) = 2^n -> P(n, 1) ordered set partitions of subsets of [n], A000629.
a(n) = 2^n -> P(n,-1) osp. of [n] with even number of blocks, A052841.
a(n) = 1 / (n + 1) -> [x^k] B(n, x), Bernoulli polynomials, A196838/A196839.
a(n) = 1 / (n + 1) -> B(n, 1), the Bernoulli numbers, A164555/A027642.
a(n) = Chen(n) -> skp(n, x), Swiss-Knife polynomials, A153641.
a(n) = Chen(n) -> P(n, 0), 2^n*Euler(n, 1/2) = Euler(n), A122045.
a(n) = Chen(n) -> P(n, 1), 2^n*Euler(n, 1), A155585.
a(n) = (-1)^n/n! -> [x^k] P(n, x) this "Bell" triangle.
a(n) = (-1)^n/n! -> (-1)^n*P(n, 1) = Bell(n), A000110.
a(n) = (-1)^n/n! -> (-1)^n*P(n,-1) = 2-Bell(n), A005493.
a(n) = 1/n! -> (-1)^n*P(n, 1) = complementary Bell(n), A000587.
a(n) = 1/n! -> (-1)^n*P(n,-1) = complementary 2-Bell(n), A074051.
(For Chen's sequence see A363524.)
.
The present sequence deals with the case of the Bell numbers. In contrast to Aitken's array A011971 and its variants A123346 and A011972, the Bell numbers do not appear as a column of the triangle but as row sums (times (-1)^n), i.e., as values of the associated polynomials at x = 1. Comparing this with a similar situation with the Bernoulli numbers/polynomials, our triangle could be viewed as a more organic generalization of the Bell numbers. Indeed, the names 'Bell triangle' and 'Bell polynomials' would be justified here; but these are already assigned to other concepts.

Examples

			The triangle T(n, k) starts:
  [0]     1;
  [1]    -2,      1;
  [2]     5,     -4,     1;
  [3]   -15,     15,    -6,      1;
  [4]    52,    -60,    30,     -8,    1;
  [5]  -203,    260,  -150,     50,  -10,    1;
  [6]   877,  -1218,   780,   -300,   75,  -12,   1;
  [7] -4140,   6139, -4263,   1820, -525,  105, -14,   1;
  [8] 21147, -33120, 24556, -11368, 3640, -840, 140, -16, 1;
		

Crossrefs

Cf. A293037 (row sums), A000110 (row sums, unsigned), A005493 (alternating row sums, signed).

Programs

  • Maple
    TA := proc(a, n, m, x) option remember; if n = 0 then a(m) else
    normal((m + 1)*TA(a, n - 1, m + 1, x) - (m + 1 - x)*TA(a, n - 1, m, x)) fi end:
    seq(seq(coeff(TA(n -> (-1)^n/n!, n, 0, x), x, k), k = 0..n), n = 0..10);
  • Mathematica
    (* rows[0..n], n[0..oo] *)
    (* row[n]= *)
    n=9;r={};For[a=n+1,a>0,a--,AppendTo[r,(-1)^(a+1)*Sum[StirlingS2[a,k],{k,0,a}]*Product[(2*(a+j))/(2*j+2),{j,0,n-a}]]];r
    (* columns[1..n], n[0..oo] *)
    (* column[n]= *)
    n=0;c={};For[a=1,a<15,a++,AppendTo[c,(-1)^(a+1)*Sum[StirlingS2[a,k],{k,0,a}]*Product[(2*(a+j-1))/(2*j),{j,1,n}]]];c
    (* sequence *)
    s={};For[n=0,n<15,n++,For[a=n+1,a>0,a--,AppendTo[s,(-1)^(a+1)*Sum[StirlingS2[a,k],{k,0,a}]*Product[(2*(a+j))/(2*j+2),{j,0,n-a}]]]];s
    (* Detlef Meya, Jun 22 2023 *)
  • SageMath
    def a(n): return (-1)^n / factorial(n)
    @cached_function
    def p(n, m):
        R = PolynomialRing(QQ, "x")
        if n == 0: return R(a(m))
        return R((m + 1)*p(n - 1, m + 1) - (m + 1 - x)*p(n - 1, m))
    for n in range(10): print(p(n, 0).list())
Showing 1-3 of 3 results.