cp's OEIS Frontend

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.

A007661 Triple factorial numbers a(n) = n!!!, defined by a(n) = n*a(n-3), a(0) = a(1) = 1, a(2) = 2. Sometimes written n!3.

This page as a plain text file.
%I A007661 M0596 #75 Mar 19 2025 08:24:36
%S A007661 1,1,2,3,4,10,18,28,80,162,280,880,1944,3640,12320,29160,58240,209440,
%T A007661 524880,1106560,4188800,11022480,24344320,96342400,264539520,
%U A007661 608608000,2504902400,7142567040,17041024000,72642169600,214277011200,528271744000,2324549427200
%N A007661 Triple factorial numbers a(n) = n!!!, defined by a(n) = n*a(n-3), a(0) = a(1) = 1, a(2) = 2. Sometimes written n!3.
%C A007661 The triple factorial of a positive integer n is the product of the positive integers <= n that have the same residue modulo 3 as n. - _Peter Luschny_, Jun 23 2011
%D A007661 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A007661 J. Spanier and K. B. Oldham, An Atlas of Functions, Hemisphere, NY, 1987, p. 23.
%H A007661 T. D. Noe, <a href="/A007661/b007661.txt">Table of n, a(n) for n = 0..200</a>
%H A007661 Shyam Sunder Gupta, <a href="https://doi.org/10.1007/978-981-97-2465-9_16">Fascinating Factorials</a>, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 16, 411-442.
%H A007661 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Multifactorial.html">Multifactorial</a>.
%F A007661 a(n) = Product_{i=0..floor((n-1)/3)} (n-3*i). - _M. F. Hasler_, Feb 16 2008
%F A007661 a(n) ~ c * n^(n/3+1/2)/exp(n/3), where c = sqrt(2*Pi/3) if n=3*k, c = sqrt(2*Pi)*3^(1/6) / Gamma(1/3) if n=3*k+1, c = sqrt(2*Pi)*3^(-1/6) / Gamma(2/3) if n=3*k+2. - _Vaclav Kotesovec_, Jul 29 2013
%F A007661 a(3*n) = A032031(n); a(3*n+1) = A007559(n+1); a(3*n+2) = A008544(n+1). - _Reinhard Zumkeller_, Sep 20 2013
%F A007661 0 = a(n)*(a(n+1) -a(n+4)) +a(n+1)*a(n+3) for all n>=0. - _Michael Somos_, Feb 24 2019
%F A007661 Sum_{n>=0} 1/a(n) = A288055. - _Amiram Eldar_, Nov 10 2020
%p A007661 A007661 := n -> mul(k, k = select(k -> k mod 3 = n mod 3, [$1 .. n])): seq(A007661(n), n = 0 .. 29);  # _Peter Luschny_, Jun 23 2011
%t A007661 multiFactorial[n_, k_] := If[n < 1, 1, If[n < k + 1, n, n*multiFactorial[n - k, k]]]; Array[ multiFactorial[#, 3] &, 30, 0] (* _Robert G. Wilson v_, Apr 23 2011 *)
%t A007661 RecurrenceTable[{a[0]==a[1]==1,a[2]==2,a[n]==n*a[n-3]},a,{n,30}] (* _Harvey P. Dale_, May 17 2012 *)
%t A007661 Table[With[{q = Quotient[n + 2, 3]}, 3^q q! Binomial[n/3, q]], {n, 0, 30}] (* _Jan Mangaldan_, Mar 21 2013 *)
%t A007661 a[ n_] := With[{m = Mod[n, 3, 1], q = 1 + Quotient[n, 3, 1]}, If[n < 0, 0, 3^q Pochhammer[m/3, q]]]; (* _Michael Somos_, Feb 24 2019 *)
%t A007661 Table[Times@@Range[n,1,-3],{n,0,30}] (* _Harvey P. Dale_, Sep 12 2020 *)
%o A007661 (PARI) A007661(n,d=3)=prod(i=0,(n-1)\d,n-d*i) \\ _M. F. Hasler_, Feb 16 2008
%o A007661 (Haskell)
%o A007661 a007661 n k = a007661_list !! n
%o A007661 a007661_list = 1 : 1 : 2 : zipWith (*) a007661_list [3..]
%o A007661 -- _Reinhard Zumkeller_, Sep 20 2013
%o A007661 (Magma) I:=[1,1,2];[n le 3 select I[n] else (n-1)*Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Nov 27 2015
%o A007661 (Sage)
%o A007661 def a(n):
%o A007661     if (n<3): return fibonacci(n+1)
%o A007661     else: return n*a(n-3)
%o A007661 [a(n) for n in (0..30)] # _G. C. Greubel_, Aug 21 2019
%o A007661 (GAP)
%o A007661 a:= function(n)
%o A007661     if n<3 then return Fibonacci(n+1);
%o A007661     else return n*a(n-3);
%o A007661     fi;
%o A007661   end;
%o A007661 List([0..30], n-> a(n) ); # _G. C. Greubel_, Aug 21 2019
%Y A007661 Union of A007559, A008544 and A032031.
%Y A007661 Cf. A000142, A006882 (= A001147 union A000165), A007662 (= union of A007696, A001813, A008545 and A047053), A085157, A085158.
%Y A007661 Cf. A008585, A016777, A016789, A161474, A288055.
%K A007661 nonn,easy,nice
%O A007661 0,3
%A A007661 _N. J. A. Sloane_, _Mira Bernstein_, _Robert G. Wilson v_