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 10 results.

A005803 Second-order Eulerian numbers: a(n) = 2^n - 2*n.

Original entry on oeis.org

1, 0, 0, 2, 8, 22, 52, 114, 240, 494, 1004, 2026, 4072, 8166, 16356, 32738, 65504, 131038, 262108, 524250, 1048536, 2097110, 4194260, 8388562, 16777168, 33554382, 67108812, 134217674, 268435400, 536870854, 1073741764, 2147483586
Offset: 0

Views

Author

Keywords

Comments

Starting with n=2, a(n) is the second-order Eulerian number <> (see A008517).
Also, number of 3 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1), (01;0) and (01;1). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1Sergey Kitaev, Nov 11 2004
This is the number of target DNA sequences of the correct length present after each successive cycle of the Polymerase Chain Reaction (PCR). The first two cycles produce 0 target sequences, there are 2 target sequences present after the third cycle, then 8 after the fourth cycle, and so forth. - A. Timothy Royappa, Jun 16 2012
a(n+2) = the row sums of A222403. - J. M. Bergot, Apr 04 2018

Examples

			G.f. = 1 + 2*x^3 + 8*x^4 + 22*x^5 + 52*x^6 + 114*x^7 + 240*x^8 + 494*x^9 + ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed. Addison-Wesley, Reading, MA, 1994, p. 270.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equivalent to second column of A008517.
a(n) = A070313 + 1 = A052515 + 2. Bisection of A077866.
Equals for n =>3 the third right hand column of A163936.
Cf. A000918 (first differences).

