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 11-20 of 32 results. Next

A274969 Number of walks in the first quadrant starting and ending at (0,0) consisting of 3n steps taken from {E=(1, 0), D=(-1, 1), S=(0, -1)}, no S step occurring before the final E step.

Original entry on oeis.org

1, 1, 4, 21, 121, 728, 4488, 28101, 177859, 1134705, 7283640, 46981740, 304253964, 1976886616, 12880883408, 84130964709, 550649378199, 3610705776755, 23714554702020, 155979407872365, 1027269675638745, 6773476758296220, 44709685668953760, 295402076512228140, 1953492865541875476
Offset: 0

Views

Author

David Bevan, Jul 13 2016

Keywords

Comments

Number of pushall stack words of length 3n. These consist of n 'ρ' letters, n 'λ' letters and n 'μ' letters, such that the count of 'λ' letters never exceeds the count of 'ρ' letters, the count of 'μ' letters never exceeds the count of 'λ' letters, and all the 'ρ' letters occur before any of the 'μ' letters.
A permutation of length n is 2-stack pushall sortable if and only if it can be sorted by a sequence of 3n operations represented by a pushall stack word of length 3n, where ρ corresponds to pushing to the 1st (Right) stack, λ corresponds to popping from the 1st stack and pushing to the 2nd (Left) stack, and μ corresponds to popping from the 2nd stack.
There is an obvious bijection between pushall stack words of length 3n using the letters 'ρ', 'λ', and 'μ', and pushall stack words of length 3n in which 'ρ' and 'μ' are the same symbol. In this way, a(n) is the number of words consisting of n 'λ' letters and 2n 'μ' letters, such that the count of 'λ' letters never exceeds the count of 'μ' letters in any prefix or suffix of the word. This allows a closed form (added below) based on two usages of "Andre's reflection method", in analogy with the Catalan numbers. - Janis Stipins, May 27 2019

Examples

			For n=2, the four walks are EEDDSS, EEDSDS, EDEDSS and EDESDS.
		

Crossrefs

Walks in the first quadrant from (0,0) to (0,0) with steps from {E, D, S} A005789.
2-stack pushall sortable permutations A274970.
Cf. A259475.

Programs

  • Mathematica
    CoefficientList[Module[{r=0},Do[r+=Coefficient[1-16z+64z^2+(21z-96z^2)f+(-4z+27z^2)f^2+(-4z^2+27z^3)f^3/.f->r,z,i]z^i,{i,0,30}];r],z]
  • PARI
    N=O(z^35); f=1+N; while(f+N<>f=1+(5*z-32*z^2+(-4+27*z)*z*(1+z*f)*f^2)/(1-21*z+96*z^2), ); Vec(f+N) \\ Using that the g.f. is fixed point of T(f)=1+(5*z-32*z^2+(-4+27*z)*z*(1+z*f)*f^2)/(1-21*z+96*z^2). - M. F. Hasler, Jul 13 2016
    
  • PARI
    a(n) = binomial(3*n,n) - 2*binomial(3*n,n-1) + binomial(3*n,n-2); \\ Janis Stipins, May 27 2019

Formula

The o.g.f. f=f(z) is algebraic, satisfying the cubic equation (1-16*z+64*z^2) + (-1+21*z-96*z^2)*f + (-4*z+27*z^2)*f^2 + (-4*z^2+27*z^3)*f^3 = 0.
a(n) = A259475(n,n). - Alois P. Heinz, Nov 19 2018
a(n) = binomial(3*n,n) - 2*binomial(3*n,n-1) + binomial(3*n,n-2). - Janis Stipins, May 27 2019
G.f.: (2*(1 - 6*x)*cos(arccos(1 - (27*x)/2)/6)/sqrt(4 - 27*x) + 4*sqrt(3)*sqrt(x)*sin(arcsin(3*sqrt(3)*sqrt(x)/2)/3) - 1)/(3*x). - Stefano Spezia, Feb 19 2022

Extensions

Data double-checked by M. F. Hasler, Jul 13 2016

A321976 7-dimensional Catalan numbers.

Original entry on oeis.org

1, 1, 429, 1385670, 13672405890, 278607172289160, 9490348077234178440, 475073684264389879228560, 32103104214166146088869942000, 2760171874087743799855959353857200, 289232890341906497299306268771988273600, 35764585916110766978895474668714467232388000
Offset: 0

Views

Author

Seiichi Manyama, Nov 23 2018

Keywords

Comments

Number of n X 7 Young tableaux.

Crossrefs

