login
n! times partial sum of the sequence (1,Bernoulli numbers).
2

%I #17 Sep 08 2022 08:45:30

%S 1,2,3,10,40,196,1176,8352,66816,589248,5892480,67841280,814095360,

%T 9007096320,126099348480,3417110323200,54673765171200,

%U -1593137026252800,-28676466472550400,6142121597716070400,122842431954321408000,-24453765000305786880000

%N n! times partial sum of the sequence (1,Bernoulli numbers).

%H G. C. Greubel, <a href="/A129716/b129716.txt">Table of n, a(n) for n = 0..300</a> (terms 0..25 from R. J. Mathar)

%F a(n) = n!*(1 + Sum_{i=0..n-1} Bernoulli(i)). - _R. J. Mathar_, Feb 20 2008

%e The sequence of 1 followed by Bernoulli numbers is 1, 1, -1/2, 1/6,0, -1/30, 0, 1/42, .... (Cf. A027641, A027642). Its partial sums are 1, 2, 3/2, 5/3, 5/3, ... Multiplication by n! for n=0,1,2,3,... yields a(n).

%p A129716 := proc(n) n!*(1+add(bernoulli(i),i=0..n-1)); end: seq(A129716(n),n=0..40) ; # _R. J. Mathar_, Feb 20 2008

%t max = 21; Accumulate[ Table[ If[n == 0, 1, BernoulliB[n-1]], {n, 0, max}]]*Range[0, max]! (* _Jean-François Alcover_, Mar 04 2013 *)

%o (PARI) vector(26, n, (n-1)!*(1 + sum(j=0,n-2, bernfrac(j))) ) \\ _G. C. Greubel_, Dec 03 2019

%o (Magma) [1] cat [Factorial(n)*(1 + (&+[Bernoulli(k): k in [0..n-1]]) ): n in [1..25]]; // _G. C. Greubel_, Dec 03 2019

%o (Sage) [factorial(n)*(1 + sum(bernoulli(k) for k in (0..n-1)) ) for n in (0..25)] # _G. C. Greubel_, Dec 03 2019

%o (GAP) List([0..25], n-> Factorial(n)*(1 + Sum([0..n-1], j-> Bernoulli(j)) ) ); # _G. C. Greubel_, Dec 03 2019

%K sign

%O 0,2

%A _Paul Curtz_, Jun 02 2007

%E More terms from _R. J. Mathar_, Feb 20 2008