%I #8 Jul 19 2022 13:31:25
%S 0,0,0,0,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,
%T 2,2,2,2,2,3,3,2,3,2,2,2,2,2,2,2,2,3,3,3,2,3,2,2,3,2,3,2,2,2,2,2,2,3,
%U 2,2,3,2,2,2,3,2,2,2,2,2,2,3,3,3,3,2,3,3
%N Additive persistence of factorial numbers.
%e 10! = 10*9*8*7*6*5*4*3*2 = 3628800 -> 3+6+2+8+8 = 27 -> 2+7 = 9 -> persistence = 2.
%p with(numtheory): with(combinat): P:=proc(n) local a,t; t:=0; a:=n!;
%p while a>9 do t:=t+1; a:=convert(convert(a,base,10),`+`); od; t;
%p end: seq(P(i),i=0..10^2);
%t Table[Length[NestWhileList[Total[IntegerDigits[#]]&,n!,#>9&]]-1,{n,0,90}] (* _Harvey P. Dale_, Jul 19 2022 *)
%Y Cf. A000142.
%K easy,nonn,base
%O 0,10
%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Jun 19 2007, corrected Jun 22 2007
%E Corrected entries and Maple code
|