Programs

  • GAP
    List([0..15],n->24883200*Factorial(7*n)/Product([0..6],k->Factorial(n+k))); # Muniru A Asiru, Nov 25 2018
  • Magma
    [24883200*Factorial(7*n) / (Factorial(n)*Factorial(n + 1)*Factorial(n + 2)*Factorial(n + 3)*Factorial(n + 4)*Factorial(n + 5)*Factorial(n + 6)): n in [0..15]]; // Vincenzo Librandi, Nov 24 2018
    
  • Mathematica
    Table[24883200*(7*n)!/(n!*(n+1)!*(n+2)!*(n+3)!*(n+4)!*(n+5)!*(n+6)!),{n,0,15}] (* Vincenzo Librandi, Nov 24 2018 *)
  • PARI
    {a(n) = 24883200*(7*n)!/(n!*(n+1)!*(n+2)!*(n+3)!*(n+4)!*(n+5)!*(n+6)!)}
    

Formula

a(n) = 0!*1!*...*6! * (7*n)! / ( n!*(n+1)!*...*(n+6)! ).
a(n) ~ 3110400 * 7^(7*n + 1/2) / (Pi^3 * n^24). - Vaclav Kotesovec, Nov 23 2018

A065058 Number of paths to T(n,n,n) with T(i,j,k)= 0 if j>i or k>j and T(i,j,k) = T(i-1,j,k) + T(i,j-1,k) + T(i,j,k-1) and T(i,j,0) = 1.

Original entry on oeis.org

1, 1, 3, 18, 162, 1851, 24661, 365613, 5863881, 99895425, 1785024645, 33156724734, 635961987570, 12531882072719, 252701147866029, 5198011293931270, 108793300411597194, 2312049376195527621, 49804793378882733343, 1085910951385068915212, 23934948368968158240960
Offset: 0

Views

Author

Wouter Meeussen, Nov 06 2001

Keywords

Comments

Similar to the "3-dimensional Catalan numbers" of A005789, but with paths starting from anywhere on z=0, instead of only from [0,0,0].

Examples

			a(3) = 18 because [3,3,3] can be reached from [x,y,0] in the following ways (along nondecreasing paths): 5 [1,1,0] + 5 [2,1,0] + 3 [2,2,0] + 2 [3,1,0] + 2 [3,2,0] + [3,3,0].
		

Crossrefs

Cf. A005789.

Programs

  • Mathematica
    T[0, 0, 0] := 1; T[x_, y_, z_] := 0 /; (x< y || y< z); T[u_, v_, 0] := 1; T[, 0, 0] := 1 T[x, y_, z_] := (T[x, y, z]= T[x-1, y, z]+T[x, y-1, z] +T[x, y, z-1]) /; (y<=x ||z<=y)

Formula

a(n) ~ 13 * 3^(3*n+7/2) / (2^11 * Pi * n^4). - Vaclav Kotesovec, Sep 10 2014

A161581 a(n) = (3n)!/(n!(n+1)!(n+2)!).

Original entry on oeis.org

21, 231, 3003, 43758, 692835, 11685817, 207157665, 3823000545, 72931087320, 1430571328200, 28734046963560, 589047962752980, 12292044987448215, 260543149635912165, 5599392250947235125, 121830987186399315825
Offset: 3

Views

Author

Alexander Adamchuk, Jun 14 2009

Keywords

Comments

3-d analog of the Catalan numbers A000108.

Crossrefs

Programs

  • Maple
    A161581 := proc(n) (3*n)!/n!/(n+1)!/(n+2)! ; end: seq(A161581(n),n=3..40) ; # R. J. Mathar, Jun 16 2009
    a := proc (n) options operator, arrow: factorial(3*n)/(factorial(n)*factorial(n+1)*factorial(n+2)) end proc: seq(a(n), n = 3 .. 20); # Emeric Deutsch, Jun 14 2009

Formula

a(n) = A006480(n)/((n+1)^2*(n+2)).
a(n) ~ 3^(3*n + 1/2) / (2*Pi*n^4). - Vaclav Kotesovec, Feb 21 2023
a(n) = (1/2)*A005789(n) for n >= 3. - Peter Bala, Mar 01 2023
D-finite with recurrence (n+2)*(n+1)*a(n) -3*(3*n-1)*(3*n-2)*a(n-1)=0. - R. J. Mathar, Nov 22 2024

Extensions

Repetitions of information contained in other sequences removed by R. J. Mathar, Jun 16 2009
More terms from Emeric Deutsch, Jun 14 2009

A321977 8-dimensional Catalan numbers.

Original entry on oeis.org

1, 1, 1430, 23371634, 1489877926680, 231471904322784840, 67867669180627125604080, 32103104214166146088869942000, 22081374992701950398847674830857600, 20535535214275361308250745082811167425600, 24486819823897171791550434989846505231774984000
Offset: 0

