This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A129831 #18 Feb 02 2025 16:32:09 %S A129831 1,1,2,6,9,39,66,318,627,3213,7182,38898,96237,548883,1478142,8843778, %T A129831 25615647,160178913,494550162,3221341038,10527969537,71221636863, %U A129831 245012506362,1716978047238,6188875533387,44822878860213,168635167816662,1259693955204138 %N A129831 Alternating sum of double factorials: n!! - (n-1)!! + (n-2)!! - ... 1!!. %F A129831 a(n) = n!! - (n-1)!! + (n-2)!! - ... 1!! = A006882(n) - a(n-1). %e A129831 a(5) = 5!! - 4!! + 3!! - 2!! + 1!! = 15 - 8 + 3 - 2 + 1 = 9. %p A129831 A129831 := proc(n) %p A129831 add( (-1)^i*doublefactorial(n-i),i=0..n-1) ; %p A129831 end proc: # _R. J. Mathar_, Aug 22 2012 %p A129831 # second Maple program: %p A129831 a:= proc(n) option remember; `if`(n=0, 0, doublefactorial(n)-a(n-1)) end: %p A129831 seq(a(n), n=1..30); # _Alois P. Heinz_, Feb 02 2025 %t A129831 Table[Sum[(-1)^i*(n-i)!!,{i,0,n-1}],{n,26}] (* _James C. McMahon_, Feb 02 2025 *) %Y A129831 Cf. A005165 (similar for factorials), A006882. %K A129831 nonn %O A129831 1,3 %A A129831 _Paolo P. Lava_ & _Giorgio Balzarotti_, May 21 2007