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

A007289 Expansion of e.g.f. (sin(2*x) + cos(x)) / cos(3*x).

Original entry on oeis.org

1, 2, 8, 46, 352, 3362, 38528, 515086, 7869952, 135274562, 2583554048, 54276473326, 1243925143552, 30884386347362, 825787662368768, 23657073914466766, 722906928498737152, 23471059057478981762, 806875574817679474688, 29279357851856595135406
Offset: 0

Views

Author

Keywords

Comments

Arises in the enumeration of alternating 3-signed permutations.

References

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

Crossrefs

Row 3 of A349271.
Cf. A006873, A007286, A225109, A000191 (bisection), A000436 (bisection).

Programs

  • Maple
    A007289 := proc(n) local k,j; add(add((-1)^j*binomial(k,j)*(k-2*j)^n*I^(n-k),j=0..k),k=0..n) end: # Peter Luschny, Jul 31 2011
  • Mathematica
    mx = 17; Range[0, mx]! CoefficientList[ Series[ (Sin[2 x] + Cos[x])/Cos[3 x], {x, 0, mx}], x] (* Robert G. Wilson v, Apr 28 2013 *)
  • PARI
    my(x='x+O('x^66)); Vec(serlaplace((sin(2*x) + cos(x)) / cos(3*x))) \\ Joerg Arndt, Apr 28 2013
    
  • Sage
    from mpmath import mp, polylog, im
    mp.dps = 32; mp.pretty = True
    def aperm3(n): return 2*((1-I)/(1+I))^n*(1+add(binomial(n,j)*polylog(-j,I)*3^j for j in (0..n)))
    def A007289(n) : return im(aperm3(n))
    [int(A007289(n)) for n in (0..17)] # Peter Luschny, Apr 28 2013

Formula

E.g.f.: (sin(2*x) + cos(x)) / cos(3*x).
a(n) = Sum_{k=0..n} Sum_{j=0..k} (-1)^j*binomial(k,j)*(k-2*j)^n*I^(n-k). - Peter Luschny, Jul 31 2011
a(n) = Im(2*((1-I)/(1+I))^n*(1+sum_{j=0..n}(binomial(n,j)*Li_{-j}(I)*3^j))). - Peter Luschny, Apr 28 2013
a(n) ~ n! * 2^(n+1)*3^(n+1/2)/Pi^(n+1). - Vaclav Kotesovec, Jun 15 2013
a(0) = 1; a(n) = 2 * Sum_{k=0..floor((n-1)/2)} (-1)^k * binomial(n,2*k+1) * a(n-2*k-1). - Ilya Gutkovskiy, Mar 10 2022
From Seiichi Manyama, Jun 25 2025: (Start)
E.g.f.: 1/(1 - 2 * sin(x)).
a(n) = Sum_{k=0..n} 2^k * k! * i^(n-k) * A136630(n,k), where i is the imaginary unit. (End)

A006873 Number of alternating 4-signed permutations.

Original entry on oeis.org

1, 1, 7, 47, 497, 6241, 95767, 1704527, 34741217, 796079041, 20273087527, 567864586607, 17352768515537, 574448847467041, 20479521468959287, 782259922208550287, 31872138933891307457, 1379749466246228538241, 63243057486503656319047, 3059895336952604166395567
Offset: 0

Views

Author

Keywords

References

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

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Sin(x)+Cos(3*x))/Cos(4*x)); [Factorial(n-1)*b[n]: n in [1..m-1]]; // G. C. Greubel, Nov 29 2018
    
  • Maple
    per4 := proc(n) local j; 2*((1-I)/(1+I))^n*(1+add(binomial(n,j)* polylog(-j,I)*4^j, j=0..n)) end: A006873 := n -> Re(per4(n));
    seq(A006873(i), i=0..11); # Peter Luschny, Apr 29 2013
  • Mathematica
    mx = 17; Range[0, mx]! CoefficientList[ Series[ (Sin[x] + Cos[3x])/Cos[4x], {x, 0, mx}], x] (* Robert G. Wilson v, Apr 28 2013 *)
  • PARI
    x='x+O('x^66); Vec(serlaplace((sin(x)+cos(3*x))/cos(4*x))) \\ Joerg Arndt, Apr 28 2013
    
  • Sage
    f=(sin(x) + cos(3*x))/cos(4*x)
    g=f.taylor(x,0,50)
    L=g.coefficients()
    coeffs={c[1]:c[0]*factorial(c[1]) for c in L}
    coeffs # G. C. Greubel, Nov 29 2018

Formula

