login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the number of nonzero digits in n!.
3

%I #19 Aug 10 2024 21:39:05

%S 1,1,1,1,2,2,2,2,3,5,5,6,5,6,9,9,10,11,11,12,12,13,14,18,18,17,19,20,

%T 20,24,24,27,26,29,28,32,32,32,29,35,39,35,39,40,43,44,42,49,48,49,46,

%U 49,50,53,54,56,58,57,62,62,63,58,66,67,70,71,70,73,72,78,81

%N a(n) is the number of nonzero digits in n!.

%H Robert G. Wilson v, <a href="/A356758/b356758.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>

%F a(n) = A034886(n!) - A027869(n!).

%t Table[Length[Select[IntegerDigits[n!],Positive]],{n,0,70}]

%o (PARI) a(n) = #select(x->(x>0), digits(n!)); \\ _Michel Marcus_, Aug 26 2022

%o (Python)

%o from math import factorial

%o def a(n): return len(str(factorial(n)).replace("0", ""))

%o print([a(n) for n in range(71)]) # _Michael S. Branicky_, Aug 26 2022

%Y Cf. A000142, A027869, A034886, A356757.

%K easy,base,nonn

%O 0,5

%A _Stefano Spezia_, Aug 26 2022