login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122045 Euler (or secant) numbers E(n). 76

%I #185 Oct 28 2023 11:41:59

%S 1,0,-1,0,5,0,-61,0,1385,0,-50521,0,2702765,0,-199360981,0,

%T 19391512145,0,-2404879675441,0,370371188237525,0,-69348874393137901,

%U 0,15514534163557086905,0,-4087072509293123892361,0,1252259641403629865468285,0,-441543893249023104553682821

%N Euler (or secant) numbers E(n).

%C 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.

%C 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

%H Vincenzo Librandi, <a href="/A122045/b122045.txt">Table of n, a(n) for n = 0..200</a>

%H Fernando Barbero G., Juan Margalef-Bentabol, and Eduardo J. S. Villaseñor, <a href="https://arxiv.org/abs/2002.00550">A two-sided Faulhaber-like formula involving Bernoulli polynomials</a>, arXiv:2002.00550 [math.NT], 2020.

%H Marilena Barnabei, Flavio Bonetti, Niccolò Castronuovo, and Matteo Silimbani, <a href="https://doi.org/10.26493/1855-3974.1679.ad3">Ascending runs in permutations and valued Dyck paths</a>, Ars Mathematica Contemporanea (2019) Vol. 16, No. 2, 445-463.

%H Hacène Belbachir and Yassine Otmani, <a href="http://math.colgate.edu/~integers/x27/x27.pdf">Quadrinomial-Like Versions for Wolstenholme, Morley and Glaisher Congruences</a>, Integers (2023) Vol. 23.

%H Michael D. Hirschhorn, <a href="https://www.fq.math.ca/Papers1/53-4/Hirschhorn06212015.pdf">Binomial Identities and Congruences for Euler Numbers</a>, Fibonacci Quart. 53 (2015), no. 4, 319-322.

%H Guodong Liu, <a href="http://dx.doi.org/10.3792/pjaa.84.29">Generating functions and generalized Euler numbers</a>, Proc. Japan Acad. Ser. A Math. Sci., Volume 84, Number 2 (2008), 29-34. See p 32.

%H F. Luca, A. Pizarro-Madariaga, and C. Pomerance, <a href="https://math.dartmouth.edu/~carlp/irreg.pdf">On the counting function of irregular primes</a>, 2014.

%H Emanuele Munarini, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL26/Munarini/muna25.html">Two-Parameter Identities for q-Appell Polynomials</a>, Journal of Integer Sequences, Vol. 26 (2023), Article 23.3.1.

%H A. Niedermaier and J. Remmel, <a href="http://www.emis.de/journals/JIS/VOL13/Remmel/remmel.html">Analogues of up-down permutations for colored permutations</a>, J. Int. Seq. 13 (2010) 10.5.6.

%H T. J. Stieltjes, <a href="http://www.numdam.org/item?id=AFST_1996_6_5_1_H1_0">Sur la réduction en fraction continue d'une série procédant suivant les puissances descendantes d'une variable</a>, Ann. Fac. Sc. Toulouse 3 (1889) 1-17.

%F E.g.f.: sech(x). - _Michael Somos_, Mar 11 2014

%F a(n) = (Sum_{k>=0} (-1)^k*(2*k+1)^n)*2. - _Gottfried Helms_, Mar 09 2012

%F From _Sergei N. Gladkovskii_, Oct 14 2012 - Oct 13 2013: (Start)

%F Continued fractions:

%F G.f.: 1/U(0) where U(k) = 1 - x + x*(k+1)/(1 - x*(k+1)/U(k+1)).

%F 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)).

%F E.g.f.: (1-x)/U(0) where U(k) = 1 - x/(1 - x/(x - (2*k+1)*(2*k+2)/U(k+1)).

%F 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).

%F 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))).

%F 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))).

%F 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).

%F G.f.: 1/S(0) where S(k) = 1 + x^2*(k+1)^2/S(k+1) (due to T. J. Stieltjes).

