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.

Previous Showing 21-30 of 92 results. Next

A287417 Number A(n,k) of set partitions of [n] such that all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks are not larger than k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 2, 3, 0, 1, 1, 2, 5, 4, 0, 1, 1, 2, 5, 12, 5, 0, 1, 1, 2, 5, 15, 27, 6, 0, 1, 1, 2, 5, 15, 46, 58, 7, 0, 1, 1, 2, 5, 15, 52, 139, 121, 8, 0, 1, 1, 2, 5, 15, 52, 187, 410, 248, 9, 0, 1, 1, 2, 5, 15, 52, 203, 677, 1189, 503, 10, 0
Offset: 0

Views

Author

Alois P. Heinz, May 24 2017

Keywords

Examples

			A(5,3) = 46 = 52 - 6 = A000110(5) - 6 counts all set partitions of [5] except: 1234|5, 15|234, 15|23|4, 15|24|3, 15|2|34, 15|2|3|4.
Square array A(n,k) begins:
  1, 1,   1,   1,   1,   1,   1,   1, ...
  1, 1,   1,   1,   1,   1,   1,   1, ...
  0, 2,   2,   2,   2,   2,   2,   2, ...
  0, 3,   5,   5,   5,   5,   5,   5, ...
  0, 4,  12,  15,  15,  15,  15,  15, ...
  0, 5,  27,  46,  52,  52,  52,  52, ...
  0, 6,  58, 139, 187, 203, 203, 203, ...
  0, 7, 121, 410, 677, 824, 877, 877, ...
		

Crossrefs

Main diagonal gives A000110.