Views

Author

Seiichi Manyama, Nov 23 2018

Keywords

Comments

Number of n X 8 Young tableaux.

Crossrefs

Programs

  • GAP
    List([0..15],n->125411328000*Factorial(8*n)/Product([0..7],k->Factorial(n+k))); # Muniru A Asiru, Nov 25 2018
  • Magma
    [125411328000*Factorial(8*n)/(Factorial(n)*Factorial(n + 1)*Factorial(n + 2)*Factorial(n + 3)*Factorial(n + 4)*Factorial(n + 5)*Factorial(n + 6)*Factorial(n + 7)): n in [0..15]]; // Vincenzo Librandi, Nov 24 2018
    
  • Mathematica
    Table[125411328000 (8 n)! / (n! (n+1)! (n+2)! (n+3)! (n+4)! (n+5)! (n+6)! (n + 7)!), {n, 0, 15}] (* Vincenzo Librandi, Nov 24 2018 *)

Formula

a(n) = 0!*1!*...*7! * (8*n)! / ( n!*(n+1)!*...*(n+7)! ).
a(n) ~ 1913625 * 2^(24*n + 14) / (Pi^(7/2) * n^(63/2)). - Vaclav Kotesovec, Nov 23 2018

A005792 Positive numbers that are the sum of 2 squares or 3 times a square.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 10, 12, 13, 16, 17, 18, 20, 25, 26, 27, 29, 32, 34, 36, 37, 40, 41, 45, 48, 49, 50, 52, 53, 58, 61, 64, 65, 68, 72, 73, 74, 75, 80, 81, 82, 85, 89, 90, 97, 98, 100, 101, 104, 106, 108, 109, 113, 116, 117, 121, 122, 125, 128, 130, 136, 137, 144, 145
Offset: 1

Views

Author

Keywords

Comments

Equivalently, numbers of the form k^2, k^2+m^2, or 3*k^2, where k >= 1, m >= 1.
Theorem (Golomb; Snover et al.): A triangle can be partitioned into n pairwise congruent triangles iff n is of the form k^2, k^2+m^2, or 3*k^2.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. Soifer, How Does One Cut A Triangle?, Chapter 2, CEME, Colorado Springs CO 1990.

Crossrefs

Union of positive terms of A000290, A000404, A033428.
Cf. A074764.

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 21 2001
Entry revised by N. J. A. Sloane, Nov 30 2016

A065078 Triangle read by rows: a(n,m) = T[n,m,m] where T[i,j,k] is the 3-dimensional pyramid defined by T[n,m,0]=1 and T[i,j,k]=0 if j>i or k>j and T[i,j,k]=T[i-1,j,k]+T[i,j-1,k]+T[i,j,k-1].

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 10, 18, 1, 4, 22, 79, 162, 1, 5, 40, 220, 831, 1851, 1, 6, 65, 492, 2681, 10488, 24661, 1, 7, 98, 962, 6883, 37367, 149743, 365613, 1, 8, 140, 1715, 15318, 105731, 573051, 2336243, 5863881, 1, 9, 192, 2856, 30840, 258604, 1742770
Offset: 0

Views

Author

Wouter Meeussen, Nov 09 2001

Keywords

Comments

Number of paths to T[n,m,m] counted from the bottom plane (or T[n,m,0]).

Examples

			[3,2,2] can be reached from 3*[1,1,0] + 3*[2,1,0] + 2*[2,2,0] + 1*[3,1,0] + 1*[3,2,0], so a(3,2) = 3 + 3 + 2 + 1 + 1 =10.
Triangle begins
1;
1, 1;
1, 2, 3;
1, 3, 10, 18;
1, 4, 22, 79, 162;
		

Crossrefs

Last number in each row is A065058.

Formula

T[0, 0, 0] := 1; T[x_, y_, z_] := 0 /; (x< y || y< z); T[u_, v_, 0] := 1; T[, 0, 0] := 1; T[x, y_, z_] := (T[x, y, z]= T[x-1, y, z]+T[x, y-1, z] +T[x, y, z-1]) /; (y<=x ||z<=y); Table[T[x, y, y], {x, 0, 10}, {y, 0, x}]

A087647 Triangle of 3-Narayana numbers, N(n,k), for n >= 1, 0 <= k <= 2n-2.

Original entry on oeis.org

