cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-30 of 41 results. Next

A194589 a(n) = A194588(n) - A005043(n); complementary Riordan numbers.

Original entry on oeis.org

0, 0, 1, 1, 5, 11, 34, 92, 265, 751, 2156, 6194, 17874, 51702, 149941, 435749, 1268761, 3700391, 10808548, 31613474, 92577784, 271407896, 796484503, 2339561795, 6877992334, 20236257626, 59581937299, 175546527727, 517538571125, 1526679067331, 4505996000730
Offset: 0

Views

Author

Peter Luschny, Aug 30 2011

Keywords

Comments

The inverse binomial transform of a(n) is A194590(n).

Crossrefs

Programs

  • Maple
    # First method, describes the derivation:
    A056040 := n -> n!/iquo(n,2)!^2:
    A057977 := n -> A056040(n)/(iquo(n,2)+1);
    A001006 := n -> add(binomial(n,k)*A057977(k)*irem(k+1,2),k=0..n):
    A005043 := n -> `if`(n=0,1,A001006(n-1)-A005043(n-1)):
    A189912 := n -> add(binomial(n,k)*A057977(k),k=0..n):
    A194588 := n -> `if`(n=0,1,A189912(n-1)-A194588(n-1)):
    A194589 := n -> A194588(n)-A005043(n):
    # Second method, more efficient:
    A100071 := n -> A056040(n)*(n/2)^(n-1 mod 2):
    A194589 := proc(n) local k;
    (n mod 2)+(1/2)*add((-1)^k*binomial(n,k)*A100071(k+1),k=1..n) end:
    # Alternatively:
    a := n -> `if`(n<3,iquo(n,2),hypergeom([1-n/2,-n,3/2-n/2],[1,2-n],4)): seq(simplify(a(n)), n=0..30); # Peter Luschny, Mar 07 2017
  • Mathematica
    sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; a[n_] := Mod[n, 2] + (1/2)*Sum[(-1)^k*Binomial[n, k]*2^-Mod[k, 2]*(k+1)^Mod[k, 2]*sf[k+1], {k, 1, n}]; Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Jul 30 2013, from 2nd method *)
    Table[If[n < 3, Quotient[n, 2], HypergeometricPFQ[{1 - n/2, -n, 3/2 - n/2}, {1, 2-n}, 4]], {n,0,30}] (* Peter Luschny, Mar 07 2017 *)
  • Maxima
    a(n):=sum(binomial(n+2,k)*binomial(n-k,k),k,0,(n)/2); /* Vladimir Kruchinin, Sep 28 2015 */
    
  • PARI
    a(n) = sum(k=0, n/2, binomial(n+2,k)*binomial(n-k,k));
    vector(30, n, a(n-3)) \\ Altug Alkan, Sep 28 2015

Formula