Programs

  • Haskell
    a005803 n = 2 ^ n - 2 * n
    a005803_list = 1 : f 1 [0, 2 ..] where
       f x (z:zs@(z':_)) = y : f y zs  where y = (x + z) * 2 - z'
    -- Reinhard Zumkeller, Jan 19 2014
    
  • Magma
    [2^n-2*n: n in [0..30]]; // Wesley Ivan Hurt, Jun 04 2014
  • Maple
    A005803:=-2*z/(2*z-1)/(z-1)**2; # conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence except for three leading terms
  • Mathematica
    Table[2^n-2n,{n,0,50}] (* or *) LinearRecurrence[{4,-5,2},{1,0,0},51] (* Harvey P. Dale, May 21 2011 *)
  • PARI
    {a(n) = if( n<0, 0, 2^n - 2*n)}; /* Michael Somos, Oct 13 2002 */
    

Formula

G.f.: 1 + 2*x^3/((1-x)^2*(1-2*x)). a(n) = A008517(n-1, 2). - Michael Somos, Oct 13 2002
Equals binomial transform of [1, -1, 1, 1, 1, ...]. - Gary W. Adamson, Jul 14 2008
a(0) = 1 and a(n) = Sum_{k=0..n-3} ((-1)^(n+k+1)*binomial(2*n-1,k)*stirling1(2*n-k-3,n-k-2)), n=>1. - Johannes W. Meijer, Oct 16 2009
a(0)=1, a(1)=0, a(2)=0, a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3). - Harvey P. Dale, May 21 2011
a(n) = A000225(n+1) - A081494(n+1), n > 1. In other words, a(n) equals the sum of the elements in a Pascal triangle of depth n+1 minus the sum of the elements on its perimeter. - Ivan N. Ianakiev, Jun 01 2014
a(n) = A165900(n-1) + Sum_{i=0..n-1} a(i), for n > 0. - Ivan N. Ianakiev, Nov 24 2014
a(n) = A000225(n) - A005408(n-1). - Miquel Cerda, Nov 25 2016
E.g.f.: exp(x)*(exp(x) - 2*x). - Ilya Gutkovskiy, Nov 25 2016

A200091 The number of ways of putting n labeled items into k labeled boxes so that each box receives at least 2 objects.

Original entry on oeis.org

1, 1, 1, 6, 1, 20, 1, 50, 90, 1, 112, 630, 1, 238, 2940, 2520, 1, 492, 11508, 30240, 1, 1002, 40950, 226800, 113400, 1, 2024, 137610, 1367520, 2079000, 1, 4070, 445896, 7271880, 22869000, 7484400, 1, 8164, 1410552, 35692800, 196396200, 194594400, 1, 16354
Offset: 2

Views

Author

Peter Bala, Dec 04 2011

Keywords

Comments

Equivalently, the number of ordered set partitions of the set [n] into k blocks of size at least two. When the boxes are unlabeled or the set partitions unordered we obtain A008299.
The number of doubly-surjective functions f:[n]->[k], where a doubly-surjective function f has pre-image sets of size at least 2 for each element of the codomain. Also, the number of ways to distribute n different toys to k different children so that each child gets at least two toys. - Dennis P. Walsh, Apr 09 2013
T(n,k) is the number of chains 0 = x_0 < x_1 < ... < x_k = 1 in the Boolean lattice of rank n, such that x_i is not covered by x_(i+1) for all i. - Geoffrey Critzer, Jul 15 2018

Examples

			Table begins
  n |k=1   2     3     4
----+-------------------
  2 |  1
  3 |  1
  4 |  1   6
  5 |  1  20
  6 |  1  50    90
  7 |  1 112   630
  8 |  1 238  2940  2520
  9 |  1 492 11508 30240
  ...
T(4,2) = 6: The arrangements of 4 objects into 2 boxes { } and [ ] so that each box contains at least 2 items are {1,2}[3,4], {1,3}[2,4], {2,3}[1,4] and the 3 other possibilities where the contents of a pair of boxes are swapped.
		

References

  • P. Flajolet and R. Sedgewick, Analytic Combinatorics, Cambridge University Press, 2009, page 100-109.

Crossrefs

T(n,2) = A052515(n), T(n,3) = A224541(n), T(n,4) = A224542(n).
Cf. A032032 (row sums).

Programs

  • GAP
    Flat(List([2..14],n->List([1..Int(n/2)],k->Sum([0..k],j->(-1)^j*Binomial(k,j)*(Sum([0..j],i->Binomial(j,i)*(Binomial(n,i)*Factorial(i)*(k-j)^(n-i)))))))); # Muniru A Asiru, Jul 17 2018
  • Maple
    seq(seq(eval(diff((exp(x)-x-1)^k,x$n),x=0),k=1..floor(n/2)),n=2..20); # Dennis P. Walsh, Apr 09 2013
    T := proc(n,k) local r; k!* add(binomial(n,r)*(-1)^r*Stirling2(n-r,k-r), r=0..min(n,k)); end; # Marko Riedel, Mar 25 2022
  • Mathematica
    t[n_, k_] := k! * Sum[ (-1)^i*Binomial[n, i] * Sum[ (-1)^j*(k - i - j)^(n - i) / (j!*(k - i - j)!), {j, 0, k - i}], {i, 0, k}]; Table[ t[n, k], {n, 2, 14}, {k, 1, n/2}] // Flatten (* Jean-François Alcover, Apr 10 2013 *)

Formula

E.g.f. with additional 1: 1/(1-t*(exp(x)-1-x)) = 1 + t*x^2/2! + t*x^3/3! + (t+6*t^2)*x^4/4! + ....
E.g.f. (k fixed): (exp(x)-x-1)^k. - Dennis P. Walsh, Apr 09 2013
Recurrence relation: T(n+1,k) = k*(T(n,k) + n*T(n-1,k-1)). T(n,k) = k!*A008299(n,k).
T(n,k+j) = Sum_{i=0..n} C(n,i)*T(i,k)*T(n-i,j). - Dennis P. Walsh, Apr 09 2013
T(n,k) = Sum_{j=0..k} (-1)^j*C(k,j)*(Sum_{i=0..j} C(j,i)*C(n,i)*i!*(k-j)^(n-i)) for 1 <= k <= n/2 and n >= 2. - Dennis P. Walsh, Apr 10 2013
T(n,k) = k!*Sum_{r=0..min(n,k)} binomial(n,r)*(-1)^r*Stirling2(n-r, k-r). - Marko Riedel, Mar 25 2022

A052516 Number of pairs of sets of cardinality at least 3.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 20, 70, 182, 420, 912, 1914, 3938, 8008, 16172, 32526, 65262, 130764, 261800, 523906, 1048154, 2096688, 4193796, 8388054, 16776614, 33553780, 67108160, 134216970
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

The number of functions f:[n]->[2] such that f maps at least 3 elements to 1 and at least 3 elements to 2. a(6) = 20 since there are C(6,3) ways to choose the 3 elements of {1,2,3,4,5,6} that f maps to 1. - Dennis P. Walsh, Dec 09 2014

Crossrefs

Cf. A052515.

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (Exp(x) -1-x-x^2/2)^2 )); [0,0,0,0,0] cat [Factorial(n+5)*b[n]: n in [1..m-6]]; // G. C. Greubel, May 13 2019
    
  • Maple
    Pairs spec := [S,{S=Prod(B,B),B=Set(Z,3 <= card)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    with (combstruct):ZL:=[S,{S=Sequence(U,card=r),U=Set(Z,card>=3)}, labeled]: seq(count(subs(r=2,ZL),size=m),m=0..20); # Zerinvary Lajos, Mar 09 2007
    seq(max(0,2^n-n^2-n-2), n=0..40); # Dennis P. Walsh, Dec 09 2014
  • Mathematica
    Table[Max[0,2^n-n^2-n-2],{n,0,30}] (* Vladimir Joseph Stephan Orlovsky, Feb 15 2011*)
  • PARI
    a(n)=max(0,2^n-n^2-n-2) \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    (2*x^6*(10-15*x+6*x^2)/((1-x)^3*(1-2*x))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, May 13 2019

Formula

E.g.f.: (exp(x) -1)^2 -x*(2+x)*exp(x) +2*x +2*x^2 +x^3 +x^4/4.
(n-1)*a(n+2) + (1-3*n)*a(n+1) + 2*(n+1)*a(n) = 0, a(0) = .. a(5) = 0, a(6) = 20.
G.f.: 2*x^6*(10-15*x+6*x^2)/((1-x)^3*(1-2*x)). - Colin Barker, Feb 19 2012
a(n) = max(0,2^n-n^2-n-2). - Dennis P. Walsh, Dec 09 2014
E.g.f.: (exp(x) - 1 - x - x^2/2)^2. - Dennis P. Walsh, Dec 09 2014

A144394 Triangle read by rows (n >= 4, 0 <= k <= n - 4): row n gives the coefficients in the expansion of ((x + 1)^n - (x^n + n*x^(n - 1) + n*x + 1))/x^2.

Original entry on oeis.org

6, 10, 10, 15, 20, 15, 21, 35, 35, 21, 28, 56, 70, 56, 28, 36, 84, 126, 126, 84, 36, 45, 120, 210, 252, 210, 120, 45, 55, 165, 330, 462, 462, 330, 165, 55, 66, 220, 495, 792, 924, 792, 495, 220, 66, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91
Offset: 4

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 02 2008

Keywords

Comments

Interior of Pascal's triangle, stripping out the initial 1, n and final n, 1 in each row.

Examples

			Triangle begins:
    6;
   10,  10;
   15,  20,   15;
   21,  35,   35,   21;
   28,  56,   70,   56,   28;
   36,  84,  126,  126,   84,   36;
   45, 120,  210,  252,  210,  120,   45;
   55, 165,  330,  462,  462,  330,  165,   55;
   66, 220,  495,  792,  924,  792,  495,  220,   66;
   78, 286,  715, 1287, 1716, 1716, 1287,  715,  286,   78;
   91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001,  364,  91;
  105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105;
  ...
		

Crossrefs

Cf. A007318, A052515 (row sums), A024746 (sorted), A144393.

Programs

  • Haskell
    a144394 n k = a144394_tabl !! (n-4) !! k
    a144394_row n = a144394_tabl !! (n-4)
    a144394_tabl = map (drop 2 . reverse . drop 2) $ drop 4 a007318_tabl
    -- Reinhard Zumkeller, Dec 24 2012
    
  • Mathematica
    p[x_, n_] = ((x + 1)^n - (x^n + n*x^(n - 1) + n*x + 1))/x^2
    Table[CoefficientList[p[x, n], x], {n, 4, 15}] // Flatten
  • Maxima
    create_list(binomial(n, k + 2), n, 4, 20, k, 0, n - 4); /* Franck Maminirina Ramaharo, Jan 25 2019 */

Formula

T(n,k) = binomial(n, k + 2), n >= 4, 0 <= k <= n - 4.
Sum_{n >= 4, 0 <= k <= n-4} 1/T(n,k) = 3/2. - Hermann Stamm-Wilbrandt, Jul 21 2014

Extensions

Edited by Franklin T. Adams-Watters, Apr 07 2010

A224541 Number of doubly-surjective functions f:[n]->[3].

Original entry on oeis.org

90, 630, 2940, 11508, 40950, 137610, 445896, 1410552, 4390386, 13514046, 41278068, 125405532, 379557198, 1145747538, 3452182656, 10388002848, 31230066186, 93828607686, 281775226860, 845929656900, 2539047258150, 7619759016090, 22864712861880, 68605412870088
Offset: 6

Views

Author

Dennis P. Walsh, Apr 09 2013

Keywords

Comments

Third column of A200091.
Also, a(n) is (i) the number of length-n words on the alphabet A, B, and C with each letter occurring at least twice; (ii) the number of ways to distribute n different toys to 3 different children so that each child gets at least 2 toys; (iii) the number of ways to put n numbered balls into 3 labeled boxes so that each box gets at least 2 balls; (iv) the number of n-digit positive integers consisting only of the digits 1, 2, and 3 with each of these digits appearing at least twice. A doubly-surjective function f has size at least 2 for each pre-image set, that is, |f^-1(y)|>=2 for each element y of the codomain.[Note that a surjective function has |f^-1(y)|>=1.] The triangle A200091 provides the number of doubly-surjective functions f:[n]->[k]. Column 3 of triangle A200091 is a(n).
Sequence A052515 is the number of doubly-surjective functions f:[n]->[2] with exponential generating function (exp(x)-x-1)^2. In general, the number of doubly-surjective functions f:[n]->[k] has exponential generating function (exp(x)-x-1)^k.

Examples

			For n=6 we have a(6)=90 since there are 90 six-digit  positive integers using only digits 1, 2, and 3 with each of those digits appearing at least twice. The first 30 of the ninety, namely those with initial digit 1, are given below:
112233, 112323, 112332, 113223, 113232, 113322,
121233, 121323, 121332, 122133, 122313, 122331,
123123, 123132, 123213, 123231, 123312, 123321,
131223, 131232, 131322, 132123, 132132, 132213,
132231, 132312, 132321, 133122, 133212, 133221.
		

Crossrefs

Cf. A052515, the number of doubly-surjective functions f:[n]->[2].

Programs

  • Maple
    seq(3^n-3*2^n-3*n*2^(n-1)+3+3*n+3*n^2, n=6..40);
  • Mathematica
    With[{nn=40},Drop[CoefficientList[Series[(Exp[x]-x-1)^3,{x,0,nn}],x] Range[0,nn]!,6]] (* Harvey P. Dale, Oct 01 2015 *)
  • PARI
    x='x+O('x^66); Vec(serlaplace((exp(x)-x-1)^3)) \\ Joerg Arndt, Apr 10 2013

Formula

a(n) = 3^n-3*2^n-3*n*2^(n-1)+3+3*n+3*n^2.
E.g.f.: (exp(x)-x-1)^3.
From Alois P. Heinz, Apr 10 2013: (Start)
a(n) = 6*A000478(n).
G.f.: -6*(12*x^3-40*x^2+45*x-15)*x^6 / ((3*x-1)*(2*x-1)^2*(x-1)^3).
(End)

A322291 Triangle T read by rows: T(n, k) = Sum_{i=1..k} binomial(n, floor((n-k)/2)+i).

Original entry on oeis.org

1, 2, 3, 3, 6, 7, 6, 10, 14, 15, 10, 20, 25, 30, 31, 20, 35, 50, 56, 62, 63, 35, 70, 91, 112, 119, 126, 127, 70, 126, 182, 210, 238, 246, 254, 255, 126, 252, 336, 420, 456, 492, 501, 510, 511, 252, 462, 672, 792, 912, 957, 1002, 1012, 1022, 1023, 462, 924, 1254, 1584, 1749, 1914, 1969, 2024, 2035, 2046, 2047
Offset: 1

Views

Author

Stefano Spezia, Aug 28 2019

Keywords

Comments

T(n, k) is a sharp upper bound on the cardinality of a k-antichain in {0, 1}^n due to P. Erdős.
T(n, k) is also the total number of compositions with first part k, n+1 parts, and all differences between adjacent parts in {-1,1}. - John Tyler Rascoe, May 07 2023

Examples

			n\k|   1    2    3    4    5    6
---+-----------------------------
1  |   1
2  |   2    3
3  |   3    6    7
4  |   6   10   14   15
5  |  10   20   25   30   31
6  |  20   35   50   56   62   63
...
		

Crossrefs

Programs

  • GAP
    Flat(List([1..11], n->List([1..n], k->Sum([1..k], i->Binomial(n, Int((n-k)/2)+i)))));
    
  • Maple
    a:=(n, k)->sum(binomial(n, floor((1/2)*n-(1/2)*k)+i), i = 1..k): seq(seq(a(n, k), k = 1..n), n = 1..11);
  • Mathematica
    T[n_,k_]:=Sum[Binomial[n,Floor[(n-k)/2]+i],{i,1,k}]; Table[T[n,k],{n,1,11},{k,1,n}]
  • PARI
    T(n, k) = sum(i=1, k, binomial(n, floor((n-k)/2)+i));

Formula

T(n, n) = A000225(n).
T(n, n-1) = A000918(n).
T(n, n-2) = A000247(n).
T(n, n-3) = A052515(n).
T(n, n-4) = A272352(n+1).
T(n, n-5) = A052516(n).

A352607 Triangle read by rows. T(n, k) = Bell(k)*Sum_{j=0..k}(-1)^(k+j)*binomial(n, n-k+j)*Stirling2(n-k+j, j) for n >= 0 and 0 <= k <= floor(n/2).

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 6, 0, 1, 20, 0, 1, 50, 75, 0, 1, 112, 525, 0, 1, 238, 2450, 1575, 0, 1, 492, 9590, 18900, 0, 1, 1002, 34125, 141750, 49140, 0, 1, 2024, 114675, 854700, 900900, 0, 1, 4070, 371580, 4544925, 9909900, 2110185
Offset: 0

Views

Author

Peter Luschny and Mélika Tebni, Mar 23 2022

Keywords

Examples

			Triangle starts:
[0] 1;
[1] 0;
[2] 0, 1;
[3] 0, 1;
[4] 0, 1,   6;
[5] 0, 1,  20;
[6] 0, 1,  50,   75;
[7] 0, 1, 112,  525;
[8] 0, 1, 238, 2450,  1575;
[9] 0, 1, 492, 9590, 18900;
		

Crossrefs

Cf. A028248 (row sums), A052515 (column 2), A081066, A008299, A000110, A137375.

Programs

  • Maple
    A352607 := (n, k) -> combinat:-bell(k)*add((-1)^(k+j)*binomial(n, n-k+j)* Stirling2(n-k+j, j), j = 0..k):
    seq(seq(A352607(n, k), k = 0..n/2), n = 0..12);
    # Second program:
    egf := k -> combinat[bell](k)*(exp(x) - 1 - x)^k/k!:
    A352607 := (n, k) -> n! * coeff(series(egf(k), x, n+1), x, n):
    seq(print(seq(A352607(n, k), k = 0..n/2)), n=0..12);
    # Recurrence:
    A352607 := proc(n, k) option remember;
    if k > n/2 then 0 elif k = 0 then k^n else k*A352607(n-1, k) +
    combinat[bell](k)/combinat[bell](k-1)*(n-1)*A352607(n-2, k-1) fi end:
    seq(print(seq(A352607(n, k), k=0..n/2)), n=0..12); # Mélika Tebni, Mar 24 2022
  • Mathematica
    T[n_, k_] := BellB[k]*Sum[(-1)^(k+j)*Binomial[n, n-k+j]*StirlingS2[n-k+j, j], {j, 0, k}]; Table[T[n, k], {n, 0, 12}, {k, 0, Floor[n/2]}] // Flatten (* Jean-François Alcover, Oct 21 2023 *)

Formula

T(n, k) = (-1)^k*A000110(k)*A137375(n, k) = A000110(k)*A008299(n, k).
T(2*n, n) = A081066(n).
E.g.f. column k: Bell(k)*(exp(x) - 1 - x)^k / k!, k >= 0.
T(n, k) = Bell(k)*Sum_{j=0..k} Sum_{i=0..j} ((-1)^j*(k-j)^(n-i)*binomial(n, i)) / ((k - j)!*(j - i)!).

A224542 Number of doubly-surjective functions f:[n]->[4].

Original entry on oeis.org

2520, 30240, 226800, 1367520, 7271880, 35692800, 165957792, 742822080, 3234711480, 13803744864, 58021888080, 241116750624, 993313349544, 4064913201216, 16549636147968, 67112688842496, 271323921459096, 1094303232174240, 4405390451382960, 17709538489849440
Offset: 8

Views

Author

Dennis P. Walsh, Apr 09 2013

Keywords

Comments

Fourth column of A200091: A200091(n,4)=a(n).
Also, a(n) is (i) the number of length-n words on the alphabet A, B, C, and D with each letter of the alphabet occurring at least twice; (ii) the number of ways to distribute n different toys to 4 children so that each child gets at least two toys; (iii) the number of ways to put n numbered balls into 4 labeled boxes so that each box gets at least two balls; (iv) the number of n-digit positive integers consisting of only digits 1,2,3, and 4 with each of these digits appearing at least twice.
A doubly-surjective function f:D->C is such that the pre-image set f^-1(y) has size at least 2 for each y in C.
Triangle A200091 provides the number of doubly-surjective functions f from a set of size n onto a set of size k. Hence a(n) is column 4 of A200091.

Examples

			a(9) = 30240 since there are 30240 ways to distribute 9 different toys to 4 children so that each child gets at least 2 toys. One child must get 3 toys and the other children get 2 toys each. There are 4 ways to pick the lucky kid. There are C(9,3) ways to choose the 3 toys for the lucky kid. There are 6!/(2!)^3 ways to distribute the remaining 6 toys among the 3 kids. We obtain 4*C(9,3)*6!/8=30240.
		

Crossrefs

Programs

  • Maple
    seq(eval(diff((exp(x)-x-1)^4,x$n),x=0),n=8..40);
  • Mathematica
    nn=27; Drop[Range[0,nn]! CoefficientList[Series[(Exp[x]-x-1)^4, {x,0,nn}], x], 8] (* Geoffrey Critzer, Sep 28 2013 *)
  • PARI
    my(x='x+O('x^66)); Vec(serlaplace((exp(x)-x-1)^4)) /* Joerg Arndt, Apr 10 2013 */

Formula

a(n) = 4^n-4*3^n-4*n*3^(n-1)+(9*n+3*n^2)*2^(n-1)+6*2^n-4-8*n-4*n^3;
a(n) = sum(n!/(i!*j!*k!*m!)) over such that i,j,k, and m are all at least 2 and i+j+k+m=n.
E.g.f.: (exp(x)-x-1)^4.
a(n) = 24*A058844(n). - Alois P. Heinz, Apr 10 2013
G.f.: 24*x^8*(288*x^6-1560*x^5+3500*x^4-4130*x^3+2625*x^2-840*x+105) / ((x-1)^4*(2*x-1)^3*(3*x-1)^2*(4*x-1)). - Colin Barker, Jun 04 2013

A375659 For 0<=k<=n, T(n,k) = the number of Dyck-type lattice paths of length n, starting at the point (0,k), triangle T read by rows.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 3, 6, 7, 8, 6, 10, 14, 15, 16, 10, 20, 25, 30, 31, 32, 20, 35, 50, 56, 62, 63, 64, 35, 70, 91, 112, 119, 126, 127, 128, 70, 126, 182, 210, 238, 246, 254, 255, 256, 126, 252, 336, 420, 456, 492, 501, 510, 511, 512, 252, 462, 672, 792, 912, 957, 1002, 1012, 1022, 1023, 1024
Offset: 0

Views

Author

Marilena Jianu, Aug 23 2024

Keywords

Comments

A Dyck type lattice path has the steps (1,1) or (1,-1) and never passes below the x-axis.
For k>=n, the number of Dyck-type lattice paths is 2^n.
The sequence completes A322291 by adding a diagonal of powers of 2.

Examples

			  n | k=0    1    2    3    4    5    6    7
 ---+---------------------------------------
  0 |  1
  1 |  1    2
  2 |  2    3    4
  3 |  3    6    7    8
  4 |  6   10   14   15   16
  5 | 10   20   25   30   31   32
  6 | 20   35   50   56   62   63   64
  7 | 35   70   92  112  119  126  127  128
		

Crossrefs

T(n,0) = T(n-1,1) = A001405(n).
T(n,n) = A000079(n).
T(n,n-1) = A000225(n).
T(n,n-2) = A000918(n).
T(n,n-3) = A000247(n).
T(n,n-4) = A052515(n).
Row sums = A189162(n+1).

Programs

  • Maple
    a:=(n,k)->sum(binomial(n, floor((1/2)*(n-k))+i), i = 0..k):
    seq(seq(a(n, k), k = 0..n), n = 0..11);
  • Python
    from math import comb
    def A375659(n,k):
        return sum(comb(n,i+(n-k)//2) for i in range(k+1)) # John Tyler Rascoe, Sep 04 2024

Formula

T(n,k) = Sum_{i = 0..k} binomial(n, floor((n-k)/2)+i).
T(n,k) = T(n-1,k-1)+T(n-1,k+1), for all n>=2 and 1<=k<=n-2.

A308804 Triangular table of coefficients of p in p^(k+2)/(1-p) LerchPhi(1-p,-1-k,(p-1)/p) as function of k=1..n.

Original entry on oeis.org

1, 2, -1, 9, -9, 1, 44, -66, 24, -1, 265, -530, 320, -55, 1, 1854, -4635, 3940, -1275, 118, -1, 14833, -44499, 48825, -23485, 4571, -245, 1, 133496, -467236, 628544, -403270, 123368, -15400, 500, -1, 1334961, -5339844, 8510376, -6841674, 2885694, -598416, 49914, -1011, 1, 14684570, -66080565, 121759560, -117782490, 63630588, -18808230, 2752320, -157785, 2034, -1
Offset: 1

Views

Author

Wouter Meeussen, Jun 25 2019

Keywords

Comments

Relations to other sequences are tentative (checked up to 24 rows). Related to the central moments of a geometric probability distribution.
Each row sums to 1. Row sums of absolute values are A091346. First column is A000166. First moments appear to be A052515 with shifted index.

Crossrefs

Programs

  • Mathematica
    Table[CoefficientList[ p^(k + 2)/(1 - p) LerchPhi[1 - p, -k - 1, (-1 + p)/p], p], {k, 1, 12}]
Showing 1-10 of 10 results.