1, 1, 3, 1, 1, 10, 20, 10, 1, 1, 22, 113, 190, 113, 22, 1, 1, 40, 400, 1456, 2212, 1456, 400, 40, 1, 1, 65, 1095, 7095, 20760, 29484, 20760, 7095, 1095, 65, 1, 1, 98, 2541, 26180, 127435, 320034, 433092, 320034, 127435, 26180, 2541, 98, 1, 1, 140, 5250, 79870
Offset: 1

Views

Author

Robert A. Sulanke (sulanke(AT)math.boisestate.edu), Sep 23 2003

Keywords

Comments

N(n,k) counts ballot sequences for three candidates having length 3n, ending in a tie and having k instances of a vote for a weaker candidate being followed immediately by a vote for a stronger one.
Equivalently, N(n,k) counts the lattice paths P := p_1p_2...p_{3n} using the steps X := (1,0,0), Y := (0,1,0) and Z := (0,0,1), running from (0,0,0) to (n,n,n), lying in {(x,y,z) : 0<=x<=y<=z } and satisfying #{i : p_ip_{i+1} in {XY,XZ,YZ} } = k.

Examples

			1;
1,3,1;
1,10,20,10,1;
1,22,113,190,113,22,1;
1,40,400,1456,2212,1456,400,40,1;
1,65,1095,7095,20760,29484,20760,7095,1095,65,1;
1,98,2541,26180,127435,320034,433092,320034,127435,26180,2541,98,1
		

Crossrefs

Cf. A001263 (Narayana numbers), A005789 (= Sum[N(n, k), {k, 0, 2n-2}], 3-dimensional Catalan numbers), A056939 (antichains in the poset 3*m*n).

Programs

  • Maple
    seq( seq( add(2*(-1)^(k-j)*binomial(3*n+1, k-j)* binomial(n+j,n)*binomial(n+j+1,n)*binomial(n+j+2,n)/(n+1)^2/(n+2), j = 0 .. k), k = 0 .. 2*n-2), n = 1 ..7 );

Formula

For 0<=k<=2n-2, N(n, k) := Sum[2*(-1)^(k-j)*C(3*n+1, k-j)*C(n+j, n)*C(n+j+1, n)*C(n+j+2, n)/(n+1)^2/(n+2), {j, 0, k}] = Sum[(-1)^(k-j)*C(3*n+1, k-j)*a(n, j), {j, 0, k}] where a(m, n) is an entry in the triangle of A056939.
Recurrence: If N_n(t) := Sum[t^k*N(n, k), {k, 0, 2n-2}] then (3n-4)(n+2)(n+1)^2 N_n(t) = (3n-2)(n+1)( 4(1+t+t^2) - 5(1+7t+t^2)n +3(1+7t+t^2)n^2 ) N_{n-1}(t) - (n-2)( -12 +29n -30n^2 +9n^3)(1-t)^4 N_{n-2}(t) +(3n-1)(n-2)(n-3)(n-4) (1-t)^6 N_{n-3}(t).

A185148 Number of rectangular arrangements of [1,3n] in 3 increasing sequences of size n and n monotonic sequences of size 3.

Original entry on oeis.org

1, 6, 53, 587, 7572, 109027, 1705249, 28440320, 499208817, 9134237407, 172976239886, 3371587949969, 67351686970929, 1374179898145980, 28557595591148315, 603118526483125869, 12920388129877471030, 280324904918707937001, 6151595155000424589327, 136384555249451824930126
Offset: 1

Views

Author

Olivier Gérard, Feb 15 2011

Keywords

Comments

a(n) counts a subset of A025035(n).
a(n) counts a more general set than A005789(n).
a(n) is also the number of (3*n-1)-step walks on 3-dimensional cubic lattice from (1,0,0) to (n,n,n) with steps in {(1,0,0), (0,1,0), (0,0,1)} such that for each point (x,y,z) we have x<=y<=z or x>=y>=z. - Alois P. Heinz, Feb 29 2012

Examples

			For n = 2 the a(2) = 6 arrangements are:
+---+  +---+  +---+  +---+  +---+  +---+
|1 4|  |1 6|  |1 3|  |1 3|  |1 2|  |1 2|
|2 5|  |2 5|  |2 5|  |2 4|  |3 5|  |3 4|
|3 6|  |3 4|  |4 6|  |5 6|  |4 6|  |5 6|
+---+  +---+  +---+  +---+  +---+  +---+
Only the second of these arrangements is not counted by A005789(2).
		

Crossrefs

Column k=3 of A208615. - Alois P. Heinz, Feb 29 2012