a(n) = sum_{k=0..n} C(n,k)*A194590(k).
a(n) = (n mod 2)+(1/2)*sum_{k=1..n} (-1)^k*C(n,k)*(k+1)$*((k+1)/2)^(k mod 2). Here n$ denotes the swinging factorial A056040(n).
a(n) = PSUMSIGN([0,0,1,2,6,16,45,..] = PSUMSIGN([0,0,A005717]) where PSUMSIGN is from Sloane's "Transformations of integer sequences". - Peter Luschny, Jan 17 2012
A(x) = B'(x)*(1/x^2-1/(B(x)*x)), where B(x)/x is g.f. of A005043. - Vladimir Kruchinin, Sep 28 2015
a(n) = Sum_{k=0..n/2} C(n+2,k)*C(n-k,k). - Vladimir Kruchinin, Sep 28 2015
a(n) = hypergeom([1-n/2,-n,3/2-n/2],[1,2-n],4) for n>=3. - Peter Luschny, Mar 07 2017
a(n) ~ 3^(n + 1/2) / (8*sqrt(Pi*n)). - Vaclav Kotesovec, Feb 17 2024

A219670 Number of n-step paths on cubic lattice from (0,0,0) to (1,0,0) with moves in any direction on {-1,0,1}^3 and zero moves allowed.

Original entry on oeis.org

0, 1, 18, 294, 5776, 117045, 2505006, 55138293, 1245056184, 28643604147, 669304345150, 15838583011812, 378828554265096, 9143273873757283, 222407411228180010, 5446827816890184990, 134191612737844924608, 3323506599627088488579, 82700482246125321972582
Offset: 0

Views

Author

Jon Perry, Nov 24 2012

Keywords

Crossrefs

Programs

  • JavaScript
    b=[[1,1,1],[1,1,0],[1,1,-1],[1,0,1],[1,0,0],[1,0,-1],[1,-1,1],[1,-1,0],[1,-1,-1],
    [0,1,1],[0,1,0],[0,1,-1],[0,0,1],[0,0,0],[0,0,-1],[0,-1,1],[0,-1,0],[0,-1,-1],
    [-1,1,1],[-1,1,0],[-1,1,-1],[-1,0,1],[-1,0,0],[-1,0,-1],[-1,-1,1],[-1,-1,0],[-1,-1,-1]];
    function inc(arr,m) {
    al=arr.length-1;
    full=true;
    for (ac=0;ac<=al;ac++) if (arr[ac]!=m) {full=false;break;}
    if (full==true) return false;
    while (arr[al]==m && al>0) {arr[al]=0;al--;}
    arr[al]++;
    return true;
    }
    for (k=0;k<6;k++) {
    c=0;
    a=new Array();
    for (i=0;i
    				
  • Maple
    a:= proc(n) a(n):= `if`(n<6, [0, 1, 18, 294, 5776, 117045][n+1],
         (n*(n-1)*(453658*n^4-2664929*n^3+6608535*n^2-8353208*n+3876664)
          *a(n-1) +3*(n-1)*(286527*n^5+2962040*n^4-19850405*n^3+25517846
          *n^2+20905560*n-41336424) *a(n-2) -18*(n-2)*(2*n-5)*(1294945*n^4
          -12949450*n^3+54428897*n^2-110276360*n+88672932) *a(n-3) -81*(n-3)
          *(286527*n^5-10125215*n^4+111022145*n^3-530226521*n^2+1163720520*n
          -966508776) *a(n-4) +729*(453658*n^4-6408231*n^3+34683300*n^2
          -84691467*n+77744124)*(n-4)^2 *a(n-5) +19683*(-42552+15593*n)
          *(n-4)^2 *(n-5)^3 *a(n-6))/ (n^2*(n+1)*(n-1)^2*(15593*n-35413)))
        end:
    seq (a(n), n=0..30);  # Alois P. Heinz, Nov 28 2012
    A005717 := n -> simplify(GegenbauerC(n-1,-n,-1/2));
    A002426 := n -> simplify(GegenbauerC(n,-n,-1/2));
    seq( A002426(n)^2 * A005717(n), n=0..30 );  # Mark van Hoeij, Nov 13 2022

Formula

a(n) ~ 3^(3*n+3/2) / (4*Pi*n)^(3/2). - Vaclav Kotesovec, Sep 07 2014
Recurrence (of order 4): (n-1)^2*n^2*(n+1)*(2*n-5)*(7*n^4 - 56*n^3 + 166*n^2 - 216*n + 105)*a(n) = (n-1)*n*(2*n-5)*(2*n-1)*(70*n^6 - 630*n^5 + 2206*n^4 - 3759*n^3 + 3181*n^2 - 1188*n + 144)*a(n-1) + 3*(n-1)*(2*n-3)*(490*n^8 - 5880*n^7 + 30030*n^6 - 85050*n^5 + 145359*n^4 - 152064*n^3 + 93599*n^2 - 30264*n + 3852)*a(n-2) - 27*(n-2)^2*(2*n-5)*(2*n-1)*(70*n^6 - 630*n^5 + 2206*n^4 - 3813*n^3 + 3424*n^2 - 1563*n + 342)*a(n-3) - 729*(n-3)^3*(n-2)^2*(2*n-1)*(7*n^4 - 28*n^3 + 40*n^2 - 24*n + 6)*a(n-4). - Vaclav Kotesovec, Sep 07 2014
a(n) = A002426(n)^2 * A005717(n). - Mark van Hoeij, Nov 13 2022

Extensions

More terms from Alois P. Heinz, Nov 28 2012

A371408 Number of Dyck paths of semilength n having exactly three (possibly overlapping) occurrences of the consecutive step pattern UDU, where U = (1,1) and D = (1,-1).

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 20, 80, 315, 1176, 4284, 15240, 53295, 183700, 625768, 2110472, 7057505, 23427600, 77271120, 253426752, 827009523, 2686728060, 8693388060, 28026897360, 90058925649, 288516259416, 921755412900, 2937377079000, 9338728806225, 29626186593276
Offset: 0

Views

Author

Alois P. Heinz, Mar 22 2024

Keywords

Examples

			a(4) = 1: UDUDUDUD.
a(5) = 4: UDUDUDUUDD, UDUDUUDUDD, UDUUDUDUDD, UUDUDUDUDD.
		

Crossrefs

Column k=3 of A091869.

Programs

  • Maple
    a:= n-> `if`(n<4, 0, binomial(n-1, 3)*add(binomial(n-3, j)*
             binomial(n-3-j, j-1), j=0..ceil((n-3)/2))/(n-3)):
    seq(a(n), n=0..29);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<5, [0$4, 1][n+1],
         (n-1)*((2*n-7)*a(n-1)+3*(n-2)*a(n-2))/((n-2)*(n-4)))
        end:
    seq(a(n), n=0..29);

Formula

a(n) mod 2 = A121262(n) for n >= 1.

A375253 Expansion of (1 - 2*x + 2*x^2)/(1 - 2*x - 3*x^2)^(7/2).

Original entry on oeis.org

1, 5, 30, 140, 630, 2646, 10710, 41910, 159885, 597025, 2190188, 7914270, 28230020, 99567300, 347720040, 1203777072, 4135047615, 14105322315, 47813634330, 161154659820, 540353553894, 1803226621350, 5991410183850, 19827295283250, 65371101643575
Offset: 0

Views

Author

Seiichi Manyama, Aug 07 2024

Keywords

Crossrefs

Column k=4 of A091869 (with a different offset).

Programs

  • Mathematica
    a[n_]:=(1+n)(2+n)(3+n)(4+n)Hypergeometric2F1[(1-n)/2,-n/2,2,4]/24; Array[a,25,0] (* Stefano Spezia, Aug 07 2024 *)
  • PARI
    my(N=30, x='x+O('x^N)); Vec((1-2*x+2*x^2)/(1-2*x-3*x^2)^(7/2))

Formula

a(n) = (binomial(n+4,3)/4) * Sum_{k=0..floor(n/2)} binomial(n+1,n-2*k) * binomial(2*k+1,k).
a(n) = (binomial(n+4,3)/4) * A005717(n+1).
a(n) = ((n+4)/(n*(n+2))) * ((2*n+1)*a(n-1) + 3*(n+3)*a(n-2)).
a(n) = (1 + n)*(2 + n)*(3 + n)*(4 + n)*hypergeom([(1-n)/2, -n/2], [2], 4)/24. - Stefano Spezia, Aug 07 2024

A375259 Expansion of (1 - 3*x + 6*x^2 - 4*x^3)/(1 - 2*x - 3*x^2)^(9/2).

Original entry on oeis.org

1, 6, 42, 224, 1134, 5292, 23562, 100584, 415701, 1671670, 6570564, 25325664, 95982068, 358442280, 1321336152, 4815108288, 17367199983, 62063418186, 219942717918, 773542367136, 2701767769470, 9376778431020, 32353614992790, 111032853586200, 379152389532735
Offset: 0

Views

Author

Seiichi Manyama, Aug 08 2024

Keywords

Crossrefs

Column k=5 of A091869 (with a different offset).

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec((1-3*x+6*x^2-4*x^3)/(1-2*x-3*x^2)^(9/2))

Formula

a(n) = (binomial(n+5,4)/5) * Sum_{k=0..floor(n/2)} binomial(n+1,n-2*k) * binomial(2*k+1,k).
a(n) = (binomial(n+5,4)/5) * A005717(n+1).
a(n) = ((n+5)/(n*(n+2))) * ((2*n+1)*a(n-1) + 3*(n+4)*a(n-2)).

A098470 Form array in which n-th row is obtained by expanding (1+x+x^2)^n and taking the 5th column from the center.

Original entry on oeis.org

1, 6, 28, 112, 414, 1452, 4917, 16236, 52624, 168168, 531531, 1665456, 5182008, 16031952, 49366674, 151419816, 462919401, 1411306358, 4292487562, 13029127584, 39478598170, 119439969220, 360881425710, 1089126806040
Offset: 5

Views

Author

Eric W. Weisstein, Sep 09 2004

Keywords

Crossrefs

Programs

  • Maple
    # Assuming offset 0:
    a := n -> simplify(GegenbauerC(n, -n-5, -1/2)):
    seq(a(n), n=0..25); # Peter Luschny, May 09 2016
  • Mathematica
    Table[GegenbauerC[n, -n - 5, -1/2], {n,0,50}] (* G. C. Greubel, Feb 28 2017 *)
  • PARI
    x='x + O('x^50); Vec(32*x^5/(sqrt((1+x)*(1-3*x))*(1-x-sqrt((1+x)*(1-3*x)))^5)) \\ G. C. Greubel, Feb 28 2017

