|
|
A122045
|
|
Euler (or secant) numbers E(n).
|
|
76
|
|
|
1, 0, -1, 0, 5, 0, -61, 0, 1385, 0, -50521, 0, 2702765, 0, -199360981, 0, 19391512145, 0, -2404879675441, 0, 370371188237525, 0, -69348874393137901, 0, 15514534163557086905, 0, -4087072509293123892361, 0, 1252259641403629865468285, 0, -441543893249023104553682821
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
The convention in the OEIS is that the alternate zeros are normally omitted in such sequences. See A000364 for the official version of this sequence.
Odd primes p such that p | E(p-1) are primes p == 1 (mod 4), A002144. Conjecture: odd composites m such that m | E(m-1) are Carmichael numbers m such that p == 1 (mod 4) for every prime p|m, A265237. - Thomas Ordowski, Feb 06 2020
|
|
LINKS
|
|
|
FORMULA
|
Continued fractions:
G.f.: 1/U(0) where U(k) = 1 - x + x*(k+1)/(1 - x*(k+1)/U(k+1)).
G.f.: 1/U(0) where U(k) = 1 - x^2 + x^2*(2*k+1)*(2*k+2)/(1 + x^2*(2*k+1)*(2*k+2)/ U(k+1)).
E.g.f.: (1-x)/U(0) where U(k) = 1 - x/(1 - x/(x - (2*k+1)*(2*k+2)/U(k+1)).
E.g.f.: 1 - x^2/U(0) where U(k) = (2*k+1)*(2*k+2) + x^2 - x^2*(2*k+1)*(2*k+2)/U(k+1).
E.g.f.: 1/U(0) where U(k) = 1 + x^2/(2*(2*k+1)*(4*k+1) - 2*x^2*(2*k+1)*(4*k+1)/(x^2 + 4*(4*k+3)*(k+1)/U(k+1))).
E.g.f.: (2 + x^4/(U(0)*(x^2-2) - 2))/(2-x^2) where U(k) = 4*k + 4 + 1/(1 + x^2/(2 - x^2 + (2*k+3)*(2*k+4)/U(k+1))).
G.f.: 1/G(0) where G(k) = 1 + x^2*(2*k+1)^2/(1 + x^2*(2*k+2)^2/G(k+1)) (due to T. J. Stieltjes).
G.f.: 1/S(0) where S(k) = 1 + x^2*(k+1)^2/S(k+1) (due to T. J. Stieltjes).
G.f.: 1 - x/(1+x) + x/(1+x)/Q(0) where Q(k) = 1 - x + x*(k+2)/(1 - x*(k+1)/Q(k+1)).
G.f.: -(1/x)/Q(0) where Q(k) = -1/x + (k+1)^2/Q(k+1) (due to T. J. Stieltjes).
G.f.: (1/(1-x))/Q(0) + 1/(1-x) where Q(k) = 1 - 1/x + (k+1)*(k+2)/Q(k+1).
G.f.: (x/(x-1))/Q(0) + 1/(1-x) where Q(k) = 1 - x + x^2*(k+1)*(k+2)/Q(k+1).
G.f.: 1 - x/(1+x) + (x/(1+x))/Q(0) where Q(k) = 1 + x + (k+1)*(k+2)*x^2/Q(k+1).
E.g.f.: 1 - T(0)*x^2/(2+x^2) where T(k) = 1 - x^2*(2*k+1)*(2*k+2)/(x^2*(2*k+1)*(2*k+2) - ((2*k+1)*(2*k+2) + x^2)*((2*k+3)*(2*k+4) + x^2)/T(k+1)).
G.f.: T(0) where T(k) = 1 - x^2*(k+1)^2/(x^2*(k+1)^2 + 1/T(k+1)). (End)
a(n) = 2^(2*n+1)*(zeta(-n,1/4) - zeta(-n,3/4)), where zeta(a, z) is the generalized Riemann zeta function. - Peter Luschny, Mar 11 2015
a(n) = 2^n*(2^(n+1)/(n+1))*(B(n+1, 3/4) - B(n+1, 1/4)) where B(n,x) is the n-th Bernoulli polynomial. See Liu link. - Michel Marcus, May 20 2017 [This is the same as: a(n) = -4^(n+1)*B(n+1, 1/4)*((n+1) mod 2)/(n+1). Peter Luschny, Oct 30 2020]
a(4n) == 5 (mod 60) and a(4n+2) == -1 (mod 60). See Hirschhorn. - Michel Marcus, Jan 11 2022
For n > 1, a(n) = -Sum_{k=1..floor(n/2)} a(n-2*k)*binomial(n,2*k). - Tani Akinari, Sep 15 2023
|
|
EXAMPLE
|
G.f. = 1 - x^2 + 5*x^4 - 61*x^6 + 1385*x^8 - 50521*x^10 + 2702765*x^12 + ...
|
|
MAPLE
|
P := proc(n, x) option remember; if n = 0 then 1 else
(n*x+(1/2)*(1-x))*P(n-1, x)+x*(1-x)*diff(P(n-1, x), x); expand(%) fi end:
A122045 := n -> (-1)^n*subs(x=-1, P(n, x)):
ptan := proc(n) option remember; if irem(n, 2) = 1 then 0 else
-add(`if`(k=0, 1, binomial(n, k)*ptan(n - k)), k = 0..n-1, 2) fi end:
A122045 := n -> ifelse(n = 0, 1, ptan(n)):
|
|
MATHEMATICA
|
Table[EulerE[n], {n, 0, 30}]
Range[0, 30]! CoefficientList[ Series[ Sech[x], {x, 0, 30}], x] (* Robert G. Wilson v, Aug 08 2018 *)
|
|
PROG
|
(PARI) x='x+O('x^66); Vec(serlaplace(1/cosh(x))) \\ Joerg Arndt, Mar 10 2014
(PARI) a(n) = 2^n*2^(n+1)*(subst(bernpol(n+1, x), x, 3/4) - subst(bernpol(n+1, x), x, 1/4))/(n+1); \\ Michel Marcus, May 20 2017
(Python) from sympy import bernoulli as B
def a(n): return int(2**n*2**(n + 1)*(B(n + 1, 3/4) - B(n + 1, 1/4))/(n + 1))
(Python) from functools import cache
from math import comb as binomial
@cache
return (0 if n % 2 == 1 else
-sum(binomial(n, k) * ptan(n-k) if k > 0 else 1 for k in range(0, n-1, 2)))
def A122045(n): return 1 if n == 0 else ptan(n)
(Magma) m:=35; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( 1/Cosh(x) )); [Factorial(n-1)*b[n]: n in [1..m-1]]; // G. C. Greubel, Feb 13 2020
(Maxima) a[n]:=if n<2 then 1-n else sum(-a[n-2*k]*binomial(n, 2*k), k, 1, floor(n/2));
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|