OFFSET
0,2
COMMENTS
Let G(m, n) denote the difference table of a(n):
1, 3, 2, -1, -2, 3, 6, -17, -34,...
2, -1, -3, -1, 5, 3, -23, -17,...
-3, -2, 2, 6, -2, -26, 6,...
1, 4, 4, -8, -24, 32,...
3, 0, -12, -16, 56,...
-3, -12, -4, 72,...
-9, 8, 76,...
17, 68,...
51,...
a(n) = G(0, n).
The main diagonal G(n, n) = 1, -1, 2, -8, 56, -608,... is essentially a signed version of A005439.
The first upper diagonal is the main diagonal multiplied by 3. G(n, n+1) = 3*G(n, n).
G(m, n) = G(m, n-1) + G(m+1,n-1).
Inverse binomial transform: after 1, 2, -3, A110501(n+1) is interleaved with 3*A110501(n+1), signed two by two. I. e. b(n) = 1, 2, -3, 1, 3, -3, -9, 17, 51,... . a(n+2) + b(n+2) = -1, 0, 1, 0, -3, 0, 17,... = A226158(n+2).
This is particular to the Genocchi numbers. If the first upper diagonal is proportional to the main diagonal (1, -1, 2, -8,...), the sequence and the inverse binomial transform are simply connected to the Genocchi numbers.
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
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 *)
PROG
(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
CROSSREFS
KEYWORD
sign
AUTHOR
Paul Curtz, Apr 06 2014
STATUS
approved