Formula

(n^2-25)*a(n) = n*(2*n-1)*a(n-1) + 3*n*(n-1)*a(n-2). - Vladeta Jovovic, Sep 18 2004
G.f.: 32*x^5/(sqrt((1+x)*(1-3*x))*(1-x-sqrt((1+x)*(1-3*x)))^5). - Vladeta Jovovic, Sep 18 2004
a(n) = A111808(n,n-5). - Reinhard Zumkeller, Aug 17 2005
Assuming offset 0: a(n) = GegenbauerC(n,-n-5,-1/2) and a(n) = binomial(10+2*n,n)* hypergeom([-n, -n-10], [-9/2-n], 1/4). - Peter Luschny, May 09 2016
a(n) ~ 3^(n + 1/2) / (2*sqrt(Pi*n)). - Vaclav Kotesovec, Nov 09 2021

A104632 1/n times A104631(n), the coefficient of x^(2n+1) in the expansion of (1+x+x^2+x^3+x^4)^n.

Original entry on oeis.org

1, 2, 6, 20, 73, 281, 1125, 4635, 19525, 83710, 364070, 1602327, 7123041, 31937010, 144255802, 655804649, 2998354717, 13777825186, 63596593430, 294743653360, 1371017707245, 6398580086645, 29952930770185, 140604572777250, 661708404611603, 3121439743413256, 14756658303857332
Offset: 1