Programs

  • Maple
    b:= proc(x, y, z) option remember;
          `if`(x=z, `if`(x=0, 1, 2*b(x-1, y, z)), `if`(x>0, b(x-1, y, z), 0)+
          `if`(y>x, b(x, y-1, z), 0)+ `if`(z>y, b(x, y, z-1), 0))
        end:
    a:= n-> b(n-1, n$2):
    seq(a(n), n=1..30);  # Alois P. Heinz, Feb 29 2012
  • Mathematica
    b[x_, y_, z_] := b[x, y, z] = If[x == z, If[x == 0, 1, 2*b[x - 1, y, z]], If[x > 0, b[x - 1, y, z], 0] + If[y > x, b[x, y - 1, z], 0] + If[z > y, b[x, y, z - 1], 0]];
    a[n_] := b[n - 1, n, n];
    Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Nov 12 2017, after Alois P. Heinz *)

Formula

a(n) ~ c * 27^n / n^4, where c = 0.608287207375... . - Vaclav Kotesovec, Sep 03 2014, updated Sep 07 2016

Extensions

More terms and example from Alois P. Heinz, Feb 22 2011
Extended beyond a(8) by Alois P. Heinz, Feb 22 2012

A241958 Duplicate of A217800.

Original entry on oeis.org

1, 2, 12, 110, 1274, 17136, 255816, 4124406, 70549050, 1264752060, 23555382240, 452806924752, 8939481277552, 180551099694400, 3719061442253520, 77933728043586630, 1658001861319441050, 35749633305661575300, 780123576993991461000, 17208112644166765652100, 383292388823513983713900
Offset: 0

Views

Author

Karol A. Penson, Aug 10 2014

Keywords

Comments

This is a duplicate of A217800 or of A007724. - Alois P. Heinz, Aug 22 2016

Programs

  • Magma
    [Factorial(3*n+3)/((4*(n+1)^2-1)*Factorial((n+1))^2*Factorial(n+ 2)): n in [0..20]]; // Vincenzo Librandi, Aug 30 2014
  • Maple
    a := n -> (-1)^n*hypergeom([-2-2*n,-2*n,-2*n-1],[2, 3],1):
    seq(round(evalf(a(n),32)),n=0..20); # Peter Luschny, Aug 29 2014
  • Mathematica
    Table[(3 n + 3)!/((4 (n + 1)^2 - 1) ((n + 1)!)^2 (n + 2)!), {n, 0, 20}] (* Vincenzo Librandi, Aug 30 2014 *)
    Table[(-1)^n HypergeometricPFQ[{-2 - 2 n, -2 n, -2 n - 1}, {2, 3},
    1], {n, 0, 20}] (* Michael De Vlieger, Aug 22 2016 *)
  • PARI
    a(n) = (3*n+3)!/((4*(n+1)^2-1)*((n+1)!)^2*(n+2)!); \\ Michel Marcus, Aug 10 2014
    

Formula

O.g.f.(in Maple notation): hypergeom([1/2, 1, 4/3, 5/3], [2, 5/2, 3], 27*z);
a(n) ~ (1/93312)*sqrt(3)*27^n*(314928*n^4-1644624*n^3+5545260*n^2 -15387660*n+38310503)/(Pi*n^8), for n -> infinity.
Representation of a(n) as the n-th power moment of a positive function on the segment [0,27]:
a(n) = int(x^n*W(x),x=0..27),n=0,1,2..., where
W(x) = 1/(Pi*sqrt(x))+sqrt(x)/Pi-(9/20)*sqrt(3)*2^(1/3)* hypergeom([-2/3, -1/6, 1/3], [2/3, 11/6], (1/27)*x)*x^(1/3)/ (sqrt(Pi)*Gamma(5/6)*Gamma(2/3))-(27/56)*2^(2/3)*Gamma(5/6) *Gamma(2/3)*hypergeom([-1/3, 1/6, 2/3], [4/3, 13/6], (1/27)*x)* x^(2/3)/Pi^(5/2).
W(x) for x->0 has the singularity 1/sqrt(x), W(27)=0.
This is the solution of the Hausdorff moment problem and is unique.
a(n) = (1/2)*(n+3)!/((4*(n+1)^2-1)*(n+1)!)*A005789(n), where A005789(n) are the three-dimensional Catalan numbers (see the Gorska and Penson link).
a(n) = A006480(n+1)/((2+n)*(1+2*n)*(3+2*n)). - Peter Luschny, Aug 15 2014
a(n) = (-1)^n*hypergeom([-2-2*n,-2*n,-2*n-1],[2,3],1). - Peter Luschny, Aug 29 2014
(2*n+3)*(n+2)*(n+1)*a(n) -3*(3*n+2)*(2*n-1)*(3*n+1)*a(n-1)=0. - R. J. Mathar, Jun 14 2016
Previous Showing 11-20 of 32 results. Next