Programs

  • Maple
    b:= proc(n, k, l, t) option remember; `if`(n<1, 1, `if`(t-n>k, 0,
           b(n-1, k, map(x-> `if`(x-n>=k, [][], x), [l[], n]), n)) +add(
           b(n-1, k, sort(map(x-> `if`(x-n>=k, [][], x), subsop(j=n, l))),
           `if`(t-n>k, infinity, t)), j=1..nops(l)))
        end:
    A:= (n, k)-> b(n, min(k, n-1), [], n):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, k_, l_, t_] := b[n, k, l, t] = If[n < 1, 1, If[t - n > k, 0, b[n - 1, k, If[# - n >= k, Nothing, #]& /@  Append[l, n], n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]], If[t - n > k, Infinity, t]], {j, 1, Length[l]}]];
    A[n_, k_] := b[n, Min[k, n - 1], {}, n];
    Table[A[n, d - n], {d, 0, 14}, { n, 0, d}] // Flatten (* Jean-François Alcover, May 24 2018, translated from Maple *)

Formula

A(n,k) = Sum_{j=0..k} A287416(n,j).

A051846 Digits 1..n in strict descending order n..1 interpreted in base n+1.

Original entry on oeis.org

1, 7, 57, 586, 7465, 114381, 2054353, 42374116, 987654321, 25678050355, 736867805641, 23136292864686, 789018236134297, 29043982525261081, 1147797409030816545, 48471109094902544776, 2178347851919531492065, 103805969587115219182431
Offset: 1

Views

Author

Antti Karttunen, Dec 13 1999

Keywords

Comments

All odd-indexed (2n+1) terms are divisible by (2n+1). See A051847.
All even-indexed (2n) terms are divisible by n. - Alexander R. Povolotsky, Oct 20 2022

Examples

			a(1) = 1,
a(2) = 2*3 + 1 = 7,
a(3) = 3*(4^2) + 2*4 + 1 = 57,
a(4) = 4*(5^3) + 3*(5^2) + 2*5 + 1 = 586.
		

Crossrefs

The right edge of A051845.

Programs

  • Maple
    a(n) := proc(n) local i; add(i*((n+1)^(i-1)),i=1..n); end;
  • Mathematica
    Array[Sum[i*(# + 1)^(i - 1), {i, #}] &, 18] (* Michael De Vlieger, Apr 04 2024 *)
  • Maxima
    makelist(((n+1)^(n+1)*(n-1) + 1)/n^2,n,1,20); /* Martin Ettl, Jan 25 2013 */
    
  • PARI
    a(n)=((n+1)^(n+1)*(n-1)+1)/n^2
    
  • Python
    def a(n): return sum((i+1)*(n+1)**i for i in range(n))
    print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Apr 10 2022

Formula

a(n) = Sum_{i=1..n} i*(n+1)^(i-1).
a(n) = ((n+1)^(n+1)*(n-1) + 1)/n^2 = A062806(n+1)/(n+1) - (n+1)^(n+1). - Benoit Cloitre, Sep 28 2002
a(n) = A028310(n-1) * A023811(n+1) + A199969(n+1). - M. F. Hasler, Jan 22 2013
a(n) = (n-1) * A058128(n+1) + 1. - Seiichi Manyama, Apr 10 2022

Extensions

Minor edits in formulas by M. F. Hasler, Oct 11 2019

A255047 1 together with the positive terms of A000225.

Original entry on oeis.org

1, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647, 4294967295
Offset: 0

Views

Author

Omar E. Pol, Feb 15 2015

Keywords

Comments

Also, right border of A246674 arranged as an irregular triangle.
Essentially the same as A168604, A126646 and A000225.
Total number of lambda-parking functions induced by all partitions of n. a(0)=1: [], a(1)=1: [1], a(2)=3: [1], [2], [1,1], a(4)=7: [1], [2], [3], [1,1], [1,2], [2,1], [1,1,1]. - Alois P. Heinz, Dec 04 2015
Also, the decimal representation of the diagonal from the origin to the corner of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 645", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Jul 19 2017
Also number of multiset partitions of {1,1} U [n] into exactly 2 nonempty parts. a(2) = 3: 111|2, 11|12, 1|112. - Alois P. Heinz, Aug 18 2017
Also, the number of unlabeled connected P-series (equivalently, connected P-graphs) with n+1 elements. - Salah Uddin Mohammad, Nov 19 2021

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Row n=1 of A263159.
Column k=2 of A291117.
Cf. A078485.

Programs

  • Magma
    [1] cat [2^n -1: n in [1..40]]; // G. C. Greubel, Feb 07 2021
    
  • Mathematica
    CoefficientList[Series[(1 -2*x +2*x^2)/((1-x)*(1-2*x)), {x, 0, 33}], x] (* or *) LinearRecurrence[{3, -2}, {1,1,3}, 40] (* Vincenzo Librandi, Jul 20 2017 *)
    Table[2^n -1 +Boole[n==0], {n, 0, 40}] (* G. C. Greubel, Feb 07 2021 *)
  • Python
    def A255047(n): return -1^(-1<Chai Wah Wu, Dec 21 2022
  • Sage
    [1]+[2^n -1 for n in (1..40)] # G. C. Greubel, Feb 07 2021
    

Formula

From Alois P. Heinz, Feb 19 2015: (Start)
O.g.f.: (1 -2*x +2*x^2)/((1-x)*(1-2*x)).
E.g.f.: exp(2*x) - exp(x) + 1. (End)
a(n) = A078485(n+1) for n > 2. - Georg Fischer, Oct 22 2018

A047080 Triangular array T read by rows: T(h,k)=number of paths from (0,0) to (k,h-k) using step-vectors (0,1), (1,0), (1,1) with no right angles between pairs of consecutive steps.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 3, 1, 1, 4, 5, 5, 4, 1, 1, 5, 8, 9, 8, 5, 1, 1, 6, 12, 15, 15, 12, 6, 1, 1, 7, 17, 24, 27, 24, 17, 7, 1, 1, 8, 23, 37, 46, 46, 37, 23, 8, 1, 1, 9, 30, 55, 75, 83, 75, 55, 30, 9, 1, 1, 10, 38, 79, 118, 143, 143, 118, 79, 38, 10, 1
Offset: 0

Views

Author

Keywords

Comments

T(n,k) equals the number of reduced alignments between a string of length n and a string of length k. See Andrade et. al. - Peter Bala, Feb 04 2018

Examples

			E.g., row 3 consists of T(3,0)=1; T(3,1)=2; T(3,2)=2; T(3,3)=1.
Triangle begins:
  1;
  1,  1;
  1,  1,  1;
  1,  2,  2,  1;
  1,  3,  3,  3,  1;
  1,  4,  5,  5,  4,  1;
  1,  5,  8,  9,  8,  5,  1;
  1,  6, 12, 15, 15, 12,  6,  1;
		

Crossrefs

Programs

  • Magma
    F:=Factorial;
    p:= func< n,k | (&+[ (-1)^j*F(n+k-3*j)/(F(j)*F(n-2*j)*F(k-2*j)): j in [0..Min(Floor(n/2), Floor(k/2))]]) >;
    q:= func< n,k | n eq 0 or k eq 0 select 0 else (&+[ (-1)^j*F(n+k-3*j-2)/(F(j)*F(n-2*j-1)*F(k-2*j-1)) : j in [0..Min(Floor((n-1)/2), Floor((k-1)/2))]]) >;
    A:= func< n,k | p(n,k) - q(n,k) >;
    A047080:= func< n,k | n eq 0 select 1 else A(n-k, k) >;
    [[A(n,k): k in [1..6]]: n in [1..6]];
    [A047080(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 30 2022
    
  • Maple
    T := proc(n, k) option remember; if n < 0 or k > n then return 0 fi;
    if n < 3 then return 1 fi; if k < iquo(n,2) then return T(n, n-k) fi;
    T(n-1, k-1) + T(n-1, k) - T(n-4, k-2)  end:
    seq(seq(T(n,k), k=0..n), n=0..11); # Peter Luschny, Feb 11 2018
  • Mathematica
    T[n_, k_] := T[n, k] = Which[n<0 || k>n, 0, n<3, 1, kJean-François Alcover, Jul 30 2018 *)
  • SageMath
    f=factorial
    def p(n,k): return sum( (-1)^j*f(n+k-3*j)/(f(j)*f(n-2*j)*f(k-2*j)) for j in range(1+min((n//2), (k//2))) )
    def q(n,k): return sum( (-1)^j*f(n+k-3*j-2)/(f(j)*f(n-2*j-1)*f(k-2*j-1)) for j in range(1+min(((n-1)//2), ((k-1)//2))) )
    def A(n,k): return p(n,k) - q(n,k)
    def A047080(n,k): return A(n-k, k)
    flatten([[A047080(n,k) for k in range(n+1)] for n in range(14)]) # G. C. Greubel, Oct 30 2022

Formula

T(h, k) = T(h-1, k-1) + T(h-1, k) - T(h-4, k-2);
Writing T(h, k) = F(h-k, k), generating function for F is (1-xy)/(1-x-y+x^2y^2).
From Peter Bala, Feb 04 2018: (Start)
T(n, k) = (Sum_{i = 0..A} (-1)^i*(n+k-3*i)!/(i!*(n-2*i)!*(k-2*i)!)) - (Sum_{i = 0..B} (-1)^i*(n+k-3*i-2)!/(i!*(n-2*i-1)!*(k-2*i-1)!)), where A = min{floor(n/2), floor(k/2)} and B = min{floor((n-1)/2), floor((k-1)/2)}.
T(2*n, n) = A171155(n). (End)
From G. C. Greubel, Oct 30 2022: (Start) (formulas for triangle T(n,k))
T(n, n-k) = T(n, k).
T(n, n) = A000012(n).
T(n, n-1) = A028310(n-1).
T(n, n-2) = A089071(n-1) = A022856(n+1).
T(2*n, n-1) = A047087(n).
T(2*n+1, n-1) = A047088(n).
Sum_{k=0..n} T(n, k) = (-1)^n*A078042(n) = A001590(n+3).
Sum_{k=0..n} (-1)^k*T(n, k) = A091337(n+1).
Sum_{k=0..floor(n/2)} T(n, k) = A047084(n). (End)

Extensions

Sequence recomputed to correct terms from 23rd onward, and recurrence and generating function added by Michael L. Catalano-Johnson (mcj(AT)pa.wagner.com), Jan 14 2000

A147654 Result of using the positive integers 1,2,3,... as coefficients in an infinite polynomial series in x and then expressing this series as Product_{k>=1} (1+a(k)x^k).

Original entry on oeis.org

1, 2, 1, 3, 0, -2, 0, 9, 0, -6, 0, 4, 0, -18, 0, 93, 0, -54, 0, 72, 0, -186, 0, 232, 0, -630, 0, 1020, 0, -2106, 0, 10881, 0, -7710, 0, 13824, 0, -27594, 0, 49440, 0, -97902, 0, 191844, 0, -364722, 0, 590800, 0, -1340622, 0, 2656920, 0, -4918482, 0, 9791784, 0, -18512790
Offset: 1

Views

Author

Neil Fernandez, Nov 09 2008

Keywords

Examples

			From the positive integers 1,2,3,..., construct the series 1+x+2x^2+3x^3+4x^4+... a(1) is always the coefficient of x, here 1. Divide by (1+a(1)x), i.e. here (1+x), to get the quotient (1+a(2)x^2+...), which here gives a(2)=2. Then divide this quotient by (1+a(2)x^2), i.e. here (1+2x^2), to get (1+a(3)x^3+...), giving a(3)=1.
		

Crossrefs

Formula

Product_{k>=1} (1+a(k)*x^k) = 1 + Sum_{k>=1} k*x^k. - Seiichi Manyama, Jun 24 2018

Extensions

More terms from Seiichi Manyama, Jun 23 2018

A199205 Number of distinct values taken by 4th derivative of x^x^...^x (with n x's and parentheses inserted in all possible ways) at x=1.

Original entry on oeis.org

1, 1, 2, 4, 9, 17, 30, 50, 77, 113, 156, 212, 279, 355, 447, 560, 684, 822, 985, 1171, 1375, 1599, 1856, 2134, 2445, 2769, 3125, 3519, 3939, 4376, 4857, 5372, 5914, 6484, 7083, 7717, 8411, 9130, 9882, 10683, 11524, 12393
Offset: 1

Views

Author

Alois P. Heinz, Nov 03 2011

Keywords

Examples

			a(5) = 9 because the A000108(4) = 14 possible parenthesizations of x^x^x^x^x lead to 9 different values of the 4th derivative at x=1: (x^(x^(x^(x^x)))) -> 56; (x^(x^((x^x)^x))) -> 80; (x^((x^(x^x))^x)), (x^((x^x)^(x^x))) -> 104; ((x^x)^(x^(x^x))), ((x^(x^(x^x)))^x) -> 124; ((x^(x^x))^(x^x)) -> 148; (x^(((x^x)^x)^x)) -> 152; ((x^x)^((x^x)^x)), ((x^((x^x)^x))^x) -> 172; (((x^x)^x)^(x^x)), (((x^(x^x))^x)^x), (((x^x)^(x^x))^x) -> 228; ((((x^x)^x)^x)^x) -> 344.
		

Crossrefs

Cf. A000081 (distinct functions), A000108 (parenthesizations), A000012 (first derivatives), A028310 (2nd derivatives), A199085 (3rd derivatives), A199296 (5th derivatives), A002845, A003018, A003019, A145545, A145546, A145547, A145548, A145549, A145550, A082499, A196244, A198683, A215703, A215834. Column k=4 of A216368.

Programs

  • Maple
    f:= proc(n) option remember;
          `if`(n=1, {[0, 0, 0]},
                    {seq(seq(seq( [2+g[1], 3*(1 +g[1] +h[1]) +g[2],
                     8 +12*g[1] +6*h[1]*(1+g[1]) +4*(g[2]+h[2])+g[3]],
                     h=f(n-j)), g=f(j)), j=1..n-1)})
        end:
    a:= n-> nops(map(x-> x[3], f(n))):
    seq(a(n), n=1..20);
  • Mathematica
    f[n_] := f[n] = If[n == 1, {{0, 0, 0}}, Union @ Flatten[#, 3]& @ {Table[ Table[Table[{2 + g[[1]], 3*(1 + g[[1]] + h[[1]]) + g[[2]], 8 + 12*g[[1]] + 6*h[[1]]*(1 + g[[1]]) + 4*(g[[2]] + h[[2]]) + g[[3]]}, {h, f[n - j]}], {g, f[j]}], {j, 1, n - 1}]}];
    a[n_] := Length @ Union @ (#[[3]]& /@ f[n]);
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 32}] (* Jean-François Alcover, Jun 08 2018, after Alois P. Heinz *)

Extensions

a(41)-a(42) from Alois P. Heinz, Jun 01 2015

A199296 Number of distinct values taken by 5th derivative of x^x^...^x (with n x's and parentheses inserted in all possible ways) at x=1.

Original entry on oeis.org

1, 1, 2, 4, 9, 20, 45, 92, 182, 342, 601, 982, 1499, 2169, 2970, 3994, 5297, 6834, 8635, 10714, 13121, 16104, 19674, 23868, 28453, 33637, 39630, 46730
Offset: 1

Views

Author

Alois P. Heinz, Nov 04 2011

Keywords

Examples

			a(4) = 4 because the A000108(3) = 5 possible parenthesizations of x^x^x^x lead to 4 different values of the 5th derivative at x=1: (x^(x^(x^x))) -> 360; (x^((x^x)^x)) -> 590; ((x^(x^x))^x), ((x^x)^(x^x)) -> 650; (((x^x)^x)^x) -> 1110.
		

Crossrefs

Cf. A000081 (distinct functions), A000108 (parenthesizations), A000012 (first derivatives), A028310 (2nd derivatives), A199085 (3rd derivatives), A199205 (4th derivatives), A002845, A003018, A003019, A145545, A145546, A145547, A145548, A145549, A145550, A082499, A196244, A198683, A215703, A215835. Column k=5 of A216368.

Programs

  • Maple
    f:= proc(n) option remember;
          `if`(n=1, {[0, 0, 0, 0]},
                {seq(seq(seq([2+g[1], 3*(1 +g[1] +h[1]) +g[2],
                 8 +12*g[1] +6*h[1]*(1+g[1]) +4*(g[2]+h[2])+g[3],
                 10+50*h[1]+10*h[2]+5*h[3]+(30+30*h[1]+10*h[2]
                 +15*g[1])*g[1]+(20+10*h[1])*g[2]+5*g[3]+g[4]],
                  h=f(n-j)), g=f(j)), j=1..n-1)})
        end:
    a:= n-> nops(map(x-> x[4], f(n))):
    seq(a(n), n=1..20);
  • Mathematica
    f[n_] := f[n] = If[n == 1, {{0, 0, 0, 0}}, Union@Flatten[#, 3]& @ {Table[ Table[Table[{2 + g[[1]], 3*(1 + g[[1]] + h[[1]]) + g[[2]], 8 + 12*g[[1]] + 6*h[[1]]*(1 + g[[1]]) + 4*(g[[2]] + h[[2]]) + g[[3]], 10 + 50*h[[1]] + 10*h[[2]] + 5*h[[3]] + (30 + 30*h[[1]] + 10*h[[2]] + 15*g[[1]])*g[[1]] + (20 + 10*h[[1]])*g[[2]] + 5*g[[3]] + g[[4]]}, {h, f[n - j]}], {g, f[j]}], {j, 1, n - 1}]}];
    a[n_] := Length@Union@(#[[4]]& /@ f[n]);
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 24}] (* Jean-François Alcover, Sep 01 2023, after Alois P. Heinz *)

A216368 Number T(n,k) of distinct values taken by k-th derivative of x^x^...^x (with n x's and parentheses inserted in all possible ways) at x=1; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 4, 4, 1, 4, 7, 9, 9, 1, 5, 11, 17, 20, 20, 1, 6, 15, 30, 45, 48, 48, 1, 7, 20, 50, 92, 113, 115, 115, 1, 8, 26, 77, 182, 262, 283, 286, 286, 1, 9, 32, 113, 342, 591, 691, 717, 719, 719, 1, 10, 39, 156, 601, 1263, 1681, 1815, 1838, 1842, 1842
Offset: 1

Views

Author

Alois P. Heinz, Sep 05 2012

Keywords

Comments

T(n,k) <= A000081(n) because there are only A000081(n) different functions that can be represented with n x's.
It is not true that T(n,n) = T(n,n-1) for all n>1: T(13,13) - T(13,12) = 12486 - 12485 = 1.
Conjecture: T(n,n) = A000081(n) for n>=1. It would be nice to have a proof (or a disproof if the conjecture is wrong).
From Bradley Klee, Jun 01 2015 (Start):
I made a descendant graph (Plot 1) that shows how each derivative relates to the next. In this picture the number of nodes in row k gives the value T(n,k). You can see at n=6 collisions begin to occur, and at n=7 the situation is even worse. I then computed a new triangle with collisions removed (Plot 2) and values:
1
1 1
1 2 2
1 3 4 4
1 4 7 9 9
1 5 11 88 20 20
1 6 16 34 46 48 48
I suspect that Plot 2 will admit a recursive construction more readily than the graphs with collisions. You can already see that each graph "n-1" is a subgraph of graph "n" and that the remainder of graph "n" is similar to graph "n-1" with additional branches. (End)

Examples

			For n = 4 there are A000108(3) = 5 possible parenthesizations of x^x^x^x: [x^(x^(x^x)), x^((x^x)^x), (x^(x^x))^x, (x^x)^(x^x), ((x^x)^x)^x]. The first, second, third, fourth derivatives at x=1 are [1,1,1,1,1], [2,2,4,4,6], [9,15,18,18,27], [56,80,100,100,156] => row 4 = [1,3,4,4].
Triangle T(n,k) begins:
  1;
  1, 1;
  1, 2,  2;
  1, 3,  4,  4;
  1, 4,  7,  9,  9;
  1, 5, 11, 17, 20,  20;
  1, 6, 15, 30, 45,  48,  48;
  1, 7, 20, 50, 92, 113, 115, 115;
  ...
		

Crossrefs

Main diagonal gives (conjectured): A000081.

Programs

  • Maple
    with(combinat):
    F:= proc(n) F(n):=`if`(n<2, [(x+1)$n], map(h->(x+1)^h, g(n-1, n-1))) end:
    g:= proc(n, i) option remember; `if`(n=0 or i=1, [(x+1)^n],
         `if`(i<1, [], [seq(seq(seq(mul(F(i)[w[t]-t+1], t=1..j)*v,
          w=choose([$1..nops(F(i))+j-1], j)), v=g(n-i*j, i-1)), j=0..n/i)]))
        end:
    T:= proc(n) local i, l;
          l:= map(f->[seq(i!*coeff(series(f, x, n+1), x, i), i=1..n)], F(n));
          seq(nops({map(x->x[i], l)[]}), i=1..n)
        end:
    seq(T(n), n=1..10);
  • Mathematica
    g[n_, i_] := g[n, i] = If[i==1, {x^n}, Flatten@Table[Table[Table[Product[ T[i][[w[[t]] - t+1]], {t, 1, j}]*v, {v, g[n - i*j, i-1]}], {w, Subsets[ Range[Length[T[i]] + j - 1], {j}]}], {j, 0, n/i}]];
    T[n_] := T[n] = If[n==1, {x}, x^#& /@ g[n-1, n-1]];
    T[n_, k_] := Union[k! (SeriesCoefficient[#, {x, 0, k}]& /@ (T[n] /. x -> x+1))] // Length;
    Table[T[n, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Feb 08 2021, after Alois P. Heinz *)

A221857 Number A(n,k) of shapes of balanced k-ary trees with n nodes, where a tree is balanced if the total number of nodes in subtrees corresponding to the branches of any node differ by at most one; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 3, 1, 1, 0, 1, 1, 4, 3, 4, 1, 0, 1, 1, 5, 6, 1, 4, 1, 0, 1, 1, 6, 10, 4, 9, 4, 1, 0, 1, 1, 7, 15, 10, 1, 27, 1, 1, 0, 1, 1, 8, 21, 20, 5, 16, 27, 8, 1, 0, 1, 1, 9, 28, 35, 15, 1, 96, 81, 16, 1, 0, 1, 1, 10, 36, 56, 35, 6, 25, 256, 81, 32, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Apr 10 2013

Keywords

Examples

			: A(2,2) = 2  : A(2,3) = 3      : A(3,3) = 3          :
:   o     o   :   o    o    o   :   o      o      o   :
:  / \   / \  :  /|\  /|\  /|\  :  /|\    /|\    /|\  :
: o         o : o      o      o : o o    o   o    o o :
:.............:.................:.....................:
: A(3,4) = 6                                          :
:    o        o        o        o       o        o    :
:  /( )\    /( )\    /( )\    /( )\   /( )\    /( )\  :
: o o      o   o    o     o    o o     o   o      o o :
Square array A(n,k) begins:
  1, 1, 1,  1,   1,   1,  1,  1,  1,   1,   1, ...
  1, 1, 1,  1,   1,   1,  1,  1,  1,   1,   1, ...
  0, 1, 2,  3,   4,   5,  6,  7,  8,   9,  10, ...
  0, 1, 1,  3,   6,  10, 15, 21, 28,  36,  45, ...
  0, 1, 4,  1,   4,  10, 20, 35, 56,  84, 120, ...
  0, 1, 4,  9,   1,   5, 15, 35, 70, 126, 210, ...
  0, 1, 4, 27,  16,   1,  6, 21, 56, 126, 252, ...
  0, 1, 1, 27,  96,  25,  1,  7, 28,  84, 210, ...
  0, 1, 8, 81, 256, 250, 36,  1,  8,  36, 120, ...
		

Crossrefs

Rows n=0+1, 2-3, give: A000012, A001477, A179865.
Diagonal and upper diagonals give: A028310, A000217, A000292, A000332, A000389, A000579, A000580, A000581, A000582, A001287, A001288.
Lower diagonals give: A000012, A000290, A092364(n) for n>1.

Programs

  • Maple
    A:= proc(n, k) option remember; local m, r; if n<2 or k=1 then 1
          elif k=0 then 0 else r:= iquo(n-1, k, 'm');
          binomial(k, m)*A(r+1, k)^m*A(r, k)^(k-m) fi
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    a[n_, k_] := a[n, k] = Module[{m, r}, If[n < 2 || k == 1, 1, If[k == 0, 0, {r, m} = QuotientRemainder[n-1, k]; Binomial[k, m]*a[r+1, k]^m*a[r, k]^(k-m)]]]; Table[a[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Apr 17 2013, translated from Maple *)

A059110 Triangle T = A007318*A271703; T(n,m)= Sum_{i=0..n} L'(n,i)*binomial(i,m), m=0..n.

Original entry on oeis.org

1, 1, 1, 3, 4, 1, 13, 21, 9, 1, 73, 136, 78, 16, 1, 501, 1045, 730, 210, 25, 1, 4051, 9276, 7515, 2720, 465, 36, 1, 37633, 93289, 85071, 36575, 8015, 903, 49, 1, 394353, 1047376, 1053724, 519456, 137270, 20048, 1596, 64, 1, 4596553, 12975561
Offset: 0

Views

Author

Vladeta Jovovic, Jan 04 2001

Keywords

Comments

L'(n,i) are unsigned Lah numbers (cf. A008297): L'(n,i)=n!/i!*binomial(n-1,i-1) for i >= 1, L'(0,0)=1, L'(n,0)=0 for n>0. T(n,0)=A000262(n); T(n,2)=A052852(n). Row sums A052897.
Exponential Riordan array [e^(x/(1-x)),x/(1-x)]. - Paul Barry, Apr 28 2007
From Wolfdieter Lang, Jun 22 2017: (Start)
The inverse matrix T^(-1) is exponential Riordan (aka Sheffer) (e^(-x), x/(1+x)): T^(-1)(n, m) = (-1)^(n-m)*A271705(n, m).
The a- and z-sequences of this Sheffer (aka exponential Riordan) matrix are a = [1,1,repeat(0)] and z(n) = (-1)^(n+1)*A028310(n)/A000027(n-1) with e.g.f. ((1+x)/x)*(1-exp(-x)). For a- and z-sequences see a W. Lang link under A006232 with references. (End)

Examples

			The triangle T = A007318*A271703 starts:
n\m       0        1        2       3       4      5     6    7  8 9 ...
0:        1
1:        1        1
2:        3        4        1
3:       13       21        9       1
4:       73      136       78      16       1
5:      501     1045      730     210      25      1
6:     4051     9276     7515    2720     465     36     1
7:    37633    93289    85071   36575    8015    903    49    1
8:   394353  1047376  1053724  519456  137270  20048  1596   64  1
9:  4596553 12975561 14196708 7836276 2404206 427518 44436 2628 81 1
... reformatted. - _Wolfdieter Lang_, Jun 22 2017
E.g.f. for T(n, 2) = 1/2!*(x/(1-x))^2*e^(x/(x-1)) = 1*x^2/2 + 9*x^3/3! + 78*x^4/4! + 730*x^5/5! + 7515*x^6/6 + ...
From _Wolfdieter Lang_, Jun 22 2017: (Start)
The z-sequence starts: [1, 1/2, -2/3, 3/4, -4/5, 5/6, -6/7, 7/8, -8/9, ...
T recurrence: T(3, 0) = 3*(1*T(2,0) + (1/2)*T(2, 1) + (-2/3)*T(2 ,1)) = 3*(3 + (1/2)*4 - (2/3)) = 13; T(3, 1) = 3*(T(2, 0)/1 + T(2, 1)) = 3*(3 + 4) = 21.
Meixner type recurrence for R(2, x): (D - D^2)*(3 + 4*x + x^2) = 4 + 2*x - 2 = 2*(1 + x), (D = d/dx).
General Sheffer recurrence for R(2, x): (1+x)*(1 + 2*D + D^2)*(1 + x) = (1+x)*(1 + x + 2) = 3 + 4*x + x^2. (End)
		

Crossrefs

Programs

  • GAP
    Concatenation([1],Flat(List([1..10],n->List([0..n],m->Sum([0..n],i-> Factorial(n)/Factorial(i)*Binomial(n-1,i-1)*Binomial(i,m)))))); # Muniru A Asiru, Jul 25 2018
    
  • Magma
    A059110:= func< n,k | n eq 0 select 1 else Factorial(n-1)*Binomial(n,k)*Evaluate(LaguerrePolynomial(n-1, 1-k), -1) >;
    [A059110(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 23 2021
  • Maple
    Lprime := proc(n,i)
        if n = 0 and i = 0 then
            1;
        elif k = 0 then
            0 ;
        else
            n!/i!*binomial(n-1,i-1) ;
        end if;
    end proc:
    A059110 := proc(n,k)
        add(Lprime(n,i)*binomial(i,k),i=0..n) ;
    end proc: # R. J. Mathar, Mar 15 2013
  • Mathematica
    (* First program *)
    lp[n_, i_] := Binomial[n-1, i-1]*n!/i!; lp[0, 0] = 1; t[n_, m_] := Sum[lp[n, i]*Binomial[i, m], {i, 0, n}]; Table[t[n, m], {n, 0, 9}, {m, 0, n}] // Flatten (* Jean-François Alcover, Mar 26 2013 *)
    (* Second program *)
    A059110[n_, k_]:= If[n==0, 1, (n-1)!*Binomial[n, k]*LaguerreL[n-1, 1-k, -1]];
    Table[A059110[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 23 2021 *)
  • Sage
    def A059110(n, k): return 1 if n==0 else factorial(n-1)*binomial(n, k)*gen_laguerre(n-1, 1-k, -1)
    flatten([[A059110(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 23 2021
    

Formula

E.g.f. for column m: (1/m!)*(x/(1-x))^m*e^(x/(x-1)), m >= 0.
From Wolfdieter Lang, Jun 22 2017: (Start)
E.g.f. for row polynomials in powers of x (e.g.f. of the triangle): exp(z/(1-z))* exp(x*z/(1-z)) (exponential Riordan).
Recurrence: T(n, 0) = Sum_{j=0} z(j)*T(n-1, j), n >= 1, with z(n) = (-1)^(n+1)*A028310(n), T(0, 0) = 1, T(n, m) = 0 n < m, T(n, m) = n*(T(n-1, m-1)/m + T(n-1, m)), n >= m >= 1 (from the z- and a-sequence, see a comment above).
Meixner type recurrence for the (monic) row polynomials R(n, x) = Sum_{m=0..n} T(n, m)*x^m: Sum_{k=0..n-1} (-1)^k*D^(k+1)*R(n, x) = n*R(n-1, x), n >=1, R(0, x) = 1, with D = d/dx.
General Sheffer recurrence: R(n, x) = (x+1)*(1+D)^2*R(n-1, x), n >=1, R(0, x) = 1.
(End)
P_n(x) = L_n(1+x) = n!*Lag_n(-(1+x);1), where P_n(x) are the row polynomials of this entry; L_n(x), the Lah polynomials of A105278; and Lag_n(x;1), the Laguerre polynomials of order 1. These relations follow from the relation between the iterated operator (x^2 D)^n and ((1+x)^2 D)^n with D = d/dx. - Tom Copeland, Jul 18 2018
From G. C. Greubel, Feb 23 2021: (Start)
T(n, k) = (n-1)!*binomial(n, k)*LaguerreL(n-1, 1-k, -1) with T(0, 0) = 1.
Sum_{k=0..n} T(n, k) = A052897(n). (End)
Previous Showing 21-30 of 92 results. Next