Views

Author

T. D. Noe, Mar 17 2005

Keywords

Comments

This sequence may be viewed as a higher-order form of the Motzkin numbers, A001006, which are 1/n times the coefficient of x^(n+1) in the expansion of (1+x+x^2)^n. According to Superseeker, this sequence is the INVERT transform of A104184, which is related to Motzkin numbers also. See A104631 for additional comments.
Alternatively, this sequence corresponds to the number of positive walks with n steps {-2,-1,0,1,2} starting at the origin, ending at altitude 1, and staying strictly above the x-axis. - David Nguyen, Dec 01 2016

Crossrefs

Cf. A005717 (coefficient of x^(n+1) in the expansion of (1+x+x^2)^n).

Programs

  • Mathematica
    f=1; Table[f=Expand[f(x^4+x^3+x^2+x+1)]; Coefficient[f, x, 2n+1]/n, {n, 30}]
    a[ n_] := If[ n < 1, 0, Coefficient[ (1 + x + x^2 + x^3 + x^4)^n, x, 2 n + 1] / n]; (* Michael Somos, Dec 01 2016 *)
  • Maxima
    a(n):=sum((-1)^i*binomial(n,i)*binomial(3*n-5*i,n-1),i,0,(2*n+1)/5)/n; /* Vladimir Kruchinin, Apr 06 2017 */
  • PARI
    a(n) = polcoeff((1+x+x^2+x^3+x^4)^n, 2*n+1)/n \\ Michel Marcus, Sep 24 2016
    

