%I #22 Sep 08 2022 08:45:23
%S 1,1,2,3,4,5,6,7,8,18,30,44,60,78,98,120,288,510,792,1140,1560,2058,
%T 2640,6624,12240,19800,29640,42120,57624,76560,198720,379440,633600,
%U 978120,1432080,2016840,2756160,7352640,14418720,24710400,39124800
%N Septuple factorial, 7-factorial, n!7, n!!!!!!!, a(n) = n*a(n-7) if n > 1, else 1.
%C Many of the terms yield multifactorial primes a(n) + 1, e.g.: a(2) + 1 = 3, a(4) + 1 = 5, a(6) + 1 = 7, a(9) + 1 = 19, a(10) + 1 = 31, a(12) + 1 = 61, a(13) + 1 = 79, a(24) + 1 = 12241, a(25) + 1 = 19801, a(26) + 1 = 29641, a(29) + 1 = 76561, a(31) + 1 = 379441, a(35) + 1 = 2016841, a(36) + 1 = 2756161, ...
%C Equivalently, product of all positive integers <= n congruent to n (mod 7). - _M. F. Hasler_, Feb 23 2018
%H G. C. Greubel, <a href="/A114799/b114799.txt">Table of n, a(n) for n = 0..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Multifactorial.html">Multifactorial</a>.
%H <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>
%F a(n) = 1 for n <= 1, else a(n) = n*a(n-7).
%F Sum_{n>=0} 1/a(n) = A288094. - _Amiram Eldar_, Nov 10 2020
%e a(40) = 40 * a(40-7) = 40 * a(33) = 40 * (33*a(26)) = 40 * 33 * (26*a(19)) = 40 * 33 * 26 * (19*a(12)) = 40 * 33 * 26 * 19 * (12*a(5)) = 40 * 33 * 26 * 19 * 12 5 = 39124800.
%p A114799 := proc(n)
%p option remember;
%p if n < 1 then
%p 1;
%p else
%p n*procname(n-7) ;
%p end if;
%p end proc:
%p seq(A114799(n),n=0..40) ; # _R. J. Mathar_, Jun 23 2014
%p A114799 := n -> product(n-7*k,k=0..(n-1)/7); # _M. F. Hasler_, Feb 23 2018
%t a[n_]:= If[n<1, 1, n*a[n-7]]; Table[a[n], {n,0,40}] (* _G. C. Greubel_, Aug 20 2019 *)
%o (PARI) A114799(n,k=7)=prod(j=0,(n-1)\k,n-j*k) \\ _M. F. Hasler_, Feb 23 2018
%o (Magma)
%o b:= func< n | (n lt 8) select n else n*Self(n-7) >;
%o [1] cat [b(n): n in [1..40]]; // _G. C. Greubel_, Aug 20 2019
%o (Sage)
%o def a(n):
%o if (n<1): return 1
%o else: return n*a(n-7)
%o [a(n) for n in (0..40)] # _G. C. Greubel_, Aug 20 2019
%o (GAP)
%o a:= function(n)
%o if n<1 then return 1;
%o else return n*a(n-7);
%o fi;
%o end;
%o List([0..40], n-> a(n) ); # _G. C. Greubel_, Aug 20 2019
%Y Cf. A045754, A084947, A288094.
%Y Cf. k-fold factorials: A000142, A001147 (and A000165, A006882), A007559 (and A032031, A008544, A007661), A007696 (and A001813, A008545, A047053, A007662), A008548 (and A052562, A047055, A085157), A085158 (and A008542, A047058, A047657), A045755.
%K easy,nonn
%O 0,3
%A _Jonathan Vos Post_, Feb 18 2006
%E Edited by _M. F. Hasler_, Feb 23 2018