login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A129547
a(n)= n! - (n-1)!! - a(n-1), with a(1)=1!-0!!=0.
0
0, 1, 3, 18, 94, 611, 4381, 35834, 326662, 3301193, 36611767, 442379438, 5784595282, 81393560783, 1226280162097, 19696507698878, 335990910075202, 6066382761193373, 115578717461844067, 2317323290060066858
OFFSET
0,3
FORMULA
a(n)= n! - (n-1)!! - a(n-1), with a(1)=1!-0!!=0. a(n)=abs{sum{i=1..n,[(n-i+1)!-(n-i)!! ]*(-1)^i}}
EXAMPLE
a(1)=1!-0!!=1-1=0
a(2)=2!-1!!-1!+0!!=2-1-1+1=1
a(3)=3!-2!!-2!+1!!+1!-0!!=6-2-2+1+1-1=3
a(4)=4!-3!!-3!+2!!+2!-1!!-1!+0!!=24-3-6+2+2-1-1+1=18
a(5)=5!-4!!-4!+3!!+3!-2!!-2!+1!!+1!-0!!=120-8-24+3+6-2-2+1+1-1=94
MAPLE
P:=proc(n) local a, i, k, w; print(0); a:=0; for i from 2 by 1 to n do k:=i-1; w:=i-3; while w>0 do k:=k*w; w:=w-2; od; a:=(i!-k)-a; print(a); od; end: P(50);
CROSSREFS
Sequence in context: A363647 A058409 A125833 * A081151 A132848 A321032
KEYWORD
nonn
AUTHOR
STATUS
approved