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.

A099029 Main diagonal of array A099028.

Original entry on oeis.org

-1, 6, -72, 1608, -58080, 3087648, -226762368, 21986726016, -2720113657344, 418117827310080, -78167762731812864, 17465102642354817024, -4595978556276162551808, 1406897783859319396442112
Offset: 1

Views

Author

Ralf Stephan, Sep 27 2004

Keywords

A009843 E.g.f. x/cos(x) (odd powers only).

Original entry on oeis.org

1, 3, 25, 427, 12465, 555731, 35135945, 2990414715, 329655706465, 45692713833379, 7777794952988025, 1595024111042171723, 387863354088927172625, 110350957750914345093747, 36315529600705266098580265, 13687860690719716241164167451, 5858139922124796551409938058945
Offset: 0

Views

Author

Keywords

Comments

Expanding x/cosh(x) gives alternated signed values at odd positions.
Related to the formulas sum(k>0,sin(kx)/k^(2n+1))=(-1)^(n+1)/2*x^(2n+1)/(2n+1)!*sum(i=0,2n,(2Pi/x)^i*B(i)*C(2n+1,i)) and if x=Pi/2 sum(k>0,(-1)^(k+1)/k^(2n+1))=(-1)^n*E(2n)*Pi^(2n+1)/2^(2n+2)/(2n)!. - Benoit Cloitre, May 01 2002

Examples

			x/cos(x) = x + 1/2*x^3 + 5/24*x^5 + 61/720*x^7 + 277/8064*x^9 + ...
		

Crossrefs

