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-5 of 5 results.

A160637 Hankel transform of A114464(n+1).

Original entry on oeis.org

1, 1, -2, -8, -32, -128, 1024, 16384, 262144, 4194304, -134217728, -8589934592, -549755813888, -35184372088832, 4503599627370496, 1152921504606846976, 295147905179352825856, 75557863725914323419136, -38685626227668133590597632, -39614081257132168796771975168
Offset: 0

Views

Author

Paul Barry, May 21 2009

Keywords

Comments

Hankel transform of A114464(n) is A160636.
This is a generalized Somos-4 sequence. - Michael Somos, Mar 14 2020

Crossrefs

Programs

  • Magma
    [(-2)^Floor(Binomial(n+1,2)/2): n in [0..50]]; // G. C. Greubel, May 03 2018
  • Mathematica
    Table[(-2)^Floor[Binomial[n + 1, 2]/2], {n, 0, 50}] (* G. C. Greubel, May 03 2018 *)
    a[ n_] := (-2)^Quotient[n (n + 1), 4]; (* Michael Somos, Mar 14 2020 *)
  • PARI
    for(n=0, 50, print1((-2)^floor(binomial(n+1,2)/2), ", ")) \\ G. C. Greubel, May 03 2018
    

Formula

a(n) = (-2)^floor(C(n+1,2)/2) = (-2)^A011848(n+1).
0 = a(n)*a(n+4) - 2*a(n+1)*a(n+3) + 4*a(n+2)^2 = a(n)*a(n+5) - 4*a(n+1)*a(n+4) for all n in Z. - Michael Somos, Mar 14 2020

A160636 Hankel transform of A114464.

Original entry on oeis.org

1, 0, -1, -2, -8, 0, 128, 1024, 16384, 0, -4194304, -134217728, -8589934592, 0, 35184372088832, 4503599627370496, 1152921504606846976, 0, -75557863725914323419136, -38685626227668133590597632
Offset: 0

Views

Author

Paul Barry, May 21 2009

Keywords

Comments

Hankel transform of A114464(n+1) is A160637.

Crossrefs

Programs

  • Magma
    R:= RealField(); [Round(2^Floor(Binomial(n,2)/2)*((Sqrt(2)/2 -1/2)*Sin(3*Pi(R)*n/4+Pi(R)/4)+(Sqrt(2)/2+1/2)*Cos(Pi(R)*n/4+Pi(R)/4))): n in [0..50]]; // G. C. Greubel, May 03 2018
    
  • Mathematica
    Table[Round[2^Floor[Binomial[n, 2]/2]*((Sqrt[2]-1)*Sin[(3*n+1)*Pi/4]/2 + (Sqrt[2]+1)*Cos[(n+1)*Pi/4]/2)], {n, 0, 50}] (* G. C. Greubel, May 03 2018 *)
    a[ n_] := -Sign[Mod[n - 1, 4]]*(-1)^Quotient[n - 1, 4]*2^Quotient[n (n - 1), 4]; (* Michael Somos, Mar 14 2020 *)
  • PARI
    for(n=0,50, print1(round(2^floor(binomial(n,2)/2)*((sqrt(2)-1)*sin((3*n+1)*Pi/4)/2 +(sqrt(2)+1)*cos((n+1)*Pi/4)/2)), ", ")) \\ G. C. Greubel, May 03 2018
    
  • PARI
    A160636(n)=if(n%4!=1,(-1)^((n+2)\4)<<(binomial(n,2)\2),0) \\ M. F. Hasler, May 09 2018

Formula

a(n) = 2^floor(C(n,2)/2)*((sqrt(2)-1)*sin((3*n+1)*Pi/4)/2 +(sqrt(2)+1)*cos((n+1)*Pi/4)/2).
a(4k+1) = 0, a(n) = (-1)^floor((n+2)/4) * 2^A011848(n) if n !== 1 (mod 4), where A011848(n) = floor(C(n,2)/2). - M. F. Hasler, May 09 2018
a(n) = -a(2-n) * 2^A004524(n) for all n in Z. - Michael Somos, Mar 14 2020

