login
Number of 7's in n!.
15

%I #22 Nov 02 2022 10:29:28

%S 0,0,0,0,0,0,1,0,0,0,0,0,1,1,2,2,1,1,3,0,1,2,6,2,1,0,0,1,1,3,0,4,1,1,

%T 2,2,4,3,4,4,4,3,3,4,4,4,1,2,8,5,5,3,8,5,7,4,9,4,4,7,7,6,8,8,3,9,8,6,

%U 8,8,9,10,12,7,7,9,9,7,10,10,9,14,11,12,9,7,13,17,2,11,12,19,15,12,10,15,15,16,19,7,7,12

%N Number of 7's in n!.

%H Seiichi Manyama, <a href="/A079692/b079692.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) + A079680(n) + A079714(n) + A079684(n) + A079688(n) + A079690(n) + A079691(n) + A079693(n) + A079694(n)). - _Reinhard Zumkeller_, Jan 27 2008

%p a:= n-> numboccur(7, convert(n!, base, 10)):

%p seq(a(n), n=0..101); # _Alois P. Heinz_, Apr 26 2021

%o (PARI) a(n) = #select(x->(x==7), digits(n!)); \\ _Michel Marcus_, Apr 26 2021

%Y Cf. A079714.

%Y Cf. A000142, A137579, A137580.

%Y Cf. A316868.

%K nonn,base,easy

%O 0,15

%A _Cino Hilliard_, Jan 31 2003

%E a(78)-a(79) corrected by _Georg Fischer_, Apr 26 2021