Formula

a(n) = Sum_{i=0..(2*n+1)/5}((-1)^i*binomial(n,i)*binomial(3*n-5*i,n-1))/n. - Vladimir Kruchinin, Apr 06 2017
Conjecture: 2*n*(2*n+1)*(n-1)*a(n) -(n-1)*(19*n^2-19*n+2)*a(n-1) -5*(n-2)*(2*n^2-3*n-1)*a(n-2) +25*n*(n-2)*(n-3)*a(n-3)=0. - R. J. Mathar, Jul 23 2017

A114583 Triangle read by rows: T(n,k) is the number of Motzkin paths of length n and having k UHD's, where U=(1,1),H=(1,0),D=(1,-1) (0<=k<=floor(n/3)).

Original entry on oeis.org

1, 1, 2, 3, 1, 7, 2, 15, 6, 36, 14, 1, 85, 39, 3, 209, 102, 12, 517, 280, 37, 1, 1303, 758, 123, 4, 3312, 2085, 381, 20, 8510, 5730, 1194, 76, 1, 22029, 15849, 3657, 295, 5, 57447, 43914, 11187, 1056, 30, 150709, 122090, 33903, 3734, 135, 1, 397569, 340104
Offset: 0

Views

Author

Emeric Deutsch, Dec 09 2005

Keywords

Comments

Row n contains 1+floor(n/3) terms. Row sums are the Motzkin numbers (A001006). Column 1 yields A114584. Sum(k*T(n,k),k=0..floor(n/3))=A005717(n-2).