Extensions

Comment with an incorrect formula deleted by M. F. Hasler, May 09 2018

A114465 Number of Dyck paths of semilength n having no ascents of length 2 that start at an odd level.

Original entry on oeis.org

1, 1, 2, 5, 13, 36, 105, 317, 982, 3105, 9981, 32520, 107157, 356481, 1195662, 4038909, 13728369, 46919812, 161143157, 555857157, 1924956954, 6689953057, 23325404153, 81567552320, 286009944649, 1005371062561, 3542175587306
Offset: 0

Views

Author

Emeric Deutsch, Nov 29 2005

Keywords

Comments

Column 0 of A114463.

Examples

			a(4)=13 because among the 14 Dyck paths of semilength 4 only UUD(UU)DDD has an ascent of length 2 that starts at an odd level (shown between parentheses).
		

Crossrefs

Programs

  • Maple
    g:=-1/2/z/(1+z^2-z)*(z^2-1+sqrt((z^2+1)*(z^2-4*z+1))): gser:=series(g,z=0,33): 1,seq(coeff(gser,z^n),n=1..30);
  • Mathematica
    CoefficientList[Series[(1-x^2-Sqrt[(1+x^2)*(1-4*x+x^2)])/(2*x*(1-x+x^2)), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    Vec((1 - x^2 - sqrt((1+x^2)*(1-4*x+x^2)))/(2*x*(1-x+x^2)) + O(x^50)) \\ G. C. Greubel, Jan 28 2017

Formula

G.f.: [1 - z^2 - sqrt((1+z^2)*(1-4z+z^2))]/[2*z*(1-z+z^2)].
(n+1)*a(n) = (5*n-1)*a(n-1) - (7*n-5)*a(n-2) + 10*(n-2)*a(n-3) - (7*n-23)*a(n-4) + (5*n-19)*a(n-5) - (n-5)*a(n-6). - Vaclav Kotesovec, Mar 20 2014
a(n) ~ sqrt(24+14*sqrt(3)) * (2+sqrt(3))^n / (6 * sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Mar 20 2014

A114462 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k ascents of length 2 starting at an even level (0<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 6, 7, 1, 18, 19, 5, 54, 59, 18, 1, 166, 191, 65, 7, 522, 631, 242, 34, 1, 1670, 2123, 906, 154, 9, 5418, 7247, 3395, 680, 55, 1, 17786, 25011, 12746, 2932, 300, 11, 58974, 87071, 47931, 12414, 1540, 81, 1, 197226, 305275, 180439, 51878, 7552
Offset: 0

Views

Author

Emeric Deutsch, Nov 29 2005

Keywords

Comments

Row n has 1+floor(n/2) terms. Row sums are the Catalan numbers (A000108). Sum(kT(n,k), k=0..floor(n/2)) = binomial(2n-3,n-1)-binomial(2n-4,n) = A077587(n-2) (n>=2). Column 0 yields A114464.

Examples

			T(4,1) = 7 because we have (UU)DDUDUD, UD(UU)DDUD, UDUD(UU)DD, (UU)DUDDUD,
UD(UU)DUDD, (UU)DUDUDD and (UU)DUUDDD, where U=(1,1), D=(1,-1) (the ascents of length 2 starting at an even level are shown between parentheses; note that the last path has an ascent of length 2 that starts at an odd level).
Triangle starts:
1;
1;
1,   1;
2,   3;
6,   7,  1;
18, 19,  5;
54, 59, 18, 1;
		

Crossrefs

Programs

  • Maple
    G:= 1/2/z*(3*z^2+2*z^3*t+1-z^3*t^2-3*z^2*t-z^3+t*z-z -sqrt(1+20*z^3*t-18*z^5*t^2+15*z^4*t^2+18*z^5*t+6*z^5*t^3-2*z^4*t^3-12*z^2*t -12*z^3 -6*z-24*z^4*t-8*z^3*t^2+z^6-6*z^5+11*z^4 +z^2*t^2+6*z^6*t^2 -4*z^6*t^3 -4*z^6*t+z^6*t^4+2*t*z +11*z^2)): Gser:=simplify(series(G,z=0,17)): P[0]:=1: for n from 1 to 14 do P[n]:=coeff(Gser,z^n) od: for n from 0 to 14 do seq(coeff(t*P[n],t^j),j=1..1+floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0, `if`(x=0,
          `if`(t=2, z, 1), expand(b(x-1, y-1, min(3, t+1))+
          `if`(t=2 and irem(y, 2)=0, z, 1)*b(x-1, y+1, 0))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0$2)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Mar 12 2014
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x==0, If[t==2, z, 1], Expand[ b[x-1, y-1, Min[3, t+1]] + If[t==2 && Mod[y, 2]==0, z, 1]*b[x-1, y+1, 0]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 0]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Mar 31 2015, after Alois P. Heinz *)

Formula

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

A114463 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k ascents of length 2 starting at an odd level (0<=k<=floor(n/2)-1 for n>=2; k=0 for n=0,1).

Original entry on oeis.org

1, 1, 2, 5, 13, 1, 36, 6, 105, 26, 1, 317, 104, 8, 982, 402, 45, 1, 3105, 1522, 225, 10, 9981, 5693, 1052, 69, 1, 32520, 21144, 4698, 412, 12, 107157, 78188, 20319, 2249, 98, 1, 356481, 288340, 85864, 11522, 679, 14, 1195662, 1061520, 356535, 56360, 4230
Offset: 0

Views

Author

Emeric Deutsch, Nov 29 2005

Keywords

Comments

Row n (n>=2) has floor(n/2) terms. Row sums are the Catalan numbers (A000108). Sum(kT(n,k),k=0..floor(n/2)-1)=binomial(2n-4,n) (A002694). Column 0 yields A114465.

Examples

			T(5,1) = 6 because we have UUD(UU)DUDDD, UUD(UU)DDUDD, UUD(UU)DDDUD,
UDUUD(UU)DDD, UUDUD(UU)DDD and UUUDD(UU)DDD, where U=(1,1), D=(1,-1) (the ascents of length 2 starting at an odd level are shown between parentheses; note that the fourth path has an ascent of length 2 that starts at an even level).
Triangle starts:
:  0 :    1;
:  1 :    1;
:  2 :    2;
:  3 :    5;
:  4 :   13,    1;
:  5 :   36,    6;
:  6 :  105,   26,    1;
:  7 :  317,  104,    8;
:  8 :  982,  402,   45,  1;
:  9 : 3105, 1522,  225, 10;
: 10 : 9981, 5693, 1052, 69, 1;
		

Crossrefs

Programs

  • Maple
    G:=-1/2*(1-z^2+z^2*t-sqrt((z^2*t-z^2+4*z-1)*(z^2*t-z^2-1)))/z/(-z^2+z^2*t+z-z*t-1): Gser:=simplify(series(G,z=0,18)): P[0]:=1: for n from 1 to 15 do P[n]:=coeff(Gser,z^n) od: 1; 1; for n from 2 to 15 do seq(coeff(t*P[n],t^j),j=1..floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
         `if`(x=0, 1, expand(b(x-1, y+1, [2, 2, 2, 5, 2][t])
          *`if`(t=5, z, 1) +b(x-1, y-1, [1, 3, 4, 1, 3][t]))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Jun 10 2014
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x==0, 1, Expand[b[x-1, y+1, {2, 2, 2, 5, 2}[[t]]]*If[t==5, z, 1] + b[x-1, y-1, {1, 3, 4, 1, 3}[[t]]]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 1]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Mar 31 2015, after Alois P. Heinz *)

Formula

G.f.: G=G(t, z) satisfies z[(1-t)z^2-(1-t)z+1]G^2-[1-(1-t)z^2]G+1=0.
Showing 1-5 of 5 results.