OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..400
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 529
FORMULA
Recurrence: {a(1)=2, a(2)=6, a(0)=2, (2*n^2 + 6*n + 4)*a(n) + (-6-3*n)*a(n+1) + a(n+2) = 0}.
a(n) = (1+2^(n-1))*n!, n > 0; see A000051.
From Peter Luschny, Apr 20 2009: (Start)
A weighted binomial sum of the Bernoulli numbers A027641/A027642 with A027641(1)=1 (which amounts to the definition B_{n} = B_{n}(1)).
a(n) = Sum_{k=0..n-1} n!*C(n-1,k)*B_{n-k-1}*2^(k+1)/(k+1). (See also A000051.) (End)
MAPLE
spec := [S, {S=Union(Sequence(Prod(Z, Sequence(Z))), Sequence(Z))}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
a := proc(n) if n = 0 then 2 else add(n!*binomial(n-1, k)*bernoulli(n-k-1, 1)*2^(k+ 1)/(k+1), k=0..n-1) fi end: # Peter Luschny, Apr 20 2009
MATHEMATICA
With[{nn=25}, CoefficientList[Series[(2 - 4 x + x^2) / (-1 + 2 x) / (-1 + x), {x, 0, nn}], x] Range[0, nn]!] (* Vincenzo Librandi, Aug 11 2017 *)
PROG
(Magma) [2] cat [(1+2^(n-1))*Factorial(n): n in [1..20]]; // Vincenzo Librandi, Aug 11 2017
(PARI) Vec(serlaplace((2-4*x+x^2)/((1-x)*(1-2*x)) + O(x^20))) \\ Andrew Howroyd, Oct 26 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
STATUS
approved