Examples

			T(5,1)=6 because we have HH(UHD), UD(UHD), (UHD)HH, (UHD)UD, H(UHD)H and U(UHD)D, where U=(1,1),H=(1,0),D=(1,-1) (the UHD's are shown between parentheses).
Triangle begins:
   1;
   1;
   2;
   3,  1;
   7,  2;
  15,  6;
  36, 14, 1;
  ...
		

Crossrefs

Programs

  • Maple
    G:=(1-z-t*z^3+z^3-sqrt((1-3*z+z^3-t*z^3)*(1+z+z^3-t*z^3)))/2/z^2: Gser:=simplify(series(G,z=0,20)): P[0]:=1: for n from 1 to 17 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 17 do seq(coeff(t*P[n],t^j),j=1..1+floor(n/3)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; expand(`if`(y<0 or y>x, 0,
         `if`(x=0, 1, b(x-1, y, `if`(t=1, 2, 0))+b(x-1, y-1, 0)*
         `if`(t=2, z, 1)+b(x-1, y+1, 1))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Feb 01 2019
  • Mathematica
    CoefficientList[#, t]& /@ CoefficientList[(1 - z - t z^3 + z^3 - Sqrt[(1 - 3z + z^3 - t z^3)(1 + z + z^3 - t z^3)])/2/z^2 + O[z]^17, z] // Flatten (* Jean-François Alcover, Aug 07 2018 *)

Formula

G.f.=G=G(t, z) satisfies G=1+zG+z^2*G(tz-z+G).

A128015 Binomial coefficients C(2n+1,n) repeated.

Original entry on oeis.org

1, 1, 3, 3, 10, 10, 35, 35, 126, 126, 462, 462, 1716, 1716, 6435, 6435, 24310, 24310, 92378, 92378, 352716, 352716, 1352078, 1352078, 5200300, 5200300, 20058300, 20058300, 77558760, 77558760, 300540195, 300540195
Offset: 0

Views

Author

Paul Barry, Feb 11 2007

Keywords

Comments

Hankel transform is A128017. Binomial transform is A005717(n+1).

Crossrefs

Programs

  • Mathematica
    With[{c=Table[Binomial[2n+1,n],{n,0,20}]},Riffle[c,c]] (* Harvey P. Dale, May 02 2012 *)

Formula

G.f.: (1+x)*c(x^2)/sqrt(1-4x^2), c(x) the g.f. of A000108.
E.g.f.: exp(-x)*dif(exp(x)*Bessel_I(1,2x),x).
a(n) = C(n+1, n/2)*(1+(-1)^n)/2 + C(n, (n-1)/2)*(1-(-1)^n)/2; as moment sequence a(n) = (1/(2*Pi))*Integral_{x=-2..2} x^n*x*(1+x)/sqrt(4-x^2).
D-finite with recurrence: -(n+2)*(3*n-1)*a(n) - 4*a(n-1) + 4*n*(3*n+2)*a(n-2) = 0. - R. J. Mathar, Jun 17 2016
a(n) = A001700(floor(n/2)). - Georg Fischer, Nov 28 2022

A194586 Triangle read by rows, T(n,k) the coefficients of the polynomials Sum_{k=0..n} binomial(n,k)*A056040(k)*(k mod 2)*q^k.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 0, 3, 0, 6, 0, 4, 0, 24, 0, 0, 5, 0, 60, 0, 30, 0, 6, 0, 120, 0, 180, 0, 0, 7, 0, 210, 0, 630, 0, 140, 0, 8, 0, 336, 0, 1680, 0, 1120, 0, 0, 9, 0, 504, 0, 3780, 0, 5040, 0, 630, 0, 10, 0, 720, 0, 7560, 0, 16800, 0, 6300, 0, 0, 11, 0, 990, 0, 13860, 0, 46200, 0, 34650, 0, 2772, 0, 12
Offset: 0

Views

Author

Peter Luschny, Aug 29 2011

Keywords

Comments

Substituting q^k -> 1/(floor(k/2)+1) in the polynomials gives the complementary Motzkin numbers A005717. (See A089627 for the Motzkin numbers and A163649 for the extended Motzkin numbers.)

Examples

			               0
              0, 1
            0, 2, 0
           0, 3, 0, 6
         0, 4, 0, 24, 0
       0, 5, 0, 60, 0, 30
    0, 6, 0, 120, 0, 180, 0
  0, 7, 0, 210, 0, 630, 0, 140
                0
                q
               2 q
            3 q + 6 q^3
           4 q + 24 q^3
       5 q + 60 q^3  + 30 q^5
      6 q + 120 q^3  + 180 q^5
  7 q + 210 q^3  + 630 q^5  + 140 q^7
		

Crossrefs

Row sums are A109188. Cf. A056040, A005717, A163649, A089627.

Programs

  • Maple
    A194586 := proc(n,k) local j, swing; swing := n -> n!/iquo(n,2)!^2:
    add(binomial(n,j)*swing(j)*q^j*(j mod 2),j=0..n); coeff(%,q,k) end:
    seq(print(seq(A194586(n,k),k=0..n)),n=0..8);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2;
    row[n_] := Sum[Binomial[n, j] sf[j] q^j Mod[j, 2], {j, 0, n}] // CoefficientList[#, q]& // PadRight[#, n+1]&;
    Table[row[n], {n, 0, 12}] (* Jean-François Alcover, Jun 26 2019 *)

Formula

egf(x,y) = x*y*exp(x)*BesselI(0,2*x*y).
Previous Showing 21-30 of 41 results. Next