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-8 of 8 results.

A264430 Triangle read by rows, Bell transform of second order Bell numbers (A187761).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 3, 1, 0, 6, 11, 6, 1, 0, 23, 50, 35, 10, 1, 0, 106, 268, 225, 85, 15, 1, 0, 568, 1645, 1603, 735, 175, 21, 1, 0, 3459, 11348, 12572, 6713, 1960, 322, 28, 1, 0, 23544, 86775, 107738, 65352, 22323, 4536, 546, 36, 1, 0, 176850, 727629, 1001895, 678980, 263865, 63021, 9450, 870, 45, 1
Offset: 0

Views

Author

Peter Luschny, Nov 13 2015

Keywords

Examples

			Triangle starts:
[1]
[0,    1]
[0,    1,     1]
[0,    2,     3,     1]
[0,    6,    11,     6,    1]
[0,   23,    50,    35,   10,    1]
[0,  106,   268,   225,   85,   15,   1]
[0,  568,  1645,  1603,  735,  175,  21,  1]
[0, 3459, 11348, 12572, 6713, 1960, 322, 28, 1]
		

Crossrefs

Programs

  • Mathematica
    nmax = 10;
    A187761[n_] := Sum[BellY[n, k, BellB /@ Range[0, n-1]], {k, 0, n}];
    Table[BellY[n, k, A187761 /@ Range[0, nmax]], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 10 2019 *)
  • Sage
    # uses[bell_transform from A264428]
    def A264430_triangle(dim):
        uno = [1]*dim
        bell_numbers = [sum(bell_transform(n, uno)) for n in range(dim)]
        bell_number_2 = [sum(bell_transform(n, bell_numbers)) for n in range(dim)]
        for n in range(dim): print(bell_transform(n, bell_number_2))
    A264430_triangle(10)

A264431 Triangle read by rows, inverse Bell transform of second order Bell numbers (A187761).

Original entry on oeis.org

1, 0, 1, 0, -1, 1, 0, 1, -3, 1, 0, -1, 7, -6, 1, 0, 2, -15, 25, -10, 1, 0, -8, 37, -90, 65, -15, 1, 0, 27, -133, 322, -350, 140, -21, 1, 0, -70, 587, -1330, 1757, -1050, 266, -28, 1, 0, 265, -2526, 6607, -9114, 7077, -2646, 462, -36, 1
Offset: 0

Views

Author

Peter Luschny, Nov 13 2015

Keywords

Examples

			[ 1 ]
[ 0,     1 ]
[ 0,    -1,     1 ]
[ 0,     1,    -3,     1 ]
[ 0,    -1,     7,    -6,     1 ]
[ 0,     2,   -15,    25,   -10,     1 ]
[ 0,    -8,    37,   -90,    65,   -15,     1 ]
[ 0,    27,  -133,   322,  -350,   140,   -21,     1 ]
[ 0,   -70,   587, -1330,  1757, -1050,   266,   -28,     1 ]
[ 0,   265, -2526,  6607, -9114,  7077, -2646,   462,   -36,   1 ]
		

Crossrefs

Programs

  • Sage
    # uses[bell_transform from A264428, inverse_bell_transform from A264429]
    def A264431_matrix(dim):
        uno = [1]*dim
        bell_numbers = [sum(bell_transform(n, uno)) for n in range(dim)]
        bell_number_2 = [sum(bell_transform(n, bell_numbers)) for n in range(dim)]
        return inverse_bell_transform(dim, bell_number_2)
    A264431_matrix(10)

A264428 Triangle read by rows, Bell transform of Bell numbers.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 3, 1, 0, 5, 11, 6, 1, 0, 15, 45, 35, 10, 1, 0, 52, 205, 210, 85, 15, 1, 0, 203, 1029, 1330, 700, 175, 21, 1, 0, 877, 5635, 8946, 5845, 1890, 322, 28, 1, 0, 4140, 33387, 63917, 50358, 20055, 4410, 546, 36, 1, 0, 21147, 212535, 484140, 450905, 214515, 57855, 9240, 870, 45, 1
Offset: 0

Views

Author

Peter Luschny, Nov 13 2015

Keywords

Comments

