login
A099760
a(n+1) = 2*n*a(n) + 2 with a(0)=1.
3
1, 2, 6, 26, 158, 1266, 12662, 151946, 2127246, 34035938, 612646886, 12252937722, 269564629886, 6469551117266, 168208329048918, 4709833213369706, 141294996401091182, 4521439884834917826, 153728956084387206086
OFFSET
0,2
COMMENTS
Row sums of triangle A099759.
For n > 1, a(n) equals 2^n times the permanent of the (n-1) X (n-1) matrix with (3/2)'s along the main diagonal and 1's everywhere else. - John M. Campbell, Jun 03 2011
LINKS
FORMULA
a(n) = 2^n*(n-1)! + 2*floor(2^(n-1)*(n-1)!*(exp(1/2)-1)), n>0. - Gary Detlefs, Jul 14 2010
a(n+1) = 2^(n+1)*(n!)*(Sum_{k=0..n} 1/(2^k*(k!))) for n>=0. - Werner Schulte, Apr 22 2017
EXAMPLE
a(3)=26, so a(4)=2*3*26+2=158.
MAPLE
a[0]:=1: for n from 0 to 21 do a[n+1]:=2*n*a[n]+2 od: seq(a[n], n=0..21); # Emeric Deutsch, Feb 23 2005
MATHEMATICA
RecurrenceTable[{a[0]==1, a[n]==2(n-1)a[n-1]+2}, a, {n, 20}] (* Harvey P. Dale, Jan 31 2014 *)
PROG
(PARI) a(n) = if(n==0, 1, 2*(n-1)*a(n-1) + 2);
vector(20, n, a(n-1)) \\ G. C. Greubel, Sep 03 2019
(Magma) a:= func< n | n eq 0 select 1 else 2*(n-1)*Self(n-1) + 2 >;
[a(n): n in [0..20]]; // G. C. Greubel, Sep 03 2019
(Sage)
def a(n):
if (n==0): return 1
else: return 2*(n-1)*a(n-1) + 2
[a(n) for n in (0..20)] # G. C. Greubel, Sep 03 2019
(GAP)
a:= function(n)
if n=0 then return 1;
else return 2*(n-1)*a(n-1) + 2;
fi;
end;
List([0..20], n-> a(n) ); # G. C. Greubel, Sep 03 2019
CROSSREFS
Sequence in context: A123306 A218691 A099758 * A112934 A135922 A213430
KEYWORD
easy,nonn
AUTHOR
Miklos Kristof, Nov 11 2004
EXTENSIONS
More terms from Emeric Deutsch, Feb 23 2005
Edited by Philippe Deléham, Feb 17 2007
STATUS
approved