E.g.f.: (sin(x) + cos(3*x)) / cos(4*x). - M. F. Hasler, Apr 28 2013
a(n) = Re(2*((1-I)/(1+I))^n*(1 + Sum_{j=0..n}(binomial(n,j)*Li_{-j}(I)* 4^j))). - Peter Luschny, Apr 29 2013
a(n) ~ sqrt(2-sqrt(2)) * 2^(3*n+3/2) * n^(n+1/2) / (Pi^(n+1/2) * exp(n)). - Vaclav Kotesovec, Feb 25 2014
a(n) ~ GAMMA(n)*8^n/(Pi^n*(2*sqrt(4+2*sqrt(2)))). - Simon Plouffe, Nov 29 2018

Extensions

Added more terms, Joerg Arndt, Apr 28 2013

A000810 Expansion of e.g.f. (sin x + cos x)/cos 3x.

Original entry on oeis.org

1, 1, 8, 26, 352, 1936, 38528, 297296, 7869952, 78098176, 2583554048, 31336418816, 1243925143552, 17831101321216, 825787662368768, 13658417358350336, 722906928498737152, 13551022195053101056
Offset: 0

Views

Author

Keywords

Crossrefs

(-1)^(n*(n-1)/2)*a(n) gives the alternating row sums of A225118. - Wolfdieter Lang, Jul 12 2017

Programs

  • Mathematica
    CoefficientList[Series[(Sin[x]+Cos[x])/Cos[3*x], {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Jun 25 2013 *)
    Table[Abs[EulerE[n, 1/3]] 6^n, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 21 2015 *)
  • PARI
    x='x+O('x^66); v=Vec(serlaplace( (sin(x)+cos(x)) / cos(3*x) ) ) \\ Joerg Arndt, Apr 27 2013
  • Sage
    from mpmath import mp, lerchphi
    mp.dps = 32; mp.pretty = True
    def A000810(n): return abs(3^n*2^(n+1)*lerchphi(-1,-n,1/3))
    [int(A000810(n)) for n in (0..17)]  # Peter Luschny, Apr 27 2013
    

Formula

a(2n) = A000436(n).
(-1)^n*a(2n+1)=1-sum_{i=0,1,...,n-1} (-1)^i*binomial(2n+1,2i+1)*3^(2n-2i)*a(2i+1). - R. J. Mathar, Nov 19 2006
a(n) = | 3^n*2^(n+1)*lerchphi(-1,-n,1/3) |. - Peter Luschny, Apr 27 2013
a(n) ~ n!*2^(n+1)*3^(n+1/2)/Pi^(n+1) if n is even and a(n) ~ n!*2^(n+1)*3^n/Pi^(n+1) if n is odd. - Vaclav Kotesovec, Jun 25 2013
a(n) = (-1)^floor(n/2)*3^n*skp(n, 1/3), where skp(n,x) are the Swiss-Knife polynomials A153641. - Peter Luschny, Apr 19 2014

A225109 E.g.f. (sin(3x) + cos x) / cos(4x).

Original entry on oeis.org

1, 3, 15, 117, 1185, 15123, 230895, 4116837, 83860545, 1921996323, 48942778575, 1370953667157, 41893214676705, 1386843017916723, 49441928730798255, 1888542637550347077, 76946148390480577665, 3331009898404800736323, 152682246738275154625935, 7387240827905368219116597
Offset: 0

Views

Author

M. F. Hasler, Apr 28 2013

Keywords

Crossrefs

Programs

  • Maple
    per4 := proc(n) local j; 2*((1-I)/(1+I))^n*(1+add(binomial(n,j)* polylog(-j,I)*4^j, j=0..n)) end: A225109 := n -> Im(per4(n));
    seq(A225109(i), i=0..11); # Peter Luschny, Apr 29 2013
  • Mathematica
    mx = 17; Range[0, mx]! CoefficientList[ Series[ (Sin[3x] + Cos[x])/Cos[4x], {x, 0, mx}], x] (* Robert G. Wilson v, Apr 28 2013 *)
  • PARI
    v=Vec((sin(3*x) + cos(x)) / cos(4*x)); vector(#v,i,v[i]*(i-1)!)
    
  • PARI
    x='x+O('x^66); Vec(serlaplace((sin(3*x)+cos(x))/cos(4*x))) \\ Joerg Arndt, Apr 28 2013

Formula

a(n) = Im(2*((1-I)/(1+I))^n*(1+sum_{j=0..n}(binomial(n,j)*Li_{-j}(I)* 4^j))). - Peter Luschny, Apr 29 2013
a(n) ~ n! * sqrt(2+sqrt(2)) * 2^(3*n+1)/Pi^(n+1). - Vaclav Kotesovec, Jun 02 2013
Showing 1-4 of 4 results.