Consider the sequence S0 -> T0 -> S1 -> T1 -> S2 -> T2 -> ... Here Sn -> Tn indicates the Bell transform mapping a sequence Sn to a triangle Tn as defined in the link and Tn -> S{n+1} the operator associating a triangle with the sequence of its row sums. If
S0 = A000012 = <1,1,1,...> then
T0 = A048993 # Stirling subset numbers,
S1 = A000110 # Bell numbers,
T1 = A264428 # Bell transform of Bell numbers,
S2 = A187761 # second-order Bell numbers,
T2 = A264430 # Bell transform of second-order Bell numbers,
S3 = A264432 # third-order Bell numbers.
This construction is closely related to permutations trees and A179455. Sn is A179455_col(n+1) prepended by A179455_diag(k) = k! for k <= n. In other words, Sn 'converges' to n! for n -> oo.
Given a sequence (s(n))n>=0 with s(0) = 0 and with e.g.f. B(x) = Sum_{n >= 1} s(n)*x^n/n!, then the Bell matrix associated with s(n) equals the exponential Riordan array [1, B(x)] belonging to the Lagrange subgroup of the exponential Riordan group. Omitting the first row and column from the Bell matrix produces the exponential Riordan array [d/dx(B(x)), B(x)] belonging to the Derivative subgroup of the exponential Riordan group. - Peter Bala, Jun 07 2016

Examples

			Triangle starts:
[1]
[0,   1]
[0,   1,    1]
[0,   2,    3,    1]
[0,   5,   11,    6,    1]
[0,  15,   45,   35,   10,    1]
[0,  52,  205,  210,   85,   15,   1]
[0, 203, 1029, 1330,  700,  175,  21,  1]
[0, 877, 5635, 8946, 5845, 1890, 322, 28, 1]
		

Crossrefs

