login
Nonuple factorial, 9-factorial, n!9, n!!!!!!!!!.
12

%I #32 Sep 08 2022 08:45:23

%S 1,1,2,3,4,5,6,7,8,9,10,22,36,52,70,90,112,136,162,190,440,756,1144,

%T 1610,2160,2800,3536,4374,5320,12760,22680,35464,51520,71280,95200,

%U 123760,157464,196840,484880,884520,1418560,2112320,2993760,4093600

%N Nonuple factorial, 9-factorial, n!9, n!!!!!!!!!.

%H Robert Israel, <a href="/A114806/b114806.txt">Table of n, a(n) for n = 0..2955</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Multifactorial.html">Multifactorial</a>.

%F D-finite with recurrence: a(0) = 1, a(n) = n for 1 <= n <= 9, a(n) = n*a(n-9) for n >= 10.

%F From _Robert Israel_, Jun 21 2019: (Start)

%F a(9*m) = 9^m*m!.

%F a(9*m+k) = 9^m*(9*m+k)*Gamma(m+k/9)/Gamma(k/9) for 1 <= k <= 8. (End)

%F Sum_{n>=0} 1/a(n) = A288096. - _Amiram Eldar_, Nov 10 2020

%e a(10) = 10 * a(10-9) = 10 * a(1) = 10 * 1 = 10.

%e a(20) = 20 * a(20-9) = 20 * a(11) = 20 * (11*a(11-9)) = 20 * 11 * a(2) = 20 * 11 * 2 = 440.

%e a(30) = 30 * a(30-9) = 30 * a(21) = 30 * (21*a(21-9)) = 30 * 21 * a(12) = 30 * 21 * (12*a(12-9)) = 30 * 21 * 12 * 3 = 22680.

%p f:= proc(n) option remember;

%p n*procname(n-9)

%p end proc:

%p f(0):= 1: for n from 1 to 8 do f(n):= n od:

%p map(f, [$0..100]); # _Robert Israel_, Jun 21 2019

%t NFactorialM[n_, m_] := Block[{k = n, p = Max[1, n]}, While[k > m, k -= m; p *= k]; p]; Array[ NFactorialM[#, 9] &, 44, 0] (* _Robert G. Wilson v_, May 10 2011 *)

%t a[n_]:= a[n]= If[n<1, 1, n*a[n-9]]; Table[a[n], {n,0,50}] (* _G. C. Greubel_, Aug 21 2019 *)

%t Table[Times@@Range[n,1,-9],{n,0,50}] (* _Harvey P. Dale_, Nov 13 2021 *)

%o (PARI) a(n)=if(n<1, 1, n*a(n-9));

%o vector(50, n, n--; a(n) ) \\ _G. C. Greubel_, Aug 21 2019

%o (Magma) b:=func< n | n le 9 select n else n*Self(n-9) >;

%o [1] cat [b(n): n in [1..50]]; // _G. C. Greubel_, Aug 21 2019

%o (Sage)

%o def a(n):

%o if (n<1): return 1

%o else: return n*a(n-9)

%o [a(n) for n in (0..50)] # _G. C. Greubel_, Aug 21 2019

%o (GAP)

%o a:= function(n)

%o if n<1 then return 1;

%o else return n*a(n-9);

%o fi;

%o end;

%o List([0..50], n-> a(n) ); # _G. C. Greubel_, Aug 21 2019

%Y Cf. A000142, A006882, A007661, A007662, A085157, A085158, A288096.

%K easy,nonn

%O 0,3

%A _Jonathan Vos Post_, Feb 19 2006