login
Transformed Bernoulli twin numbers.
10

%I #12 Feb 03 2024 10:13:13

%S 1,-1,-2,-4,-4,24,120,-960,-12096,120960,3024000,-36288000,

%T -1576143360,22066007040,1525620096000,-24409921536000,

%U -2522591034163200,45406638614937600,6686974460694528000,-133739489213890560000,-27033456071346536448000,594736033569623801856000

%N Transformed Bernoulli twin numbers.

%H G. C. Greubel, <a href="/A129826/b129826.txt">Table of n, a(n) for n = 0..300</a>

%F We define Bernoulli twin numbers C(n) via Bernoulli numbers B(n) = A027641(n)/A027642(n) as C(0)=1, 2C(1)=-1, 3C(2)=-1, C(2n-1)= -B(2n-2) and C(2n)=B(2n), n>1. The sequence is defined as a(n)=(n+1)!*C(n).

%F a(n) = (n+1)!*C(n), where C(n) = A051718(n)/A051717(n).

%F E.g.f.: Sum(n>=0) C(n) x^n/n! = 1 + x - x^2/2 + Sum_{n>=1} (B(n) - B(n-1))*x^n/n! = x - x^2/2 + x/(e^x-1) - Integral_{y=0..x} ((y dy)/(e^y-1)).

%t c[n_?EvenQ] := BernoulliB[n]; c[n_?OddQ] := -BernoulliB[n-1]; c[1]=-1/2; c[2]=-1/3; a[n_] := (n+1)!*c[n]; Table[a[n], {n, 0, 21}] (* _Jean-François Alcover_, Aug 08 2012 *)

%o (Magma)

%o f:= func< n | n le 2 select (-1)^Floor((n+1)/2)/(n+1) else (-1)^n*BernoulliNumber(Floor(n - (1-(-1)^n)/2)) >;

%o A129826:= func< n | Factorial(n+1)*f(n) >;

%o [A129826(n): n in [0..30]]; // _G. C. Greubel_, Feb 01 2024

%o (SageMath)

%o def f(n): return (-1)^((n+1)//2)/(n+1) if n<3 else (-1)^n*bernoulli(n-(n%2))

%o def A129826(n): return factorial(n+1)*f(n)

%o [A129826(n) for n in range(31)] # _G. C. Greubel_, Feb 01 2024

%Y Cf. A027641, A027642, A051717, A051718, A129378, A140351.

%K sign

%O 0,3

%A _Paul Curtz_, May 20 2007

%E Edited and extended by _R. J. Mathar_, Aug 06 2008