Programs

  • Maple
    seq((2*i+1)!*coeff(series(x/cos(x),x,32),x,2*i+1),i=0..13);
    A009843 := n -> (-1)^n*(2*n+1)*euler(2*n): # Peter Luschny
  • Mathematica
    c = CoefficientList[Series[1/MittagLefflerE[2,z^2],{z,0,40}],z]; Table[(-1)^n* Factorial[2*n+1]*c[[2*n+1]], {n,0,16}] (* Peter Luschny, Jul 03 2016 *)
  • PARI
    a(n)=(-1)^(n+1)*sum(i=0,2*n+1,binomial(2*n+1,i)*bernfrac(i)*4^i)
    
  • PARI
    a(n)=subst(bernpol(2*n+1),'x,1/4)*4^(2*n+1)*(-1)^(n+1) \\ Charles R Greathouse IV, Dec 10 2014
    
  • Python
    # The objective of this implementation is efficiency.
    # n -> [a(0), a(1), ..., a(n)] for n > 0.
    def A009843_list(n):
        S = [0 for i in range(n+1)]
        S[0] = 1
        for k in range(1, n+1):
            S[k] = k*S[k-1]
        for k in range(1, n+1):
            for j in range(k, n+1):
                S[j] = (j-k)*S[j-1]+(j-k+1)*S[j]
            S[k] = (2*k+1)*S[k]
        return S
    print(A009843_list(10)) # Peter Luschny, Aug 09 2011

Formula

a(n) = (2n+1)*A000364(n) = sum(i=0, 2n, B(i)*C(2n+1, i)*4^i)=(2n+1)*E(2n) where B(i) are the Bernoulli numbers, C(2n, i) the binomial numbers and E(2n) the Euler numbers. - Benoit Cloitre, May 01 2002
Recurrence: a(n) = -(-1)^n*Sum[i=0..n-1, (-1)^i*a(i)*C(2n+1, 2i+1) ]. - Ralf Stephan, Feb 24 2005
a(n) = 4^n |E_{2n}(1/2)+E_{2n}(1)| (2n+1) for n > 0; E_{n}(x) Euler polynomial. - Peter Luschny, Nov 25 2010
a(n) = (2*n+1)! * [x^(2*n+1)] x/cos(x).
From Sergei N. Gladkovskii, Nov 15 2011, Oct 19 2012, Nov 10 2012, Jan 14 2013, Apr 10 2013, Oct 13 2013, Dec 01 2013: (Start) Continued fractions:
E.g.f.: x / cos(x) = x+x^3/Q(0); Q(k) = 8k+2-x^2/(1+(2k+1)*(2k+2)/Q(k+1)).
E.g.f.: x + x^3/U(0) where U(k) = (2*k+1)*(2*k+2) - x^2 + x^2*(2*k+1)*(2*k+2)/U(k+1).
G.f.: 1/G(0) where G(k) = 1 - x*(8*k^2+8*k+3)-16*x^2*(k+1)^4/G(k+1).
E.g.f.: 2*x/(Q(0) + 1) where Q(k)= 1 - x/(2*k+1)/(2*k+2)/(1 - 1/(1 + 1/Q(k+1))).
Let A(x) = S_{n>=0}a(n)*x^n/(2*n+1)! then A(x) = 1 + Q(0)*x/(2-x) where Q(k) = 1 - x*(2*k+1)*(2*k+2)/(x*(2*k+1)*(2*k+2) + ((2*k+1)*(2*k+2) - x)*((2*k+3)*(2*k+4) - x)/Q(k+1)).
G.f.: T(0)/(1-3*x) where T(k) = 1 - 16*x^2*(k+1)^4/(16*x^2*(k+1)^4 - (1 - x*(8*k^2 +8*k+3)) *(1 - x*(8*k^2+24*k+19))/T(k+1)).
G.f.: 1/T(0) where T(k) = 1 + x - x*(2*k+2)^2/(1 - x*(2*k+2)^2/T(k+1)). (End)
a(n) = (-1)^n*2^(4*n+1)*(2*n+1)*(zeta(-2*n,1/4)-zeta(-2*n,3/4)). - Peter Luschny, Jul 22 2013
From Peter Bala, Mar 02 2015: (Start)
a(n) = (-1)^(n+1)*4^(2*n + 1)*B(2*n + 1,1/4), where B(n,x) denotes the n-th Bernoulli polynomial. Cf. A002111, A069852 and A069994.
Conjecturally, a(n) = the unsigned numerator of B(2*n+1,1/4).
G.f. for signed version of sequence: Sum_{n >= 0} { 1/(n + 1) * Sum_{k = 0..n} (-1)^k*binomial(n,k)/( (1 - (4*k + 1)*x)*(1 - (4*k + 3)*x) ) } = 1 - 3*x^2 + 25*x^4 - 427*x^6 + .... (End)
a(n) ~ (2*n+1)! * 2^(2*n+2)/Pi^(2*n+1). - Vaclav Kotesovec, Jul 04 2016
G.f.: 1/(1 + x - 4*x/(1 - 4*x/(1 + x - 16*x/(1 - 16*x/(1 + x - 36*x/(1 - 36*x/(1 + x - ...))))))). Cf. A005439. - Peter Bala, May 07 2017

Extensions

Extended and signs tested by Olivier Gérard, Mar 15 1997

A065619 Expansion of e.g.f. x * (tan(x) + sec(x)).

Original entry on oeis.org

1, 2, 3, 8, 25, 96, 427, 2176, 12465, 79360, 555731, 4245504, 35135945, 313155584, 2990414715, 30460116992, 329655706465, 3777576173568, 45692713833379, 581777702256640, 7777794952988025, 108932957168730112, 1595024111042171723, 24370173276164456448
Offset: 1

Views

Author

Michael Somos, Dec 03 2001

Keywords

Comments

a(n) is the number of down-up permutations w on [n+1] such that w_2 = 1. For example, a(3)=3 counts 2143, 3142, 4132. - David Callan, Oct 25 2004
A signed variant of this sequence, prefaced with an 0, is column 1 of the inverse of triangle A178616. - Gary W. Adamson, May 30 2010
a(n) is the number of ranked unlabeled binary tree shapes compatible with the binary perfect phylogeny (n,2). - Noah A Rosenberg, Jun 03 2022

Crossrefs

Programs

  • Maple
    A065619 := n -> `if`(n=1,1,2^(n-1)*abs(euler(n-1,1/2)+euler(n-1,1))*n): # Peter Luschny, Nov 25 2010
    # Alternatively (after Alois P. Heinz):
    b := proc(u, o) option remember;
    `if`(u + o = 0, 1, add(b(o - 1 + j, u - j), j = 1..u)) end:
    a := n -> n*b(n-1, 0): seq(a(n), n = 1..24); # Peter Luschny, Oct 27 2017
  • Mathematica
    a[1] = 1; a[n_] := 2^(n-1)*Abs[EulerE[n - 1, 1/2] + EulerE[n - 1, 1]]*n; Array[a, 24] (* Jean-François Alcover, Nov 05 2017, after Peter Luschny *)
    Table[Re[2 n I^n PolyLog[1 - n, -I]], {n, 1, 19}] (* Peter Luschny, Aug 17 2021 *)
  • PARI
    {a(n) = if( n<0, 0 ,n! * polcoeff( x * (tan(x + x * O(x^n)) + 1 / cos(x + x * O(x^n))), n))}
    
  • PARI
    x='x+O('x^66);
    egf=x*(tan(x)+1/cos(x));
    Vec(serlaplace(egf))
    /* Joerg Arndt, May 28 2012 */
    
  • Python
    from itertools import accumulate
    def A065619(n):
        if n <= 2: return n
        blist = (0,1)
        for _ in range(n-2):
            blist = tuple(accumulate(reversed(blist),initial=0))
        return blist[-1]*n # Chai Wah Wu, Apr 25 2023
  • Sage
    # Algorithm of L. Seidel (1877)
    def A065619_list(n) : # starts with a(0) = 0.
        R = []; A = {-1:1, 0:0}; k = 0; e = 1
        for i in (0..n) :
            Am = 0; A[k + e] = 0; e = -e
            for j in (0..i) : Am += A[k]; A[k] = Am; k += e
            R.append(A[-i//2] if i%2 == 0 else A[i//2])
        return R
    A065619_list(22) # Peter Luschny, May 27 2012
    

Formula

E.g.f.: x*(tan(x)+sec(x)).
a(n) = n*A000111(n-1). - R. J. Mathar, Nov 27 2006
a(n) = n*2^(n-1)*|E_{n-1}(1/2)+E_{n-1}(1)| for n > 1; E_{n}(x) Euler polynomial. - Peter Luschny, Nov 25 2010
E.g.f.: x*(tan(x)+sec(x))=x+x^2/U(0);U(k)=4k+1-x/(2-x/(4k+3+x/(2+x/U(k+1))));(continued fraction). - Sergei N. Gladkovskii, Nov 14 2011
E.g.f.: x*( tan(x) + sec(x) )= x + 2*x^2/(U(0)-x) where U(k)= 4*k+2 - x^2/U(k+1);(continued fraction, 1-step). - Sergei N. Gladkovskii, Nov 07 2012
a(n) = (n + 1)!*Re([x^n](1 + i^((n - 1)*n)*(2 - 2*i)/(exp(x) + i))), assuming offset = 0. - Peter Luschny, Aug 09 2021
a(n) = 2*n*i^n*PolyLog(1 - n, -i) for n >= 2. - Peter Luschny, Aug 17 2021

A009752 Expansion of e.g.f. tan(x)*x (even powers only).

Original entry on oeis.org

0, 2, 8, 96, 2176, 79360, 4245504, 313155584, 30460116992, 3777576173568, 581777702256640, 108932957168730112, 24370173276164456448, 6419958484945407574016, 1967044844910430876860416, 693575525634287935244206080, 278846808228005417477465964544, 126799861926498005417315327279104
Offset: 0

Views

Author

Keywords

Examples

			2*x/(1+e^(2*x)) = 0 + x - 2/2!*x^2 + 8/4!*x^4 - 96/6!*x^6 + 2176/8!*x^8 ...
		

Crossrefs

Programs

  • Maple
    a := n -> 4^n*n*`if`(n=0,0,abs(euler(2*n-1, 0))): # Peter Luschny, Jun 09 2016
  • Mathematica
    nn = 30; t = Range[0, nn]! CoefficientList[Series[x*Tan[x], {x, 0, nn}], x]; Take[t, {1, nn + 1, 2}] (* T. D. Noe, Sep 20 2012 *)
    Table[(-1)^n 4 n PolyLog[1 - 2 n, -I], {n, 0, 19}] (* Peter Luschny, Aug 17 2021 *)
  • PARI
    my(x='x+O('x^50)); v=Vec(serlaplace(x*tan(x))); concat([0], vector(#v\2,n,v[2*n-1])) \\ G. C. Greubel, Feb 12 2018

Formula

a(n) = n 4^n |E_{2n-1}(1/2)+E_{2n-1}(1)| for n > 0; E_{n}(x) Euler polynomials. - Peter Luschny, Nov 25 2010
a(n) = (2*n)! * [x^(2*n)] tan(x)*x.
a(n) = 2*(2*n)!*Pi^(-2*n)*(4^n-1)*Li{2*n}(1) for n > 0. - Peter Luschny, Jun 29 2012
E.g.f.: sqrt(x)*tan(sqrt(x))= sum(n>=0, a(n)*x^n/(2*n)! ) = x/T(0) where T(k)= 1 - 4*k^2 + x*(1 - 4*k^2)/T(k+1) ; (continued fraction, 1-step). - Sergei N. Gladkovskii, Sep 19 2012
E.g.f.: -1 - x^(1/2)- Q(0),where Q(k) = 4*k -1 - x/( 1 - x/ (4*k+1 + x/( 1 + x/Q(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Nov 24 2013
From Peter Luschny, Jun 09 2016: (Start)
a(n) = (4^n-16^n)*Sum_{k=0..2*n} (-1)^(n-k)*Stirling2(2*n, k)*k!/(k+1).
2*a(n)/4^n = A110501(n) for n>=1.
a(n) / 2^n = A117513(n) for n>=1. (End)
a(n) ~ (4*(4^(2*n)-2^(2*n)))*Pi*(n/(Pi*e))^(2*n+1/2)*exp(1/2+1/(24*n)-1/(2880*n^3) +1/(40320*n^5)-...). - Peter Luschny, Jan 16 2017
a(n) = (-1)^n*4*n*PolyLog(1 - 2*n, -i). - Peter Luschny, Aug 17 2021
a(n) = 2*A024255(n). - Alois P. Heinz, Aug 17 2021

Extensions

Extended and signs tested by Olivier Gérard, Mar 15 1997
Showing 1-4 of 4 results.