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-10 of 27 results. Next

A005651 Sum of multinomial coefficients (n_1+n_2+...)!/(n_1!*n_2!*...) where (n_1, n_2, ...) runs over all integer partitions of n.

Original entry on oeis.org

1, 1, 3, 10, 47, 246, 1602, 11481, 95503, 871030, 8879558, 98329551, 1191578522, 15543026747, 218668538441, 3285749117475, 52700813279423, 896697825211142, 16160442591627990, 307183340680888755, 6147451460222703502, 129125045333789172825, 2841626597871149750951
Offset: 0

Views

Author

Keywords

Comments

This is the total number of hierarchies of n labeled elements arranged on 1 to n levels. A distribution of elements onto levels is "hierarchical" if a level l+1 contains <= elements than level l. Thus for n=4 the arrangement {1,2}:{3}{4} is not allowed. See also A140585. Examples: Let the colon ":" separate two consecutive levels l and l+1. Then n=2 --> 3: {1}{2}, {1}:{2}, {2}:{1}, n=3 --> 10: {1}{2}{3}, {1}{2}:{3}, {3}{1}:{2}, {2}{3}:{1}, {1}:{2}:{3}, {3}:{1}:{2}, {2}:{3}:{1}, {1}:{3}:{2}, {2}:{1}:{3}, {3}:{2}:{1}. - Thomas Wieder, May 17 2008
n identical objects are painted by dipping them into a long row of cans of paint of distinct colors. Begining with the first can and not skipping any cans k, 1<=k<=n, objects are dipped (painted) and not more objects are dipped into any subsequent can than were dipped into the previous can. The painted objects are then linearly ordered. - Geoffrey Critzer, Jun 08 2009
a(n) is the number of partitions of n where each part i is marked with a word of length i over an n-ary alphabet whose letters appear in alphabetical order and all n letters occur exactly once in the partition. a(3) = 10: 3abc, 2ab1c, 2ac1b, 2bc1a, 1a1b1c, 1a1c1b, 1b1a1c, 1b1c1a, 1c1a1b, 1c1b1a. - Alois P. Heinz, Aug 30 2015
Also the number of ordered set partitions of {1,...,n} with weakly decreasing block sizes. - Gus Wiseman, Sep 03 2018
The parity of a(n) is that of A000110(A000120(n)), so a(n) is even if and only if A000120(n) == 2 (mod 3). - Álvar Ibeas, Aug 11 2020

Examples

			For n=3, say the first three cans in the row contain red, white, and blue paint respectively. The objects can be painted r,r,r or r,r,w or r,w,b and then linearly ordered in 1 + 3 + 6 = 10 ways. - _Geoffrey Critzer_, Jun 08 2009
From _Gus Wiseman_, Sep 03 2018: (Start)
The a(3) = 10 ordered set partitions with weakly decreasing block sizes:
  {{1},{2},{3}}
  {{1},{3},{2}}
  {{2},{1},{3}}
  {{2},{3},{1}}
  {{3},{1},{2}}
  {{3},{2},{1}}
  {{2,3},{1}}
  {{1,2},{3}}
  {{1,3},{2}}
  {{1,2,3}}
(End)
		

References

  • Abramowitz and Stegun, Handbook, p. 831, column labeled "M_1".
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 126.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Main diagonal of: A226873, A261719, A309973.
Row sums of: A226874, A262071, A327803.
Column k=1 of A309951.
Column k=0 of A327801.

