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 41-50 of 95 results. Next

A002696 Binomial coefficients C(2n,n-3).

Original entry on oeis.org

1, 8, 45, 220, 1001, 4368, 18564, 77520, 319770, 1307504, 5311735, 21474180, 86493225, 347373600, 1391975640, 5567902560, 22239974430, 88732378800, 353697121050, 1408831480056, 5608233007146, 22314239266528, 88749815264600, 352870329957600, 1402659561581460
Offset: 3

Views

Author

Keywords

Comments

Number of lattice paths from (0,0) to (n,n) with steps E=(1,0) and N=(0,1) which touch or cross the line x-y=3. - Herbert Kociemba, May 23 2004

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
  • C. Lanczos, Applied Analysis. Prentice-Hall, Englewood Cliffs, NJ, 1956, p. 517.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Diagonal 7 of triangle A100257.
Column k=1 of A263776.
Cf. A001622.
Cf. binomial(2*n+m, n): A000984 (m = 0), A001700 (m = 1), A001791 (m = 2), A002054 (m = 3), A002694 (m = 4), A003516 (m = 5), A030053 - A030056, A004310 - A004318.

Programs

Formula

G.f.: (1-sqrt(1-4*z))^6/(64*z^3*sqrt(1-4*z)). - Emeric Deutsch, Jan 28 2004
a(n) = Sum_{k=0..n} C(n, k)*C(n, k+3). - Hermann Stamm-Wilbrandt, Aug 17 2015
From Robert Israel, Aug 19 2015: (Start)
(n-2)*(n+4)*a(n+1) = (2*n+2)*(2*n+1)*a(n).
E.g.f.: I_3(2*x) * exp(2*x) where I_3 is a modified Bessel function. (End)
From Amiram Eldar, Aug 27 2022: (Start)
Sum_{n>=3} 1/a(n) = 3/4 + 2*Pi/(9*sqrt(3)).
Sum_{n>=3} (-1)^(n+1)/a(n) = 444*log(phi)/(5*sqrt(5)) - 1093/60, where phi is the golden ratio (A001622). (End)
G.f.: 2F1([7/2,4],[7],4*x). - Karol A. Penson, Apr 24 2024
From Peter Bala, Oct 13 2024: (Start)
a(n) = Integral_{x = 0..4} x^n * w(x) dx, where the weight function w(x) = 1/(2*Pi) * (x^3 - 6*x^2 + 9*x - 2)/sqrt(x*(4 - x)).
G.f: x^3 * B(x) * C(x)^6, where B(x) = 1/sqrt(1 - 4*x) is the g.f. of the central binomial coefficients A000984 and C(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. (End)

Extensions

More terms from Emeric Deutsch, Feb 18 2004

A345908 Traces of the matrices (A345197) counting integer compositions by length and alternating sum.

Original entry on oeis.org

1, 1, 0, 1, 3, 3, 6, 15, 24, 43, 92, 171, 315, 629, 1218, 2313, 4523, 8835, 17076, 33299, 65169
Offset: 0

Views

Author

Gus Wiseman, Jul 26 2021

Keywords

Comments

The matrices (A345197) count the integer compositions of n of length k with alternating sum i, where 1 <= k <= n, and i ranges from -n + 2 to n in steps of 2. Here, the alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. So a(n) is the number of compositions of n of length (n + s)/2, where s is the alternating sum of the composition.

Examples

			The a(0) = 1 through a(7) = 15 compositions of n = 0..7 of length (n + s)/2 where s = alternating sum (empty column indicated by dot):
  ()  (1)  .  (2,1)  (2,2)    (2,3)    (2,4)      (2,5)
                     (1,1,2)  (1,2,2)  (1,3,2)    (1,4,2)
                     (2,1,1)  (2,2,1)  (2,3,1)    (2,4,1)
                                       (1,1,3,1)  (1,1,3,2)
                                       (2,1,2,1)  (1,2,3,1)
                                       (3,1,1,1)  (2,1,2,2)
                                                  (2,2,2,1)
                                                  (3,1,1,2)
                                                  (3,2,1,1)
                                                  (1,1,1,1,3)
                                                  (1,1,2,1,2)
                                                  (1,1,3,1,1)
                                                  (2,1,1,1,2)
                                                  (2,1,2,1,1)
                                                  (3,1,1,1,1)
		

Crossrefs

Traces of the matrices given by A345197.
Diagonals and antidiagonals of the same matrices are A346632 and A345907.
Row sums of A346632.
A011782 counts compositions.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
Other diagonals are A008277 of A318393 and A055884 of A320808.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218, ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218, ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Mathematica
    ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==(n+ats[#])/2&]],{n,0,15}]

A005774 Number of directed animals of size n (k=1 column of A038622); number of (s(0), s(1), ..., s(n)) such that s(i) is a nonnegative integer and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, where s(0) = 2; also sum of row n+1 of array T in A026323.

Original entry on oeis.org

0, 1, 3, 9, 26, 75, 216, 623, 1800, 5211, 15115, 43923, 127854, 372749, 1088283, 3181545, 9312312, 27287091, 80038449, 234988827, 690513030, 2030695569, 5976418602, 17601021837, 51869858544, 152951628725, 451271872701, 1332147482253
Offset: 0

Views

Author

Keywords

Comments

Number of ordered trees with n+1 edges, having root degree at least 2 and nonroot outdegrees at most 2. - Emeric Deutsch, Aug 02 2002
From Petkovsek's algorithm, this recurrence does not have any closed form solutions. So there is no hypergeometric closed form for a(n). - Herbert S. Wilf
Sum of two consecutive trinomial coefficients starting two positions before central one. Example: a(4) = 10+16 and (1 + x + x^2)^4 = ... + 10*x^2 + 16*x^3 + 19*x^4 + ... - David Callan, Feb 07 2004
Image of n (A001477) under the Motzkin related matrix A107131. Binomial transform of A037952. - Paul Barry, May 12 2005
a(n) = total number of ascents (maximal runs of consecutive upsteps) in all Motzkin (n+1)-paths. For example, the 9 Motzkin 4-paths are FFFF, FFUD, FUDF, FUFD, UDFF, UDUD, UFDF, UFFD, UUDD and they contain a total of 9 ascents and so a(3)=9 (U=upstep, D=downstep, F=flatstep). - David Callan, Aug 16 2006
Image of the sequence (0,1,2,3,3,3,...) under the array A122896. - Paul Barry, Sep 18 2006
This is some kind of Motzkin transform of A079978 because the substitution x-> x*A001006(x) in the independent variable of the g.f. A079978(x) yields 1,0 followed by this sequence here. - R. J. Mathar, Nov 08 2008

Examples

			G.f.: x + 3*x^2 + 9*x^3 + 26*x^4 + 75*x^5 + 216*x^6 + 623*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a005774 0 = 0
    a005774 n = a038622 n 1 -- Reinhard Zumkeller, Feb 26 2013
  • Maple
    seq( add(binomial(i,k+1)*binomial(i-k,k), k=0..floor(i/2)), i=0..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    seq(simplify(GegenbauerC(n-2,-n,-1/2) + GegenbauerC(n-1,-n,-1/2)), n=0..27); # Peter Luschny, May 12 2016
  • Mathematica
    CoefficientList[Series[(1-x-Sqrt[1-2x-3x^2])/(x(1-3x+Sqrt[1-2x-3x^2])),{x,0,30}],x] (* Harvey P. Dale, Sep 20 2011 *)
    RecurrenceTable[{a[0]==0, a[1]==1,a[n]==(2n(n+1)a[n-1]+3n(n-1)a[n-2])/ ((n+2)(n-1))},a,{n,30}] (* Harvey P. Dale, Nov 09 2012 *)
  • PARI
    s=[0,1]; {A005774(n)=k=(2*(n+2)*(n+1)*s[2]+3*(n+1)*n*s[1])/((n+3)*n); s[1]=s[2]; s[2]=k; k}
    
  • PARI
    {a(n) = if( n<2, n>0, (2 * (n+1) * n *a(n-1) + 3 * (n-1) * n * a(n-2)) / (n+2) / (n-1))}; /* Michael Somos, May 01 2003 */
    

Formula

Inverse binomial transform of [ 0, 1, 5, 21, 84, ... ] (A002054). - John W. Layman
D-finite with recurrence (n+2)*(n-1)*a(n) = 2*n*(n+1)*a(n-1) + 3*n*(n-1)*a(n-2) for all n in Z. - Michael Somos, May 01 2003
E.g.f.: exp(x)*(BesselI(1, 2*x)+BesselI(2, 2*x)). - Vladeta Jovovic, Jan 01 2004
G.f.: (1-x-sqrt(1-2x-3x^2))/(x(1-3x+sqrt(1-2x-3x^2))); a(n)= Sum_{k=0..n} C(k+1, n-k+1)*C(n, k)*k/(k+1); a(n) = Sum_{k=0..n} C(n, k)*C(k, floor((k-1)/2)). - Paul Barry, May 12 2005
Starting (1, 3, 9, 26, ...) = binomial transform of A026010: (1, 2, 4, 7, 14, 25, 50, 91, ...). - Gary W. Adamson, Oct 22 2007
a(n)*(2+n) = (4+4*n)*a(n-1) - n*a(n-2) + (12-6*n)*a(n-3). - Simon Plouffe, Feb 09 2012
a(n) ~ 3^(n+1/2) / sqrt(Pi*n). - Vaclav Kotesovec, Mar 10 2014
0 = a(n)*(+36*a(n+1) + 18*a(n+2) - 96*a(n+3) + 30*a(n+4)) + a(n+1)*(-6*a(n+1) + 49*a(n+2) - 26*a(n+3) + 3*a(n+4)) + a(n+2)*(+15*a(n+3) - 8*a(n+4)) + a(n+3)*(a(n+4)) if n >= 0. - Michael Somos, Aug 06 2014
a(n) = GegenbauerC(n-2,-n,-1/2) + GegenbauerC(n-1,-n,-1/2). - Peter Luschny, May 12 2016

Extensions

Further descriptions from Clark Kimberling

A024483 a(n) = binomial(2*n, n) mod binomial(2*n-2, n-1).

Original entry on oeis.org

0, 2, 10, 42, 168, 660, 2574, 10010, 38896, 151164, 587860, 2288132, 8914800, 34767720, 135727830, 530365050, 2074316640, 8119857900, 31810737420, 124718287980, 489325340400, 1921133836440, 7547311500300, 29667795388452, 116686713634848
Offset: 2

Views

Author

Keywords

Comments

Apart from its root term -1: central terms of the triangle in A051631: a(n) = A051631(2*(n-1), n-1). - Reinhard Zumkeller, Nov 13 2011
Define an array m(i,j) by m(1,j)=m(j,1)=j*(j+1)/2 for j=0,1,2,3,... and m(i,j) = m(i,j-1) + m(i-1,j+1); the diagonal m(k,k) for k=1,2,3... gives the numbers in this sequence. - J. M. Bergot, May 02 2012
The central terms of triangle A051631 (including the root term -1) are given by (n-1)*(n+1)*Gamma(2*n+1)/Gamma(n+2)^2 with n >= 0. - Peter Luschny, Nov 24 2013
Index the sequence from n=0 so that a(0)=1, a(1)=0, a(2)=2, a(3)=10, ... a(n) is the number of walks using steps U=(1,1) and D=(1,-1) from the origin to (2n,0) that rise above and dip below the x axis. a(2) = 2 because we have: DUUD and UDDU. - Geoffrey Critzer, Jan 11 2014

Crossrefs

Programs

  • Haskell
    a024483 n = a051631 (2*(n-1)) (n-1) -- Reinhard Zumkeller, Nov 13 2011
    
  • Maple
    seq((n-1)*binomial(2*n, n)/(n+1), n=1..25); # Zerinvary Lajos, Feb 28 2007
  • Mathematica
    nn=20; d=(1-(1-4x)^(1/2))/(2x); Drop[CoefficientList[Series[1/(1-2x d)-2(d-1), {x,0,nn}],x],1] (* Geoffrey Critzer, Jan 11 2014 *)
    Table[Mod[Binomial[2 n, n], Binomial[2 n - 2, n - 1]], {n, 2, 26}] (* Michael De Vlieger, Sep 13 2016 *)
  • Sage
    def a(n): return n*(n-2)*factorial(2*(n-1))/factorial(n)^2
    [a(n) for n in (2..26)]  # Peter Luschny, Nov 24 2013

Formula

a(n) = ((n-2)/n)*binomial(2*n-2, n-1) = (n-2)*A000108(n-1). - Vladeta Jovovic, Aug 03 2002
a(n) = 2*binomial(2n-3, n-3) = 2*A002054(n-2). - Ralf Stephan, Jan 15 2004
a(n) = A000984(n-1) - 2*A000108(n-1). - Geoffrey Critzer, Jan 11 2014
a(n) ~ 4^(n-1)/sqrt(Pi*n). - Ilya Gutkovskiy, Sep 13 2016
D-finite with recurrence n*a(n) +(-7*n+8)*a(n-1) +6*(2*n-5)*a(n-2)=0. - R. J. Mathar, Apr 27 2020
From Amiram Eldar, Mar 24 2022: (Start)
Sum_{n>=3} 1/a(n) = 5/6 - Pi/(9*sqrt(3)).
Sum_{n>=3} (-1)^(n+1)/a(n) = 26*sqrt(5)*log(phi)/25 - 7/10, where phi is the golden ratio (A001622). (End)

Extensions

More terms from Zerinvary Lajos, Oct 02 2007

A030053 a(n) = binomial(2n+1,n-3).

Original entry on oeis.org

1, 9, 55, 286, 1365, 6188, 27132, 116280, 490314, 2042975, 8436285, 34597290, 141120525, 573166440, 2319959400, 9364199760, 37711260990, 151584480450, 608359048206, 2438362177020, 9762479679106, 39049918716424, 156077261327400, 623404249591760
Offset: 3

Views

Author

Keywords

Comments

Number of UUUUUU's in all Dyck (n+3)-paths. - David Scambler, May 03 2013

Examples

			G.f. = x^3 + 9*x^4 + 55*x^5 + 286*x^6 + 1365*x^7 + 6188*x68 + ...
		

Crossrefs

Diagonal 8 of triangle A100257.
Cf. A001622, A113187 (unsigned fourth column).
Cf. binomial(2*n+m, n): A000984 (m = 0), A001700 (m = 1), A001791 (m = 2), A002054 (m = 3), A002694 (m = 4), A003516 (m = 5), A002696 (m = 6), A030054 - A030056, A004310 - A004318.

Programs

  • Magma
    [Binomial(2*n+1,n-3): n in [3..30]]; // Vincenzo Librandi, Aug 11 2015
  • Mathematica
    Table[Binomial[2*n + 1, n - 3], {n, 3, 20}] (* T. D. Noe, Apr 03 2014 *)
    Rest[Rest[Rest[CoefficientList[Series[128 x^3 / ((1 - Sqrt[1 - 4 x])^7 Sqrt[1 - 4 x]) + (-1 / x^4 + 5 / x^3 - 6 / x^2 + 1 / x), {x, 0, 40}], x]]]] (* Vincenzo Librandi, Aug 11 2015 *)
  • PARI
    a(n) = binomial(2*n+1,n-3); \\ Joerg Arndt, May 08 2013
    

Formula

G.f.: x^3*128/((1-sqrt(1-4*x))^7*sqrt(1-4*x))+(-1/x^4+5/x^3-6/x^2+1/x). - Vladimir Kruchinin, Aug 11 2015
D-finite with recurrence: -(n+4)*(n-3)*a(n) +2*n*(2*n+1)*a(n-1)=0. - R. J. Mathar, Jan 28 2020
G.f.: x^3* 2F1(4,9/2;8;4x). - R. J. Mathar, Jan 28 2020
From Amiram Eldar, Jan 24 2022: (Start)
Sum_{n>=3} 1/a(n) = 22*Pi/(9*sqrt(3)) - 33/10.
Sum_{n>=3} (-1)^(n+1)/a(n) = 852*log(phi)/(5*sqrt(5)) - 1073/30, where phi is the golden ratio (A001622). (End)
From Peter Bala, Oct 13 2024: (Start)
a(n) = Integral_{x = 0..4} x^n * w(x) dx, where the weight function w(x) = (1/(2*Pi)) * sqrt(x)*(x^3 - 7*x^2 + 14*x - 7)/sqrt((4 - x)).
G.f. x^3 * B(x) * C(x)^7, where B(x) = 1/sqrt(1 - 4*x) is the g.f. of the central binomial coefficients A000984 and C(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. (End)

A152290 Coefficients in a q-analog of the LambertW function, as a triangle read by rows.

Original entry on oeis.org

1, 1, 2, 1, 5, 5, 5, 1, 14, 21, 31, 30, 19, 9, 1, 42, 84, 154, 210, 245, 217, 175, 105, 49, 14, 1, 132, 330, 708, 1176, 1722, 2148, 2386, 2358, 2080, 1618, 1086, 644, 294, 104, 20, 1, 429, 1287, 3135, 6006, 10164, 15093, 20496, 25188, 28770, 30225, 29511, 26571
Offset: 0

Views

Author

Paul D. Hanna, Dec 02 2008

Keywords

Comments

T(n,k) is the number of parking functions of length n with k inversions. - Kyle Celano, Aug 18 2025

Examples

			Triangle, with columns k=0..n*(n-1)/2 for row n>=0, begins:
  1;
  1;
  2, 1;
  5, 5, 5, 1;
  14, 21, 31, 30, 19, 9, 1;
  42, 84, 154, 210, 245, 217, 175, 105, 49, 14, 1;
  132, 330, 708, 1176, 1722, 2148, 2386, 2358, 2080, 1618, 1086, 644, 294, 104, 20, 1;
  429, 1287, 3135, 6006, 10164, 15093, 20496, 25188, 28770, 30225, 29511, 26571, 22161, 16926, 11832, 7392, 4089, 1932, 714, 195, 27, 1;...
where row sums = (n+1)^(n-1) and column 0 is A000108 (Catalan numbers).
Row sums at q=-1 = (n+1)^[(n-1)/2] (A152291): [1,1,1,4,5,36,49,512,729,...].
The generating function starts:
A(x,q) = 1 + x + (2 + q)*x^2/faq(2,q) + (5 + 5*q + 5*q^2 + q^3)*x^3/faq(3,q) + (14 + 21*q + 31*q^2 + 30*q^3 + 19*q^4 + 9*q^5 + q^6)*x^4/faq(4,q) + ...
G.f. satisfies: A(x,q) = e_q( x*A(x,q), q), where the q-exponential series e_q(x,q) begins:
e_q(x,q) = 1 + x + x^2/faq(2,q) + x^3/faq(3,q) +...+ x^n/faq(n,q) +...
The q-factorial of n is faq(n,q) = Product_{k=1..n} (q^k-1)/(q-1):
faq(0,q)=1, faq(1,q)=1, faq(2,q)=(1+q), faq(3,q)=(1+q)*(1+q+q^2),
faq(4,q)=(1+q)*(1+q+q^2)*(1+q+q^2+q^3), ...
Special cases of g.f.:
q=0: A(x,0) = 1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 42*x^5 +... (Catalan)
q=1: A(x,1) = 1 + x + 3/2*x^2 + 16/6*x^3 + 125/24*x^4 +...= LambertW(-x)/(-x)
q=2: A(x,2) = 1 + x + 4/3*x^2 + 43/21*x^3 + 1076/315*x^4 + 58746/9765*x^5 +...
q=-1: Can A(x,-1) be defined? See A152291.
		

Crossrefs

Cf. A152291 (q=-1), A000272 (row sums), A000108 (column 0), A002054 (column 1).
Cf. A152282 (q=2), A152283 (q=3).
Cf. A121774.

Programs

  • PARI
    /* G.f.: LambertW_q(x,q) = (1/x)*Series_Reversion( x/e_q(x,q) ): */
    {T(n,k)=local(e_q=1+sum(j=1,n,x^j/prod(i=1,j,(q^i-1)/(q-1))),LW_q=serreverse(x/e_q+x^2*O(x^n))/x); polcoeff(polcoeff(LW_q+x*O(x^n),n,x)*prod(i=1,n,(q^i-1)/(q-1))+q*O(q^k),k,q)}
    for(n=0,8,for(k=0,n*(n-1)/2,print1(T(n,k),","));print(""))

Formula

G.f.: A(x,q) = Sum_{n>=0} Sum_{k=0..n*(n-1)/2} T(n,k)*q^k*x^n/faq(n,q), where faq(n,q) is the q-factorial of n.
G.f.: A(x,q) = (1/x)*Series_Reversion( x/e_q(x,q) ) where e_q(x,q) = Sum_{n>=0} x^n/faq(n,q) is the q-exponential function.
G.f. satisfies: A(x,q) = e_q( x*A(x,q), q) and A( x/e_q(x,q), q) = e_q(x,q).
G.f. at q=1: A(x,1) = LambertW(-x)/(-x).
Row sums at q=+1: Sum_{k=0..n*(n-1)/2} T(n,k) = (n+1)^(n-1).
Row sums at q=-1: Sum_{k=0..n*(n-1)/2} T(n,k)*(-1)^k = (n+1)^[(n-1)/2] (A152291).
Sum_{k=0..n*(n-1)/2} T(n,k)*exp(2*Pi*I*k/n) = 1 for n>=1; i.e., the n-th row sum at q = exp(2*Pi*I/n), the n-th root of unity, equals 1 for n>=1. - Paul D. Hanna, Dec 04 2008
Sum_{k=0..n*(n-1)/2} T(n,k)*q^k = Sum_{pi} n!/(n-k+1)!*faq(n,q)/Product_{i=1..n} e(i)!*faq(i,q)^e(i), where pi runs through all nonnegative integer solutions of e(1)+2*e(2)+...+n*e(n) = n and k = e(1)+e(2)+...+e(n). - Vladeta Jovovic, Dec 05 2008
Sum_{k=0..[n/2]} T(n, n*k) = (1/n)*Sum_{d|n} phi(n/d)*(n+1)^(d-1), for n>0, with a(0)=1. - Paul D. Hanna, Jul 18 2013
Sum_{k=0..[n/2]} T(n, n*k) = A121774(n), the number of n-bead necklaces with n+1 colors, divided by (n+1). - Paul D. Hanna, Jul 18 2013

A345961 Numbers whose prime indices have reverse-alternating sum 2.

Original entry on oeis.org

3, 10, 12, 21, 27, 30, 40, 48, 55, 70, 75, 84, 90, 91, 108, 120, 147, 154, 160, 187, 189, 192, 210, 220, 243, 247, 250, 270, 280, 286, 300, 336, 360, 363, 364, 391, 432, 442, 462, 480, 490, 495, 507, 525, 551, 588, 616, 630, 640, 646, 675, 713, 748, 750, 756
Offset: 1

Views

Author

Gus Wiseman, Jul 12 2021

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The reverse-alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(k-i) y_i. Of course, the reverse-alternating sum of prime indices is also the alternating sum of reversed prime indices.
Also numbers with exactly two odd conjugate prime indices. The restriction to odd omega is A345960, and the restriction to even omega is A345962.

Examples

			The initial terms and their prime indices:
    3: {2}
   10: {1,3}
   12: {1,1,2}
   21: {2,4}
   27: {2,2,2}
   30: {1,2,3}
   40: {1,1,1,3}
   48: {1,1,1,1,2}
   55: {3,5}
   70: {1,3,4}
   75: {2,3,3}
   84: {1,1,2,4}
   90: {1,2,2,3}
   91: {4,6}
  108: {1,1,2,2,2}
  120: {1,1,1,2,3}
		

Crossrefs

Below we use k to indicate reverse-alternating sum.
The k > 0 version is A000037.
These multisets are counted by A000097.
The k = 0 version is A000290, counted by A000041.
These partitions are counted by A120452 (negative: A344741).
These are the positions of 2's in A344616.
The k = -1 version is A345912.
The k = 1 version is A345958.
The unreversed version is A345960 (negative: A345962).
A000070 counts partitions with alternating sum 1.
A002054/A345924/A345923 count/rank compositions with alternating sum -2.
A027187 counts partitions with reverse-alternating sum <= 0.
A056239 adds up prime indices, row sums of A112798.
A088218/A345925/A345922 count/rank compositions with alternating sum 2.
A088218 also counts compositions with alternating sum 0, ranked by A344619.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices.
A325534 and A325535 count separable and inseparable partitions.
A344606 counts alternating permutations of prime indices.
A344610 counts partitions by sum and positive reverse-alternating sum.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    sats[y_]:=Sum[(-1)^(i-Length[y])*y[[i]],{i,Length[y]}];
    Select[Range[100],sats[primeMS[#]]==2&]

A007946 a(n) = 6*(2*n+1)! / ((n!)^2*(n+3)).

Original entry on oeis.org

2, 9, 36, 140, 540, 2079, 8008, 30888, 119340, 461890, 1790712, 6953544, 27041560, 105306075, 410605200, 1602881040, 6263890380, 24502865310, 95937144600, 375945078600, 1474358525640, 5786272150230, 22724268808176, 89301056353200, 351140573438200, 1381487341784004
Offset: 0

Views

Author

David W. Wilson and Dean Hickerson, Apr 21 1997

Keywords

Comments

If Y is a fixed 2-subset of a 2n-set X then a(n-2) is the number of (n-1)-subsets of X intersecting Y. - Milan Janjic, Oct 21 2007

Crossrefs

Programs

  • Magma
    [Binomial(2*n+2, n) + Binomial(2*n+3, n) : n in [0..30]]; // Wesley Ivan Hurt, Aug 23 2014
    
  • Maple
    A007946:=n->binomial(2*n+2,n)+binomial(2*n+3,n): seq(A007946(n), n=0..30); # Wesley Ivan Hurt, Aug 23 2014
  • Mathematica
    Table[Binomial[2 n + 2, n] + Binomial[2 n + 3, n], {n, 0, 30}] (* Wesley Ivan Hurt, Aug 23 2014 *)
    Table[6*(2*n + 1)!/((n!)^2*(n + 3)), {n,0,50}] (* G. C. Greubel, Jan 23 2017 *)
  • PARI
    for(n=0,50, print1(6*(2*n + 1)!/((n!)^2*(n + 3)), ", ")) \\ G. C. Greubel, Jan 23 2017

Formula

a(n) = C(2n+2, n) + C(2n+3, n). - Emeric Deutsch, May 16 2003
From Karol A. Penson, Aug 23 2014: (Start)
O.g.f.: ((-2+1/z^2-2/z)/sqrt(1-4*z)-1/z^2)/(2*z).
Representation as the n-th moment of a signed function: w(x) = sqrt(x/(4-x))*(x^2-2*x-2)/(2*Pi) on the segment x = (0,4): a(n) = Integral_{x=0..4} x^n*w(x) dx. For x->0, w(x)->0, and for x->4, w(x)->infinity.
a(n) ~ (3/65536)*(4^n)*(-55332459+18443992*n - 6147840*n^2 + 2050048*n^3 - 688128*n^4 + 262144*n^5)/(n^(11/2)*sqrt(Pi)), for n->infinity.
(End)
a(n) = A001791(n+1) + A002054(n+1). - Wesley Ivan Hurt, Aug 23 2014
From Peter Luschny, Aug 25 2014: (Start)
a(n) = ((6*(2*n+1))/(n+3))* binomial(2*n,n).
a(n) has the asymptotic series 2^(2*n+3)*(1+(n+3)/((2*n+3))) *Sum_{k>=0}((num(k)/den(k))*(-n)^(-k))/sqrt(n*Pi). Here den(n) = 2^(4*n-A000120(n)) = A061549(n) and num(n) = 1, 25, 1297, 32755, 3249099, 79652055, 3876842453, 93900904955, 18138634602803, 437081823058595, 21036073578365391,... For example a(100) = 0.10602088220899083... *10^61 with the given values of num.
a(x) ~ exp(x*log(4)-(log(Pi)+cos(2*Pi*x)*(log(x) + 1/(4*x)))/2 + log((12*x+6)/ (3+x))). For example, this formula gives a(100) = 0.10602088... *10^61.
a(n) = A242986(2*n). (End)
a(n) = 12*4^n*Gamma(3/2+n)/(sqrt(Pi)*(3+n)*Gamma(1+n)). - Peter Luschny, Dec 14 2015
a(n) = 2*Sum_{i=0..n} (1/(i+1)*binomial(2*i+3,i+3)*binomial(2*(n-i),n-i)). - Vladimir Kruchinin, Apr 20 2016
E.g.f.: 2*(x*(-1 + 3*x)*BesselI(0,2*x) + (1 - 2*x + 3*x^2) * BesselI(1,2*x))*exp(2*x)/x^2. - Ilya Gutkovskiy, Apr 20 2016
D-finite with recurrence n*(n+3)*a(n) -2*(n+2)*(2*n+1)*a(n-1) = 0. - R. J. Mathar, Mar 30 2022
From Amiram Eldar, Feb 16 2023: (Start)
Sum_{n>=0} 1/a(n) = 8*Pi/(27*sqrt(3)) + 1/9.
Sum_{n>=0} (-1)^n/a(n) = 8*log(phi)/(5*sqrt(5)) + 1/15, where phi is the golden ratio (A001622). (End)

A090452 Scaled array A078740 ((3,2)-Stirling2).

Original entry on oeis.org

1, 1, 3, 2, 1, 7, 16, 15, 5, 1, 12, 51, 105, 114, 63, 14, 1, 18, 118, 396, 771, 910, 644, 252, 42, 1, 25, 230, 1110, 3235, 6083, 7580, 6240, 3270, 990, 132, 1, 33, 402, 2600, 10365, 27483, 50464, 65331, 59625, 37620, 15642, 3861, 429, 1, 42, 651, 5390, 27825, 97188
Offset: 1

Views

Author

Wolfdieter Lang, Dec 23 2003

Keywords

Comments

This scaled Stirling2 array will be called s2_{3,2}(n,m).
The sequence of row lengths is [1,3,5,7,...]=A005408(n-1).
The generating function for the sequence from column no. m is G(m,x)=(x^ceiling(m/2))*P(m,x)/(1-x)^(2*m-3) with the row polynomials of array A091029(m,k).
The generating functions of the column sequences obey the hypergeometric differential-difference eq.:x*(1-x)*G''(m,x) + 2*(1-m*x)*G'(m,x) - m*(m-1)*G(m,x) = 2*m*x*G'(m-1,x) + 2*m*(m-1)*G(m-1,x) + m*(m-1)*G(m-2,x), m>=3; with G(2,x)=x/(1-x) and G(1,x)=0. The primes denote differentiation w.r.t. x.

Examples

			Triangle begins:
  [1];
  [1,3,2];
  [1,7,16,15,5];
  [1,12,51,105,114,63,14];
  ...
		

Crossrefs

a(n, 2*n)=A000108(n) (Catalan), n>=1, a(n, 2*n-1)=3*A002054(n-1), n>=2, a(n, 2*n-2)=A091031(n), n>=2.
The column sequences (without leading zeros) are: A000012 (powers of 1), A055998, A090453-4, A091026-7, etc.
Cf. A090442 (row sums). The alternating row sums are 0 except for row n=1 which gives 1.

Programs

Formula

a(n, m) = (m!/((n+1)!*n!))*A078740(n, m), n>=1, 2<= m <=2*n.
Recursion: a(n, m) = ((n+m-1)*(n+m-2)*a(n-1, m)+2*(n+m-2)*m*a(n-1, m-1)+m*(m-1)*a(n-1, m-2))/((n+1)*n), n>=2, 2<=m<=2*n, a(1, 2)=1, a(n, 0) := 0, a(n, 1) := 0 (from the recursion of array A078740).

A104978 Triangle read by rows, where the g.f. satisfies A(x, y) = 1 + x*A(x, y)^2 + x*y*A(x, y)^3.

Original entry on oeis.org

1, 1, 1, 2, 5, 3, 5, 21, 28, 12, 14, 84, 180, 165, 55, 42, 330, 990, 1430, 1001, 273, 132, 1287, 5005, 10010, 10920, 6188, 1428, 429, 5005, 24024, 61880, 92820, 81396, 38760, 7752, 1430, 19448, 111384, 352716, 678300, 813960, 596904, 245157, 43263, 4862, 75582, 503880, 1899240, 4476780, 6864396, 6864396, 4326300, 1562275, 246675
Offset: 0

Views

Author

Paul D. Hanna, Mar 30 2005

Keywords

Examples

			The triangle T(n, k) begins:
  [0]    1;
  [1]    1,     1;
  [2]    2,     5,      3;
  [3]    5,    21,     28,     12;
  [4]   14,    84,    180,    165,     55;
  [5]   42,   330,    990,   1430,   1001,    273;
  [6]  132,  1287,   5005,  10010,  10920,   6188,   1428;
  [7]  429,  5005,  24024,  61880,  92820,  81396,  38760,   7752;
  [8] 1430, 19448, 111384, 352716, 678300, 813960, 596904, 245157, 43263;
  ...
The array A(n, k) begins:
  [0]   1,    1,      3,      12,       55,       273,       1428, ...  [A001764]
  [1]   1,    5,     28,     165,     1001,      6188,      38760, ...  [A025174]
  [2]   2,   21,    180,    1430,    10920,     81396,     596904, ...  [A383450]
  [3]   5,   84,    990,   10010,    92820,    813960,    6864396, ...  [A383451]
  [4]  14,  330,   5005,   61880,   678300,   6864396,   65615550, ...
  [5]  42, 1287,  24024,  352716,  4476780,  51482970,  551170620, ...
  [6] 132, 5005, 111384, 1899240, 27457584, 354323970, 4206302100, ...
  [A000108]  |  [A074922][A383452]
         [A002054]
		

Crossrefs

Columns of array: A000108, A002054, A074922, A383452.
Rows of array: A001764, A025174, A383450, A383451.
Cf. A001002 (antidiagonal sums), A001764 (semidiagonal sums), A027307 (row sums), A104979, A383439 (central terms).

Programs

  • Magma
    [Binomial(2*n+k, n+2*k)*Binomial(n+2*k, k)/(n+k+1): k in [0..n], n in [0..12]]; // G. C. Greubel, Jun 08 2021
    
  • Maple
    From Peter Luschny, May 04 2025:  (Start)
    T := (n, k) -> (k + 2*n)!/(k!*(n - k)!*(n + k + 1)!):
    seq(print(seq(T(n, k), k = 0..n)), n = 0..10);
    # Alternatively the array:
    A := (n, k) -> (3*k + 2*n)!/(k!*n!*(n + 2*k + 1)!);
    for n from 0 to 8 do seq(A(n, k), k = 0..7) od;  (End)
  • Mathematica
    T[n_, k_]:= Binomial[2n+k, n+2k]*Binomial[n+2k, k]/(n+k+1);
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* Jean-François Alcover, Jan 27 2019 *)
  • PARI
    T(n,k) = local(A=1+x+x*y+x*O(x^n)+y*O(y^k)); for(i=1,n,A=1+x*A^2+x*y*A^3); polcoeff(polcoeff(A,n,x),k,y)
    for(n=0, 10, for(k=0, n, print1(T(n,k),", ")); print(""))
    
  • PARI
    Dy(n, F)=local(D=F); for(i=1, n, D=deriv(D,y)); D
    T(n,k)=local(A=1); A=1+sum(m=1, n+1, x^m/y^(m+1) * Dy(m-1, (y^2+y^3)^m/m!)) +x*O(x^n)+y*O(y^k); polcoeff(polcoeff(A, n,x),k,y)
    for(n=0,10,for(k=0,n,print1(T(n,k),", "));print()) \\ Paul D. Hanna, Jun 22 2012
    
  • PARI
    x='x; y='y; z='z; Fxyz = 1 - z + x*z^2 + x*y*z^3;
    seq(N) = {
      my(z0 = 1 + O((x*y)^N), z1 = 0);
      for (k = 1, N^2,
        z1 = z0 - subst(Fxyz, z, z0)/subst(deriv(Fxyz, z), z, z0);
        if (z0 == z1, break()); z0 = z1);
      vector(N, n, Vecrev(polcoeff(z0, n-1, 'x)));
    };
    concat(seq(9)) \\ Gheorghe Coserea, Nov 30 2016
    
  • Sage
    flatten([[binomial(2*n+k, n+2*k)*binomial(n+2*k, k)/(n+k+1) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 08 2021

Formula

T(n, k) = binomial(2*n+k, n+2*k)*binomial(n+2*k, k)/(n+k+1).
G.f.: A(x, y) = Sum_{n>=0} x^n/y^(n+1) * d^(n-1)/dy^(n-1) (y^2 + y^3)^n / n!. - Paul D. Hanna, Jun 22 2012
G.f. of row n: 1/y^(n+1) * d^(n-1)/dy^(n-1) (y^2+y^3)^n / n!. - Paul D. Hanna, Jun 22 2012
A(n, k) = T(n + k, k) = (3*k + 2*n)! / (k!*n!*(n + 2*k + 1)!). - Peter Luschny, May 04 2025
Previous Showing 41-50 of 95 results. Next