A240485 a(n) = -Zeta(1-n)*n*(2^(n+1) - 4) - Zeta(-n)*(n+1)*(2^(n+2) - 2), for n = 0 the limit is understood.
1, 3, 2, -1, -2, 3, 6, -17, -34, 155, 310, -2073, -4146, 38227, 76454, -929569, -1859138, 28820619, 57641238, -1109652905, -2219305810, 51943281731, 103886563462, -2905151042481, -5810302084962, 191329672483963, 382659344967926, -14655626154768697
Offset: 0
Keywords
Programs
-
Maple
A240485 := proc(n) if n = 0 then 1 elif n = 1 then 3 else m := 2*iquo(n-1, 2) + 2; -2^irem(n-1, 2)*m*euler(m-1, 0) fi end: seq(A240485(n), n=0..27); # Peter Luschny, Apr 09 2014
-
Mathematica
a[n_] := Which[n == 0, 1, n == 1, 3, True, m = 2*Quotient[n-1, 2]+2; -2^Mod[n-1, 2]*m*EulerE[m-1, 0]]; Table[a[n], {n, 0, 27}] (* Jean-François Alcover, Apr 09 2014, after Peter Luschny *)
-
Sage
def A240485(n): if n < 3: return [1,3,2][n] m = 2*((n+1)//2) b = 2*(1-2^m)*bernoulli(m) if is_even(n): b = 2*b return (-1)^ceil((n^2+1)/2)*b [A240485(n) for n in (0..24)] # Peter Luschny, Apr 08 2014
Formula
a(2*n+1) = a(2*n+2)/2 for n > 0.
-a(2*n+2)/2 = A226158(2*n+2) = A001469(n+1) = (2*n+2)*E(2*n+1, 0) where E(n, x) are the Euler polynomials.
E.g.f.: (2*exp(x)*(3*x+exp(x)*(2*x+1)+1))/(exp(x)+1)^2. - Peter Luschny, Apr 10 2014
Comments