Programs

  • Maple
    A005651b := proc(k) add( d/(d!)^(k/d),d=numtheory[divisors](k)) ; end proc:
    A005651 := proc(n) option remember; local k ; if n <= 1 then 1; else (n-1)!*add(A005651b(k)*procname(n-k)/(n-k)!, k=1..n) ; end if; end proc:
    seq(A005651(k), k=0..10) ; # R. J. Mathar, Jan 03 2011
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0 or i=1, n!,
          b(n, i-1) +binomial(n, i)*b(n-i, min(n-i, i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..25);  # Alois P. Heinz, Aug 29 2015, Dec 12 2016
  • Mathematica
    Table[Total[n!/Map[Function[n, Apply[Times, n! ]], IntegerPartitions[n]]], {n, 0, 20}] (* Geoffrey Critzer, Jun 08 2009 *)
    Table[Total[Apply[Multinomial, IntegerPartitions[n], {1}]], {n, 0, 20}] (* Jean-François Alcover and Olivier Gérard, Sep 11 2014 *)
    b[n_, i_, t_] := b[n, i, t] = If[t==1, 1/n!, Sum[b[n-j, j, t-1]/j!, {j, i, n/t}]]; a[n_] := If[n==0, 1, n!*b[n, 0, n]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 20 2015, after Alois P. Heinz *)
  • Maxima
    a(m,n):=if n=m then 1 else sum(binomial(n,k)*a(k,n-k),k,m,(n/2))+1;
    makelist(a(1,n),n,0,17); /* Vladimir Kruchinin, Sep 06 2014 */
    
  • PARI
    a(n)=my(N=n!,s);forpart(x=n,s+=N/prod(i=1,#x,x[i]!));s \\ Charles R Greathouse IV, May 01 2015
    
  • PARI
    { my(n=25); Vec(serlaplace(prod(k=1, n, 1/(1-x^k/k!) + O(x*x^n)))) } \\ Andrew Howroyd, Dec 20 2017

Formula

E.g.f.: 1 / Product (1 - x^k/k!).
a(n) = Sum_{k=1..n} (n-1)!/(n-k)!*b(k)*a(n-k), where b(k) = Sum_{d divides k} d*d!^(-k/d). - Vladeta Jovovic, Oct 14 2002
a(n) ~ c * n!, where c = Product_{k>=2} 1/(1-1/k!) = A247551 = 2.52947747207915264... . - Vaclav Kotesovec, May 09 2014
a(n) = S(n,1), where S(n,m) = sum(k=m..n/2 , binomial(n,k)*S(n-k,k))+1, S(n,n)=1, S(n,m)=0 for nVladimir Kruchinin, Sep 06 2014
E.g.f.: exp(Sum_{k>=1} Sum_{j>=1} x^(j*k)/(k*(j!)^k)). - Ilya Gutkovskiy, Jun 18 2018

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 29 2003

A027306 a(n) = 2^(n-1) + ((1 + (-1)^n)/4)*binomial(n, n/2).

Original entry on oeis.org

1, 1, 3, 4, 11, 16, 42, 64, 163, 256, 638, 1024, 2510, 4096, 9908, 16384, 39203, 65536, 155382, 262144, 616666, 1048576, 2449868, 4194304, 9740686, 16777216, 38754732, 67108864, 154276028, 268435456, 614429672, 1073741824, 2448023843
Offset: 0

Views

Author

Keywords

Comments

Inverse binomial transform of A027914. Hankel transform (see A001906 for definition) is {1, 2, 3, 4, ..., n, ...}. - Philippe Deléham, Jul 21 2005
Number of walks of length n on a line that starts at the origin and ends at or above 0. - Benjamin Phillabaum, Mar 05 2011
Number of binary integers (i.e., with a leading 1 bit) of length n+1 which have a majority of 1-bits. E.g., for n+1=4: (1011, 1101, 1110, 1111) a(3)=4. - Toby Gottfried, Dec 11 2011
Number of distinct symmetric staircase walks connecting opposite corners of a square grid of side n > 1. - Christian Barrientos, Nov 25 2018
From Gus Wiseman, Aug 20 2021: (Start)
Also the number of integer compositions of n + 1 with alternating sum > 0, where the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. These compositions are ranked by A345917. For example, the a(0) = 1 through a(4) = 11 compositions are:
(1) (2) (3) (4) (5)
(21) (31) (32)
(111) (112) (41)
(211) (113)
(122)
(212)
(221)
(311)
(1121)
(2111)
(11111)
The following relate to these compositions:
- The unordered version is A027193.
- The complement is counted by A058622.
- The reverse unordered version is A086543.
- The version for alternating sum >= 0 is A116406.
- The version for alternating sum < 0 is A294175.
- Ranked by A345917. (End)
The Gauss congruences a(n*p^k) == a(n^p^(k-1)) (mod p^k) hold for prime p and positive integers n and k. - Peter Bala, Jan 07 2022

Examples

			From _Gus Wiseman_, Aug 20 2021: (Start)
The a(0) = 1 through a(4) = 11 binary numbers with a majority of 1-bits (Gottfried's comment) are:
  1   11   101   1011   10011
           110   1101   10101
           111   1110   10110
                 1111   10111
                        11001
                        11010
                        11011
                        11100
                        11101
                        11110
                        11111
The version allowing an initial zero is A058622.
(End)
		

References

  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.1.6)

Crossrefs

a(n) = Sum{(k+1)T(n, m-k)}, 0<=k<=[ (n+1)/2 ], T given by A008315.
Column k=2 of A226873. - Alois P. Heinz, Jun 21 2013
The even bisection is A000302.
The odd bisection appears to be A032443.

Programs

  • GAP
    List([0..35],n->Sum([0..Int(n/2)],k->Binomial(n,k))); # Muniru A Asiru, Nov 27 2018
  • Haskell
    a027306 n = a008949 n (n `div` 2)  -- Reinhard Zumkeller, Nov 14 2014
    
  • Magma
    [2^(n-1)+(1+(-1)^n)/4*Binomial(n, n div 2): n in [0..40]]; // Vincenzo Librandi, Jun 19 2016
    
  • Maple
    a:= proc(n) add(binomial(n, j), j=0..n/2) end:
    seq(a(n), n=0..32); # Zerinvary Lajos, Mar 29 2009
  • Mathematica
    Table[Sum[Binomial[n, k], {k, 0, Floor[n/2]}], {n, 1, 35}]
    (* Second program: *)
    a[0] = a[1] = 1; a[2] = 3; a[n_] := a[n] = (2(n-1)(2a[n-2] + a[n-1]) - 8(n-2) a[n-3])/n; Array[a, 33, 0] (* Jean-François Alcover, Sep 04 2016 *)
  • PARI
    a(n)=if(n<0,0,(2^n+if(n%2,0,binomial(n, n/2)))/2)
    

Formula

a(n) = Sum_{k=0..floor(n/2)} binomial(n,k).
Odd terms are 2^(n-1). Also a(2n) - 2^(2n-1) is given by A001700. a(n) = 2^n + (n mod 2)*binomial(n, (n-1)/2).
E.g.f.: (exp(2x) + I_0(2x))/2.
O.g.f.: 2*x/(1-2*x)/(1+2*x-((1+2*x)*(1-2*x))^(1/2)). - Vladeta Jovovic, Apr 27 2003
a(n) = A008949(n, floor(n/2)); a(n) + a(n-1) = A248574(n), n > 0. - Reinhard Zumkeller, Nov 14 2014
From Peter Bala, Jul 21 2015: (Start)
a(n) = [x^n]( 2*x - 1/(1 - x) )^n.
O.g.f.: (1/2)*( 1/sqrt(1 - 4*x^2) + 1/(1 - 2*x) ).
Inverse binomial transform is (-1)^n*A246437(n).
exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + ... is the o.g.f. for A001405. (End)
a(n) = Sum_{k=1..floor((n+1)/2)} binomial(n-1,(2n+1-(-1)^n)/4 -k). - Anthony Browne, Jun 18 2016
D-finite with recurrence: n*a(n) + 2*(-n+1)*a(n-1) + 4*(-n+1)*a(n-2) + 8*(n-2)*a(n-3) = 0. - R. J. Mathar, Aug 09 2017

Extensions

Better description from Robert G. Wilson v, Aug 30 2000 and from Yong Kong (ykong(AT)curagen.com), Dec 28 2000

A182172 Number A(n,k) of standard Young tableaux of n cells and height <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 3, 1, 0, 1, 1, 2, 4, 6, 1, 0, 1, 1, 2, 4, 9, 10, 1, 0, 1, 1, 2, 4, 10, 21, 20, 1, 0, 1, 1, 2, 4, 10, 25, 51, 35, 1, 0, 1, 1, 2, 4, 10, 26, 70, 127, 70, 1, 0, 1, 1, 2, 4, 10, 26, 75, 196, 323, 126, 1, 0, 1, 1, 2, 4, 10, 26, 76, 225, 588, 835, 252, 1, 0
Offset: 0

Views

Author

Alois P. Heinz, Apr 16 2012

Keywords

Comments

Also the number A(n,k) of standard Young tableaux of n cells and <= k columns.
A(n,k) is also the number of n-length words w over a k-ary alphabet {a1,a2,...,ak} such that for every prefix z of w we have #(z,a1) >= #(z,a2) >= ... >= #(z,ak), where #(z,x) counts the letters x in word z. The A(4,4) = 10 words of length 4 over alphabet {a,b,c,d} are: aaaa, aaab, aaba, abaa, aabb, abab, aabc, abac, abca, abcd.

Examples

			A(4,2) = 6, there are 6 standard Young tableaux of 4 cells and height <= 2:
  +------+  +------+  +---------+  +---------+  +---------+  +------------+
  | 1  3 |  | 1  2 |  | 1  3  4 |  | 1  2  4 |  | 1  2  3 |  | 1  2  3  4 |
  | 2  4 |  | 3  4 |  | 2 .-----+  | 3 .-----+  | 4 .-----+  +------------+
  +------+  +------+  +---+        +---+        +---+
Square array A(n,k) begins:
  1,  1,  1,   1,   1,   1,   1,   1,   1, ...
  0,  1,  1,   1,   1,   1,   1,   1,   1, ...
  0,  1,  2,   2,   2,   2,   2,   2,   2, ...
  0,  1,  3,   4,   4,   4,   4,   4,   4, ...
  0,  1,  6,   9,  10,  10,  10,  10,  10, ...
  0,  1, 10,  21,  25,  26,  26,  26,  26, ...
  0,  1, 20,  51,  70,  75,  76,  76,  76, ...
  0,  1, 35, 127, 196, 225, 231, 232, 232, ...
  0,  1, 70, 323, 588, 715, 756, 763, 764, ...
		

Crossrefs

Main diagonal gives A000085.
A(2n,n) gives A293128.

Programs

  • Maple
    h:= proc(l) local n; n:=nops(l); add(i, i=l)! /mul(mul(1+l[i]-j
           +add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
        end:
    g:= proc(n, i, l) option remember;
          `if`(n=0, h(l), `if`(i<1, 0, `if`(i=1, h([l[], 1$n]),
            g(n, i-1, l) +`if`(i>n, 0, g(n-i, i, [l[], i])))))
        end:
    A:= (n, k)-> g(n, k, []):
    seq(seq(A(n, d-n), n=0..d), d=0..15);
  • Mathematica
    h[l_List] := Module[{n = Length[l]}, Sum[i, {i, l}]!/Product[Product[1 + l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}]];
    g[n_, i_, l_List] := g[n, i, l] = If[n == 0, h[l], If[i < 1, 0, If[i == 1, h[Join[l, Array[1&, n]]], g [n, i-1, l] + If[i > n, 0, g[n-i, i, Append[l, i]]]]]];
    a[n_, k_] := g[n, k, {}];
    Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 15}] // Flatten (* Jean-François Alcover, Dec 06 2013, translated from Maple *)

Formula

Conjecture: A(n,k) ~ k^n/Pi^(k/2) * (k/n)^(k*(k-1)/4) * Product_{j=1..k} Gamma(j/2). - Vaclav Kotesovec, Sep 12 2013

A226874 Number T(n,k) of n-length words w over a k-ary alphabet {a1, a2, ..., ak} such that #(w,a1) >= #(w,a2) >= ... >= #(w,ak) >= 1, where #(w,x) counts the letters x in word w; triangle T(n,k), n >= 0, 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 3, 6, 0, 1, 10, 12, 24, 0, 1, 15, 50, 60, 120, 0, 1, 41, 180, 300, 360, 720, 0, 1, 63, 497, 1260, 2100, 2520, 5040, 0, 1, 162, 1484, 6496, 10080, 16800, 20160, 40320, 0, 1, 255, 5154, 20916, 58464, 90720, 151200, 181440, 362880
Offset: 0

Views

Author

Alois P. Heinz, Jun 21 2013

Keywords

Comments

T(n,k) is the sum of multinomials M(n; lambda), where lambda ranges over all partitions of n into parts that form a multiset of size k.

Examples

			T(4,2) = 10: aaab, aaba, aabb, abaa, abab, abba, baaa, baab, baba, bbaa.
T(4,3) = 12: aabc, aacb, abac, abca, acab, acba, baac, baca, bcaa, caab, caba, cbaa.
T(5,2) = 15: aaaab, aaaba, aaabb, aabaa, aabab, aabba, abaaa, abaab, ababa, abbaa, baaaa, baaab, baaba, babaa, bbaaa.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  1,   2;
  0,  1,   3,    6;
  0,  1,  10,   12,   24;
  0,  1,  15,   50,   60,   120;
  0,  1,  41,  180,  300,   360,   720;
  0,  1,  63,  497, 1260,  2100,  2520,  5040;
  0,  1, 162, 1484, 6496, 10080, 16800, 20160, 40320;
  ...
		

Crossrefs

Main diagonal gives: A000142.
Row sums give: A005651.
T(2n,n) gives A318796.

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(t=1, 1/n!, add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    T:= (n, k)-> `if`(n*k=0, `if`(n=k, 1, 0), n!*b(n, 1, k)):
    seq(seq(T(n, k), k=0..n), n=0..12);
    # second Maple program:
    b:= proc(n, i) option remember; expand(
          `if`(n=0, 1, `if`(i<1, 0, add(x^j*b(n-i*j, i-1)*
          combinat[multinomial](n, n-i*j, i$j), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[t == 1, 1/n!, Sum[b[n - j, j, t - 1]/j!, {j, i, n/t}]]; t[n_, k_] := If[n*k == 0, If[n == k, 1, 0], n!*b[n, 1, k]]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from first Maple *)
  • PARI
    T(n)={Vec(serlaplace(prod(k=1, n, 1/(1-y*x^k/k!) + O(x*x^n))))}
    {my(t=T(10)); for(n=1, #t, for(k=0, n-1, print1(polcoeff(t[n], k), ", ")); print)} \\ Andrew Howroyd, Dec 20 2017

Formula

T(n,k) = A226873(n,k) - [k>0] * A226873(n,k-1).

A131632 Triangle T(n,k) read by rows = number of partitions of n-set into k blocks with distinct sizes, k = 1..A003056(n).

Original entry on oeis.org

1, 1, 1, 3, 1, 4, 1, 15, 1, 21, 60, 1, 63, 105, 1, 92, 448, 1, 255, 2016, 1, 385, 4980, 12600, 1, 1023, 15675, 27720, 1, 1585, 61644, 138600, 1, 4095, 155155, 643500, 1, 6475, 482573, 4408404, 1, 16383, 1733550, 12687675, 37837800, 1, 26332, 4549808, 60780720
Offset: 1

Views

Author

Vladeta Jovovic, Sep 04 2007

Keywords

Comments

Row sums = A007837.
Sum k! * T(n,k) = A032011.
Sum k * T(n,k) = A131623. - Geoffrey Critzer, Aug 30 2012.
T(n,k) is also the number of words w of length n over a k-ary alphabet {a1,a2,...,ak} with #(w,a1) > #(w,a2) > ... > #(w,ak) > 0, where #(w,x) counts the letters x in word w. T(5,2) = 15: aaaab, aaaba, aaabb, aabaa, aabab, aabba, abaaa, abaab, ababa, abbaa, baaaa, baaab, baaba, babaa, bbaaa. - Alois P. Heinz, Jun 21 2013

Examples

			Triangle T(n,k)begins:
  1;
  1;
  1,     3;
  1,     4;
  1,    15;
  1,    21,      60;
  1,    63,     105;
  1,    92,     448;
  1,   255,    2016;
  1,   385,    4980,    12600;
  1,  1023,   15675,    27720;
  1,  1585,   61644,   138600;
  1,  4095,  155155,   643500;
  1,  6475,  482573,  4408404;
  1, 16383, 1733550, 12687675, 37837800;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, v) option remember; `if`(t=1, 1/(n+v)!,
          add(b(n-j, j, t-1, v+1)/(j+v)!, j=i..n/t))
        end:
    T:= (n, k)->`if`(k*(k+1)/2>n, 0, n!*b(n-k*(k+1)/2, 0, k, 1)):
    seq(seq(T(n, k), k=1..floor(sqrt(2+2*n)-1/2)), n=1..20);
    # Alois P. Heinz, Jun 21 2013
    # second Maple program:
    b:= proc(n, i) option remember; `if`(i*(i+1)/2 (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2)):
    seq(T(n), n=1..20);  # Alois P. Heinz, Sep 27 2019
  • Mathematica
    nn=10;p=Product[1+y x^i/i!,{i,1,nn}];Range[0,nn]! CoefficientList[ Series[p,{x,0,nn}],{x,y}]//Grid  (* Geoffrey Critzer, Aug 30 2012 *)

Formula

E.g.f.: Product_{n>=1} (1+y*x^n/n!).
T(A000217(n),n) = A022915(n). - Alois P. Heinz, Jul 03 2018

A292506 Number T(n,k) of multisets of exactly k nonempty binary words with a total of n letters such that no word has a majority of 0's; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 3, 1, 0, 4, 3, 1, 0, 11, 10, 3, 1, 0, 16, 23, 10, 3, 1, 0, 42, 59, 33, 10, 3, 1, 0, 64, 134, 83, 33, 10, 3, 1, 0, 163, 320, 230, 98, 33, 10, 3, 1, 0, 256, 699, 568, 270, 98, 33, 10, 3, 1, 0, 638, 1599, 1451, 738, 291, 98, 33, 10, 3, 1, 0, 1024, 3434, 3439, 1935, 798, 291, 98, 33, 10, 3, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 17 2017

Keywords

Examples

			T(4,2) = 10: {1,011}, {1,101}, {1,110}, {1,111}, {01,01}, {01,10}, {01,11}, {10,10}, {10,11}, {11,11}.
Triangle T(n,k) begins:
  1;
  0,   1;
  0,   3,    1;
  0,   4,    3,    1;
  0,  11,   10,    3,   1;
  0,  16,   23,   10,   3,   1;
  0,  42,   59,   33,  10,   3,  1;
  0,  64,  134,   83,  33,  10,  3,  1;
  0, 163,  320,  230,  98,  33, 10,  3,  1;
  0, 256,  699,  568, 270,  98, 33, 10,  3, 1;
  0, 638, 1599, 1451, 738, 291, 98, 33, 10, 3, 1;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A027306 (for n>0), A316403, A316404, A316405, A316406, A316407, A316408, A316409, A316410, A316411.
Row sums give A292548.
T(2n,n) gives A292549.

Programs

  • Maple
    g:= n-> 2^(n-1)+`if`(n::odd, 0, binomial(n, n/2)/2):
    b:= proc(n, i) option remember; expand(`if`(n=0 or i=1, x^n,
          add(binomial(g(i)+j-1, j)*b(n-i*j, i-1)*x^j, j=0..n/i)))
        end:
    T:= n-> (p-> seq(coeff(p,x,i), i=0..n))(b(n$2)):
    seq(T(n), n=0..12);
  • Mathematica
    g[n_] := 2^(n-1) + If[OddQ[n], 0, Binomial[n, n/2]/2];
    b[n_, i_] := b[n, i] = Expand[If[n == 0 || i == 1, x^n, Sum[Binomial[g[i] + j - 1, j]*b[n - i*j, i - 1]*x^j, {j, 0, n/i}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, n]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jun 06 2018, from Maple *)

Formula

G.f.: Product_{j>=1} 1/(1-y*x^j)^A027306(j).

A292795 Number A(n,k) of sets of nonempty words with a total of n letters over k-ary alphabet such that within each word every letter of the alphabet is at least as frequent as the subsequent alphabet letter; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 3, 2, 0, 1, 1, 3, 7, 2, 0, 1, 1, 3, 13, 18, 3, 0, 1, 1, 3, 13, 36, 42, 4, 0, 1, 1, 3, 13, 60, 122, 110, 5, 0, 1, 1, 3, 13, 60, 206, 433, 250, 6, 0, 1, 1, 3, 13, 60, 326, 865, 1356, 627, 8, 0, 1, 1, 3, 13, 60, 326, 1345, 3408, 4449, 1439, 10, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 23 2017

Keywords

Examples

			A(2,3) = 3: {aa}, {ab}, {ba}.
A(3,2) = 7: {aaa}, {aab}, {aba}, {baa}, {aa,a}, {ab,a}, {ba,a}.
A(3,3) = 13: {aaa}, {aab}, {aba}, {baa}, {abc}, {acb}, {bac}, {bca}, {cab}, {cba}, {aa,a}, {ab,a}, {ba,a}.
Square array A(n,k) begins:
  1, 1,   1,    1,     1,     1,     1,     1,      1, ...
  0, 1,   1,    1,     1,     1,     1,     1,      1, ...
  0, 1,   3,    3,     3,     3,     3,     3,      3, ...
  0, 2,   7,   13,    13,    13,    13,    13,     13, ...
  0, 2,  18,   36,    60,    60,    60,    60,     60, ...
  0, 3,  42,  122,   206,   326,   326,   326,    326, ...
  0, 4, 110,  433,   865,  1345,  2065,  2065,   2065, ...
  0, 5, 250, 1356,  3408,  6228,  9468, 14508,  14508, ...
  0, 6, 627, 4449, 15025, 29845, 51325, 76525, 116845, ...
		

Crossrefs

Rows n=0-1 give: A000012, A057427.
Main diagonal gives A292796.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(t=1, 1/n!,
          add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    g:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), n!*b(n, 0, k)):
    h:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(h(n-i*j, i-1, k)*binomial(g(i, k), j), j=0..n/i)))
        end:
    A:= (n, k)-> h(n$2, min(n, k)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[t == 1, 1/n!, Sum[b[n - j, j, t - 1]/j!, {j, i, n/t}]];
    g[n_, k_] := If[k == 0, If[n == 0, 1, 0], n!*b[n, 0, k]];
    h[n_, i_, k_] := h[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[h[n - i*j, i - 1, k]*Binomial[g[i, k], j], {j, 0, n/i}]]];
    A[n_, k_] := h[n, n, Min[n, k]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 14}] // Flatten(* Jean-François Alcover, Jan 02 2021, after Alois P. Heinz *)

Formula

G.f. of column k: Product_{j>=1} (1+x^j)^A226873(j,k).
A(n,k) = Sum_{j=0..n} A319498(n,j).

A092255 a(0) = 1; for n > 0, a(n) = b(n) - n*b(n-1), b() = A076177().

Original entry on oeis.org

1, 1, 3, 10, 23, 66, 222, 561, 1647, 5410, 14318, 42351, 137018, 372191, 1105275, 3537540, 9772767, 29090826, 92364198, 258208671, 769820418, 2429091885, 6850744365, 20447143866, 64200928194, 182303186391, 544550917797, 1702925802766, 4861918919447
Offset: 0

Views

Author

N. J. A. Sloane, Feb 20 2004

Keywords

Comments

For n>=1, a(n) mod 2 = A010060(n) the Thue-Morse sequence - Benoit Cloitre, Mar 22 2004
Number of ternary words of length n in which count(0's) <= count(1's) <= count(2's). a(2) = 3: words 12 and 21 with counts (0,1,1) and 22 with counts (0,0,2). - David Scambler, Aug 06 2012

Crossrefs

Column k=3 of A226873. - Alois P. Heinz, Jun 21 2013

Programs

  • Maple
    a:= n-> n! *add(add(1/(k!*j!*(n-k-j)!), j=k..(n-k)/2), k=0..n/3):
    seq(a(n), n=0..40);  # Alois P. Heinz, Aug 07 2012
  • Mathematica
    CoefficientList[Series[(HypergeometricPFQ[{},{},x]^3 + 3*HypergeometricPFQ[{},{},x]*HypergeometricPFQ[{},{1},x^2] + 2*HypergeometricPFQ[{},{1,1},x^3])/6,{x,0,30}],x]*Range[0,30]! (* Vaclav Kotesovec, Jul 01 2013 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,i,sum(k=0,j,if(i+j+k-n,0,n!/i!/j!/k!))))

Formula

a(n) = n!*sum(i+j+k=n, 1/(i!*j!*k!)) (0<=k<=j<=i<=n). - Benoit Cloitre, Mar 22 2004
Recurrence: (n-3)*(n-1)*n^2*(63*n^3-561*n^2+1556*n-1343)*a(n) = (n-1)^2*(315*n^5 - 4065*n^4 + 19720*n^3 - 44240*n^2 + 44790*n - 15768)*a(n-1) - 3*(63*n^4 - 813*n^3 + 3392*n^2 - 5091*n + 2241)*(n-2)^3*a(n-2) + 9*(n-3)*(126*n^5 - 1311*n^4 + 4801*n^3 - 7677*n^2 + 5409*n - 1464)*(n-2)*a(n-3) - 27*(n-3)*(315*n^5 - 4065*n^4 + 19720*n^3 - 44240*n^2 + 44790*n - 15768)*(n-2)*a(n-4) + 81*(n-4)*(n-3)*(63*n^4 - 813*n^3 + 3392*n^2 - 5091*n + 2241)*(n-2)*a(n-5) + 243*(n-5)*(n-4)*(n-3)*(63*n^3-372*n^2+623*n-285)*(n-2)*a(n-6). - Vaclav Kotesovec, Jun 30 2013
a(n) ~ 1/2 * 3^(n-1) * (1 + 3/(2*sqrt(Pi*n/3)) + sqrt(3)*(1+2*cos(2*Pi*n/3))/(Pi*n)). - Vaclav Kotesovec, Mar 07 2014

Extensions

More terms from Benoit Cloitre, Mar 22 2004

A292712 Number A(n,k) of multisets of nonempty words with a total of n letters over k-ary alphabet such that within each word every letter of the alphabet is at least as frequent as the subsequent alphabet letter; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 4, 3, 0, 1, 1, 4, 8, 5, 0, 1, 1, 4, 14, 25, 7, 0, 1, 1, 4, 14, 43, 53, 11, 0, 1, 1, 4, 14, 67, 139, 148, 15, 0, 1, 1, 4, 14, 67, 223, 495, 328, 22, 0, 1, 1, 4, 14, 67, 343, 951, 1544, 858, 30, 0, 1, 1, 4, 14, 67, 343, 1431, 3680, 5111, 1938, 42, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 21 2017

Keywords

Examples

			A(2,3) = 4: {aa}, {ab}, {ba}, {a,a}.
A(3,2) = 8: {aaa}, {aab}, {aba}, {baa}, {aa,a}, {ab,a}, {ba,a}, {a,a,a}.
A(3,3) = 14: {aaa}, {aab}, {aba}, {baa}, {abc}, {acb}, {bac}, {bca}, {cab}, {cba}, {aa,a}, {ab,a}, {ba,a}, {a,a,a}.
Square array A(n,k) begins:
  1,  1,   1,    1,     1,     1,     1,     1,      1, ...
  0,  1,   1,    1,     1,     1,     1,     1,      1, ...
  0,  2,   4,    4,     4,     4,     4,     4,      4, ...
  0,  3,   8,   14,    14,    14,    14,    14,     14, ...
  0,  5,  25,   43,    67,    67,    67,    67,     67, ...
  0,  7,  53,  139,   223,   343,   343,   343,    343, ...
  0, 11, 148,  495,   951,  1431,  2151,  2151,   2151, ...
  0, 15, 328, 1544,  3680,  6620,  9860, 14900,  14900, ...
  0, 22, 858, 5111, 16239, 31539, 53739, 78939, 119259, ...
		

Crossrefs

Rows n=0-1 give: A000012, A057427.
Main diagonal gives A292713.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(t=1, 1/n!,
          add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    g:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), n!*b(n, 0, k)):
    A:= proc(n, k) option remember; `if`(n=0, 1, add(add(d*
          g(d, k), d=numtheory[divisors](j))*A(n-j, k), j=1..n)/n)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[t == 1, 1/n!, Sum[b[n - j, j, t - 1]/j!, {j, i, n/t}]];
    g[n_, k_] := If[k == 0, If[n == 0, 1, 0], n!*b[n, 0, k]];
    A[n_, k_] := A[n, k] = If[n == 0, 1, Sum[Sum[d*g[d, k], {d, Divisors[j]}]* A[n - j, k], {j, 1, n}]/n];
    Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jun 07 2018, from Maple *)

Formula

G.f. of column k: Product_{j>=1} 1/(1-x^j)^A226873(j,k).
A(n,n) = A(n,k) for all k >= n.
A(n,k) = Sum_{j=0..n} A319495(n,j).

A092429 a(n) = n! * Sum_{i,j,k,l >= 0, i+j+k+l = n} 1/(i!*j!*k!*l!).

Original entry on oeis.org

1, 1, 3, 10, 47, 126, 522, 1821, 8143, 26326, 109958, 396111, 1737122, 5998955, 24949277, 91979985, 397402223, 1418993350, 5881338702, 22010456331, 94022106862, 342803313261, 1416758002487, 5356198979731, 22685035586290, 83911052895151, 345921828889367
Offset: 0

Views

Author

Benoit Cloitre, Mar 22 2004

Keywords

Comments

a(n) is even iff n is a sum of 2 distinct powers of 2.

Crossrefs

Column k=4 of A226873. - Alois P. Heinz, Jun 21 2013

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(t=1, 1/n!, add(b(n-j, j, t-1)/j!, j=i..n/t))
        end:
    a:= n-> n!*b(n, 0, 4):
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 21 2017
  • Mathematica
    Table[Sum[Sum[Sum[Sum[If[i+j+k+l==n,n!/i!/j!/k!/l!,0],{l,0,k}],{k,0,j}],{j,0,i}],{i,0,n}],{n,0,20}] (* Vaclav Kotesovec, Jul 01 2013 *)
    CoefficientList[Series[(HypergeometricPFQ[{},{},x]^4 +6*HypergeometricPFQ[{},{},x]^2 *HypergeometricPFQ[{},{1},x^2] +8*HypergeometricPFQ[{},{},x] *HypergeometricPFQ[{},{1,1},x^3] +3*HypergeometricPFQ[{},{1},x^2]^2 +6*HypergeometricPFQ[{},{1,1,1},x^4])/24, {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec after Vladeta Jovovic, Jul 01 2013 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,i,sum(k=0,j,sum(l=0,k,if(i+j+k+l-n,0,n!/i!/j!/k!/l!)))))

Formula

E.g.f.: (t(1)^4 + 6*t(1)^2*t(2) + 8*t(1)*t(3) + 3*t(2)^2 + 6*t(4))/24 where t(1) = hypergeom([],[],x), t(2) = hypergeom([],[1],x^2), t(3) = hypergeom([],[1,1],x^3) and t(4) = hypergeom([],[1,1,1],x^4). - Vladeta Jovovic, Sep 22 2007, typo corrected by Vaclav Kotesovec, Jul 01 2013
Conjecture: a(n) ~ 4^n/4!. - Vaclav Kotesovec, Mar 07 2014
Showing 1-10 of 27 results. Next