%F 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)).

%F G.f.: -(1/x)/Q(0) where Q(k) = -1/x + (k+1)^2/Q(k+1) (due to T. J. Stieltjes).

%F G.f.: (1/(1-x))/Q(0) + 1/(1-x) where Q(k) = 1 - 1/x + (k+1)*(k+2)/Q(k+1).

%F G.f.: (x/(x-1))/Q(0) + 1/(1-x) where Q(k) = 1 - x + x^2*(k+1)*(k+2)/Q(k+1).

%F 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).

%F 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)).

%F G.f.: T(0) where T(k) = 1 - x^2*(k+1)^2/(x^2*(k+1)^2 + 1/T(k+1)). (End)

%F 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

%F 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]

%F a(n) = 2*Im(PolyLog(-n, I)). - _Peter Luschny_, Sep 29 2020

%F a(4n) == 5 (mod 60) and a(4n+2) == -1 (mod 60). See Hirschhorn. - _Michel Marcus_, Jan 11 2022

%F For n > 1, a(n) = -Sum_{k=1..floor(n/2)} a(n-2*k)*binomial(n,2*k). - _Tani Akinari_, Sep 15 2023

%e G.f. = 1 - x^2 + 5*x^4 - 61*x^6 + 1385*x^8 - 50521*x^10 + 2702765*x^12 + ...

%p seq(euler(n) , n=0..31); # _Zerinvary Lajos_, Mar 15 2009

%p P := proc(n,x) option remember; if n = 0 then 1 else

%p (n*x+(1/2)*(1-x))*P(n-1,x)+x*(1-x)*diff(P(n-1,x),x); expand(%) fi end:

%p A122045 := n -> (-1)^n*subs(x=-1, P(n,x)):

%p seq(A122045(n), n=0..30); # _Peter Luschny_, Mar 07 2014

%p ptan := proc(n) option remember; if irem(n, 2) = 1 then 0 else

%p -add(`if`(k=0, 1, binomial(n, k)*ptan(n - k)), k = 0..n-1,2) fi end:

%p A122045 := n -> ifelse(n = 0, 1, ptan(n)):

%p seq(A122045(n), n = 0..30); # _Peter Luschny_, Jun 06 2022

%t Table[EulerE[n], {n, 0, 30}]

%t Range[0, 30]! CoefficientList[ Series[ Sech[x], {x, 0, 30}], x] (* _Robert G. Wilson v_, Aug 08 2018 *)

%o (Sage) [euler_number(i) for i in range(31)] # _Zerinvary Lajos_, Mar 15 2009

%o (PARI) x='x+O('x^66); Vec(serlaplace(1/cosh(x))) \\ _Joerg Arndt_, Mar 10 2014

%o (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

%o (Python) from sympy import bernoulli as B

%o def a(n): return int(2**n*2**(n + 1)*(B(n + 1, 3/4) - B(n + 1, 1/4))/(n + 1))

%o print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 24 2017, after PARI code by _Michel Marcus_

%o (Python) from functools import cache

%o from math import comb as binomial

%o @cache

%o def ptan(n): # see also A331978 and A350972.

%o return (0 if n % 2 == 1 else

%o -sum(binomial(n,k) * ptan(n-k) if k > 0 else 1 for k in range(0, n-1, 2)))

%o def A122045(n): return 1 if n == 0 else ptan(n)

%o print([A122045(n) for n in range(31)]) # _Peter Luschny_, Jun 06 2022

%o (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

%o (Maxima) a[n]:=if n<2 then 1-n else sum(-a[n-2*k]*binomial(n,2*k),k,1,floor(n/2));

%o makelist(a[n],n,0,50); /* _Tani Akinari_, Sep 15 2023 */

%Y Cf. A000364, A002144, A028296, A265237, A331978, A350972.

%K sign

%O 0,5

%A _Roger L. Bagula_, Sep 13 2006

%E Edited by _N. J. A. Sloane_, Sep 17 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)