editing
proposed
editing
proposed
a(n) = (n-1)!! - (n-2)!!.
For n >= 0 let A(n) be the product of the positive integers <= n that have the same parity as n minus the product of the positive integers <= n that have the opposite parity as n. Then a(n) = A(n-1) (for n >= 3). [_Peter Luschny, _, Jul 06 2011]
T. D. Noe, <a href="/A007911/b007911.txt">Table of n, a(n) for n = 3..100</a>
P:=proc(n) local i, j, k, w; for i from 1 by 1 to n do k:=i; w:=i-2; while w>0 do k:=k*w; w:=w-2; od; j:=i+1; w:=i-1; while w>0 do j:=j*w; w:=w-2; od; print(j-k); od; end: P(100); - _# _Paolo P. Lava_, Jun 14 2007
DDF := proc(n) local R, P, k; R := {$1..n}; P := select(k->k mod 2 = n mod 2, R); mul(k, k = P) - mul(k, k = R minus P) end: A007911 := n -> DDF(n-1); # [_Peter Luschny, _, Jul 06 2011]
approved
editing
J. H. Conway (conway(AT)math.princeton.edu)
P:=proc(n) local i, j, k, w; for i from 1 by 1 to n do k:=i; w:=i-2; while w>0 do k:=k*w; w:=w-2; od; j:=i+1; w:=i-1; while w>0 do j:=j*w; w:=w-2; od; print(j-k); od; end: P(100); - _Paolo P. Lava (paoloplava(AT)gmail.com), _, Jun 14 2007
P:=proc(n) local i, j, k, w; for i from 1 by 1 to n do k:=i; w:=i-2; while w>0 do k:=k*w; w:=w-2; od; j:=i+1; w:=i-1; while w>0 do j:=j*w; w:=w-2; od; print(j-k); od; end: P(100); - Paolo P. Lava (pplpaoloplava(AT)splgmail.atcom), Jun 14 2007
reviewed
approved
proposed
reviewed
For n >= 0 let A(n) the product of the positive integers <= n that have the same parity as n minus the product of the positive integers <= n that have the opposite parity as n. Then a(n) = A(n-1) (for n>=3). [Peter Luschny, Jul 06 2011]
DDF := proc(n) local R, P, k; R := {$1..n}; P := select(k->k mod 2 = n mod 2, R); mul(k, k = P) - mul(k, k = R minus P) end: A007911 := n -> DDF(n-1); # [Peter Luschny, Jul 06 2011]
approved
proposed
T. D. Noe, <a href="/A007911/b007911.txt">Table of n, a(n) for n=3..100</a>
nonn,easy,new
T. D. Noe, <a href="http://www.research.att.com/~njas/sequences/b007911.txt">Table of n, a(n) for n=3..100</a>
nonn,easy,new