Programs

  • Maple
    # Computes sequence in matrix form.
    BellMatrix := proc(f, len) local T, A; A := [seq(f(n), n=0..len-2)];
    T := proc(n, k) option remember; if k=0 then k^n else
    add(binomial(n-1,j-1)*T(n-j,k-1)*A[j], j=1..n-k+1) fi end;
    Matrix(len, (n,k)->T(n-1,k-1), shape=triangular[lower]) end:
    BellMatrix(n -> combinat:-bell(n), 9); # Peter Luschny, Jan 21 2016
    # Alternative, using the recurrence of Peter Bala:
    R := proc(n) option remember; if n = 0 then 1 else
    t*add(binomial(n-1,k)*combinat:-bell(k)*R(n-k-1,t),k=0..n-1) fi end:
    T_row := n-> seq(coeff(R(n), t, k), k=0..n):
    seq(print(T_row(n)),n=0..8); # Peter Luschny, Jun 09 2016
  • Mathematica
    BellMatrix[f_Function|f_Symbol, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len-1}, {k, 0, len-1}]];
    rows = 11;
    M = BellMatrix[BellB, rows];
    Table[M[[n, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 21 2016, updated Jul 14 2018 *)
    With[{r = 8}, Flatten[Table[BellY[n, k, BellB[Range[0, r]]], {n, 0, r}, {k, 0, n}]]] (* Jan Mangaldan, May 22 2016 *)
  • PARI
    bell_matrix(f, len) = { my( m = matrix(len, len) );  m[1, 1] = 1;
      for( n = 1, len-1, m[n+1, 2] = f(n-1) );
      for( n = 0, len-1, for( k = 1, n,
         m[n+1, k+1] = sum(j = 1, n-k+1, binomial(n-1,j-1)*m[n-j+1,k]*m[j+1,2]) ));
      return( m )
    }
    f(n) = polcoeff( sum( k=0, n, prod( i=1, k, x / (1 - i*x)), x^n * O(x)), n);
    bell_matrix(f, 9) \\ Peter Luschny, Jan 24 2016
    
  • Python
    from functools import cache
    from math import comb as binomial
    def BellMatrix(f, size):
        A = [f(n) for n in range(size - 1)]
        @cache
        def T(n, k):
            if k == 0: return k ** n
            return sum(
                binomial(n - 1, j) * T(n - j - 1, k - 1) * A[j]
                for j in range(n - k + 1) )
        return [[T(n, k) for k in range(n + 1)] for n in range(size)]
    @cache
    def b(n, k=0): return n < 1 or k*b(n-1, k) + b(n-1, k+1)
    print(BellMatrix(b, 9))  # Peter Luschny, Jun 14 2022
  • Sage
    # The functions below are referenced in various other sequences.
    def bell_transform(n, a): # partition_based
        row = []
        fn = factorial(n)
        for k in (0..n):
            result = 0
            for p in Partitions(n, length=k):
                factorial_product = 1
                power_factorial_product = 1
                for part, count in p.to_exp_dict().items():
                    factorial_product *= factorial(count)
                    power_factorial_product *= factorial(part)**count
                coefficient = fn//(factorial_product*power_factorial_product)
                result += coefficient*prod([a[i-1] for i in p])
            row.append(result)
        return row
    def bell_matrix(generator, dim):
        G = [generator(k) for k in srange(dim)]
        row = lambda n: bell_transform(n, G)
        return matrix(ZZ, [row(n)+[0]*(dim-n-1) for n in srange(dim)])
    def inverse_bell_matrix(generator, dim):
        G = [generator(k) for k in srange(dim)]
        row = lambda n: bell_transform(n, G)
        M = matrix(ZZ, [row(n)+[0]*(dim-n-1) for n in srange(dim)]).inverse()
        return matrix(ZZ, dim, lambda n,k: (-1)^(n-k)*M[n,k])
    bell_numbers = [sum(bell_transform(n, [1]*10)) for n in range(11)]
    for n in range(11): print(bell_transform(n, bell_numbers))
    

Formula

From Peter Bala, Jun 07 2016: (Start)
E.g.f.: exp(t*B(x)), where B(x) = Integral_{u = 0..x} exp(exp(u) - 1) du = x + x^2/2! + 2*x^3/3! + 5*x^4/4! + 15*x^5/5! + 52*x^6/6! + ....
Row polynomial recurrence: R(n+1,t) = t*Sum_{k = 0 ..n} binomial(n,k)*Bell(k)* R(n-k,t) with R(0,t) = 1. (End)

A187824 a(n) is the largest m such that n is congruent to -1, 0 or 1 mod k for all k from 1 to m.

Original entry on oeis.org

3, 4, 5, 6, 3, 4, 4, 5, 3, 6, 4, 4, 3, 5, 5, 4, 3, 6, 5, 5, 3, 4, 6, 6, 3, 4, 4, 7, 3, 6, 4, 4, 3, 7, 7, 4, 3, 5, 5, 8, 3, 4, 5, 5, 3, 4, 4, 8, 3, 5, 4, 4, 3, 9, 5, 4, 3, 6, 6, 6, 3, 4, 5, 6, 3, 4, 4, 5, 3, 10, 4, 4, 3, 5, 5, 4, 3, 6, 5, 5, 3, 4, 7, 7, 3, 4, 4, 6, 3, 7, 4, 4, 3, 6, 6, 4, 3, 5, 5, 6, 3
Offset: 2

Views

Author

Kival Ngaokrajang, Dec 27 2012

Keywords

Comments

This sequence and A187771 and A187761 are winners in the contest held at the 2013 AMS/MAA Joint Mathematics Meetings. - T. D. Noe, Jan 14 2013
If n = t!-1 then a(n) >= t, so sequence is unbounded. - N. J. A. Sloane, Dec 30 2012
First occurrence of k = 3, 4, 5, ...: 2, 3, 4, 5, 29, 41, 55, 71, 881, 791, 9360, 10009, 1079, 30239, (17 unknown), 246960, (19 unknown), 636481, 1360800, 3160079, (23 unknown), 2162161, 266615999, 39412801 (27 unknown), 107881201, ... Searched up to 3*10^9. - Robert G. Wilson v, Dec 31 2012

Examples

			For n = 6, a(6) = 3 as follows.
m    Residue of 6 (mod m)
1             0
2             0
3             0
4             2
5             1
6             0
7            -1
		

Crossrefs

For values of n which set a new record see A220891.
For smallest inverse see A220890 and A056697.

Programs

  • Maple
    A187824:= proc(n)
       local j,r;
       for j from 4 do
         r:= mods(n, j);
         if r <> r^3 then return j-1 end if
       end do
    end proc; # Robert Israel, Dec 31 2012
  • Mathematica
    f[n_] := Block[{k = 4, r}, While[r = Mod[n, k]; r < 2 || k - r < 2, k++]; k - 1]; Array[f, 101, 2] (* Robert G. Wilson v, Dec 31 2012 *)
  • PARI
    A187824(n)={n++>2 && for(k=4,oo, n%k>2 && return(k-1))} \\ M. F. Hasler, Dec 31 2012, minor edits Aug 20 2020
    
  • PARI
    a(n)=my(k=3);n++;while(n%k++<3,);k-1 \\ Charles R Greathouse IV, Jan 02 2013
    
  • Python
    from gmpy2 import t_mod
    def A187824(n):
        k = 1
        while t_mod(n+1,k) < 3:
            k += 1
        return k-1 # Chai Wah Wu, Aug 31 2014
    
  • Python
    def a(n):
       m=1
       while abs(n%m) < 2:
          m += 1
       return m
    [a(n) for n in range(1,100)]
    # Derek Orr, Aug 31 2014, corrected & edited by M. F. Hasler, Aug 20 2020

Formula

If n == 0 (mod 20), then a(n-2) = a(n+2) = 3, while a(n) = 5,5,6, 5,5,8, 5,5,6, 5,5,6, 5,5,7, 5,5,6, 5,5,7, ... with records a(20) = 5, a(60) = 6, a(120) = 8, a(720) = 10, a(2520) = 12, a(9360) = 13, ... If n == 0 (mod 5), but is not a multiple of 20, then always a(n-2) = a(n+2) = 4, while a(n) = 6,3,5, 6,3,7, 5,3,9, 6,3,5, 7,3,6, 5,3,6, 7,3,5, ... - Vladimir Shevelev, Dec 31 2012
a(n)=3 iff n == 2 (mod 4). a(n)=4 iff n == 3, 7, 8, 12, 13, 17 (mod 20), i.e., n == 2 or 3 (mod 5) but not n == 2 (mod 4). In the same way one can obtain a covering set for any value taken by a(n), this is actually nothing else than the definition. For example, n == 2, 3 or 4 (mod 6) but not 2 or 3 (mod 5) nor 2 (mod 4) yields a(n)=5 iff n == 4, 9, 15, 16, 20, 21, 39, 40, 44, 45, 51 or 56 (mod 60), etc. - M. F. Hasler, Dec 31 2012

Extensions

Corrected m = 100 by Kival Ngaokrajang, Dec 30 2012
Definition & example corrected by Kival Ngaokrajang, Dec 30 2012
More terms from N. J. A. Sloane, Dec 30 2012

A179455 Triangle read by rows: number of permutation trees of power n and height <= k + 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 5, 6, 1, 15, 23, 24, 1, 52, 106, 119, 120, 1, 203, 568, 700, 719, 720, 1, 877, 3459, 4748, 5013, 5039, 5040, 1, 4140, 23544, 36403, 39812, 40285, 40319, 40320, 1, 21147, 176850, 310851, 354391, 362057, 362836, 362879, 362880
Offset: 0

Views

Author

Peter Luschny, Aug 11 2010

Keywords

Comments

Partial row sums of A179454. Special cases: A179455(n,1) = BellNumber(n) = A000110(n) for n > 1; A179455(n,n-1) = n! for n > 1 and A179455(n,n-2) = A033312(n) for n > 1. Column 3 is A187761(n) for n >= 3.
See the interpretation of Joerg Arndt in A187761: Maps such that f^[k](x) = f^[k-1](x) correspond to column k of A179455 (for n >= k). - Peter Luschny, Jan 08 2013

Examples

			As a (0,0)-based triangle with an additional column [1,0,0,0,...] at the left hand side:
1;
0, 1;
0, 1, 2;
0, 1, 5, 6;
0, 1, 15, 23, 24;
0, 1, 52, 106, 119, 120;
0, 1, 203, 568, 700, 719, 720;
0, 1, 877, 3459, 4748, 5013, 5039, 5040;
0, 1, 4140, 23544, 36403, 39812, 40285, 40319, 40320;
0, 1, 21147, 176850, 310851, 354391, 362057, 362836, 362879, 362880;
		

Crossrefs

Row sums are A264151.

Programs

  • Mathematica
    b[n_, t_, h_] := b[n, t, h] = If[n == 0 || h == 0, 1, Sum[Binomial[n - 1, j - 1]*b[j - 1, 0, h - 1]*b[n - j, t, h], {j, 1, n}]];
    T[0, 0] = 1; T[n_, k_] := b[n, 1, k];
    Table[T[n, k], {n, 0, 9}, {k, 0, If[n == 0, 0, n-1]}] // Flatten (* Jean-François Alcover, Jul 10 2019, after Alois P. Heinz in A179454 *)
  • Sage
    # Generating algorithm from Joerg Arndt.
    def A179455row(n):
        def generate(n, k):
            if n == 0 or k == 0: return 0
            for j in range(n-1, 0, -1):
                f = a[j] + 1
                while f <= j:
                    a[j] = f1 = fl = f
                    for i in range(k):
                        fl = f1
                        f1 = a[fl]
                    if f1 == fl: return j
                    f += 1
                a[j] = 0
            return 0
        count = [1 for j in range(n)] if n > 0 else [1]
        for k in range(n):
            a = [0 for j in range(n)]
            while generate(n, k) != 0:
                count[k] += 1
        return count
    for n in range(9): A179455row(n) # Peter Luschny, Jan 08 2013
    
  • Sage
    # uses[bell_transform from A264428]
    # Adds the column (1,0,0,0,..) to the left hand side and starts at n=0.
    def A179455_matrix(dim):
        b = [1]+[0]*(dim-1); L = [b]
        for k in range(dim):
            b = [sum(bell_transform(n, b)) for n in range(dim)]
            L.append(b)
        return matrix(ZZ, dim, lambda n, k: L[k][n] if k<=n else 0)
    print(A179455_matrix(10)) # Peter Luschny, Dec 06 2015

A187771 Numbers whose sum of divisors is the cube of the sum of its prime divisors.

Original entry on oeis.org

245180, 612408, 639198, 1698862, 1721182, 5154168, 7824284, 15817596, 20441848, 25969788, 27688078, 28404862, 35860609, 67149432, 77378782, 91397838, 96462862, 179302264, 191550135, 289772221, 306901244, 311657084, 392802179, 441839706, 572673855, 652117774, 988918364
Offset: 1

Views

Author

Manuel Valdivia, Jan 04 2013

Keywords

Comments

This sequence and A187824 and A187761 are winners in the contest held at the 2013 AMS/MAA Joint Mathematics Meetings. - T. D. Noe, Jan 14 2013
The identity sigma(k) = (sopf(k))^m only occurs for m = 3 (this sequence) in the given range, however it is likely that it also occurs for other powers m in higher numbers.
The smallest k such that sigma(k) = sopf(k)^m, for m=4,5,6 are 1056331752 (A221262), 213556659624 (A221263) and 45770980141656, respectively. - Giovanni Resta, Jan 07 2013
Prime divisors are taken without multiplicity. - Harvey P. Dale, Dec 17 2016

Examples

			a(13) = 35860609 = 41 * 71 * 97 * 127, then sigma(35860609) = 37933056 = (41 + 71 + 97 + 127)^3.
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 38.

Crossrefs

Cf. A221262 (sigma(k)=sopf(k)^4), A221263 (sigma(k)=sopf(k)^5).

Programs

  • Mathematica
    d[n_]:= If[Plus@@Divisors[n]-Power[Plus@@Select[Divisors[n], PrimeQ], 3]==0, n]; Select[Range[2,10^9], #==d[#]&]
    Select[Range[2, 10^9],DivisorSigma[1,#]==Total[FactorInteger[#][[All, 1]]]^3&] (* Harvey P. Dale, Dec 17 2016 *)
  • PARI
    is(n)=my(f=factor(n));sum(i=1,#f~,f[i,1])^3==sigma(n) \\ Charles R Greathouse IV, Jun 29 2013

Formula

a(n) = k if sigma(k) = (sopf(k))^3, where sigma(k) = A000203(k) and sopf(k) = A008472(k).

A265312 Square array read by ascending antidiagonals, Bell numbers iterated by the Bell transform.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 5, 1, 1, 1, 2, 6, 15, 1, 1, 1, 2, 6, 23, 52, 1, 1, 1, 2, 6, 24, 106, 203, 1, 1, 1, 2, 6, 24, 119, 568, 877, 1, 1, 1, 2, 6, 24, 120, 700, 3459, 4140, 1, 1, 1, 2, 6, 24, 120, 719, 4748, 23544, 21147, 1, 1, 1, 2, 6, 24, 120, 720, 5013, 36403, 176850, 115975, 1
Offset: 0

Views

Author

Peter Luschny, Dec 06 2015

Keywords

Examples

			[1, 1, 1, 1,  1,   1,   1,    1,     1, ...] A000012
[1, 1, 2, 5, 15,  52, 203,  877,  4140, ...] A000110
[1, 1, 2, 6, 23, 106, 568, 3459, 23544, ...] A187761
[1, 1, 2, 6, 24, 119, 700, 4748, 36403, ...] A264432
[1, 1, 2, 6, 24, 120, 719, 5013, 39812, ...]
[1, 1, 2, 6, 24, 120, 720, 5039, 40285, ...]
[...                                    ...]
[1, 1, 2, 6, 24, 120, 720, 5040, 40320, ...] A000142 = main diagonal.
		

Crossrefs

Programs

  • Maple
    A:= proc(n, h) option remember; `if`(min(n, h)=0, 1, add(
          binomial(n-1, j-1)*A(j-1, h-1)*A(n-j, h), j=1..n))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Aug 21 2017
  • Mathematica
    A[n_, h_]:=A[n, h]=If[Min[n, h]==0, 1, Sum[Binomial[n - 1, j - 1] A[j - 1, h - 1] A[n - j, h] , {j, n}]]; Table[A[n, d - n], {d, 0, 12}, {n, 0, d}]//Flatten (* Indranil Ghosh, Aug 21 2017, after maple code *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def A(n, h): return 1 if min(n, h)==0 else sum([binomial(n - 1, j - 1)*A(j - 1, h - 1)*A(n - j, h) for j in range(1, n + 1)])
    for d in range(13): print([A(n, d - n) for n in range(d + 1)]) # Indranil Ghosh, Aug 21 2017, after Maple code
  • Sage
    # uses[bell_transform from A264428]
    def bell_number_matrix(ord, len):
        b = [1]*len; L = [b]
        for k in (1..ord-1):
            b = [sum(bell_transform(n, b)) for n in range(len)]
            L.append(b)
        return matrix(ZZ, L)
    print(bell_number_matrix(6, 9))
    

A264432 Third-order Bell numbers.

Original entry on oeis.org

1, 1, 2, 6, 24, 119, 700, 4748, 36403, 310851, 2922606, 29977587, 332929492, 3978258079, 50872884285, 692985674373, 10015172966221, 153021613683924, 2464031776132958, 41698912656882644, 739771703127828419, 13727160292457369098, 265876635231121617716
Offset: 0

Views

Author

Peter Luschny, Dec 02 2015

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, h) option remember; `if`(min(n, h)=0, 1, add(
          binomial(n-1, j-1)*b(j-1, h-1)*b(n-j, h), j=1..n))
        end:
    a:= n-> b(n, 3):
    seq(a(n), n=0..22);  # Alois P. Heinz, Aug 21 2017
  • Mathematica
    b[n_, h_]:=b[n, h]=If[Min[n, h]==0, 1, Sum[Binomial[n - 1, j - 1] b[j - 1, h - 1] b[n - j, h] , {j, n}]]; Table[b[n, 3], {n, 0, 30}] (* Indranil Ghosh, Aug 21 2017, after Maple code *)
  • PARI
    \\ For n>23 precision has to be adapted as needed!
    A = exp('x + O('x^33) );
    B = exp( intformal(A) );
    C = exp( intformal(B) );
    D = exp( intformal(C) );
    Vec( serlaplace(D) )
    
  • Python
    from sympy.core.cache import cacheit
    from sympy import binomial
    @cacheit
    def b(n, h): return 1 if min(n, h)==0 else sum(binomial(n - 1, j - 1)*b(j - 1, h - 1)*b(n - j, h) for j in range(1, n + 1))
    def a(n): return b(n, 3)
    print([a(n) for n in range(31)]) # Indranil Ghosh, Aug 21 2017, after Maple code
  • Sage
    # uses[bell_transform from A264428]
    def A264432_list(dim):
        uno = [1]*dim
        bell_number = [sum(bell_transform(n, uno)) for n in range(dim)]
        bell_number_2 = [sum(bell_transform(n, bell_number)) for n in range(dim)]
        return [sum(bell_transform(n, bell_number_2)) for n in range(dim)]
    print(A264432_list(23))
    
Showing 1-8 of 8 results.