%I #11 Jun 01 2019 14:17:16
%S 1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,1,0,0,1,0,
%T 0,0,2,0,2,0,0,1,0,1,1,0,0,1,0,0,1,1,1,0,0,1,0,0,1,2,0,0,0,1,1,0,2,1,
%U 1,0,0,2,0,0,1,0,0,2,2,4,1,1,1,1,0,0,0,1,0,0,1,0,1,1,1,2,1,2,5,0
%N Number of occurrences of the string n in n! (A000142).
%C a(A033180(n)) > 0. - _Reinhard Zumkeller_, Aug 23 2008
%H T. D. Noe, <a href="/A067109/b067109.txt">Table of n, a(n) for n=1..1000</a>
%e a(4) = 1 as 4! = 24 and 4 occurs once;
%e a(5) = 0 as 5! = 120 does not contain a 5;
%e a(20) = 1 as 20! = 2432902008176640000 and 20 occurs once.
%t Table[ Length[ StringPosition[ ToString[n! ], ToString[n]]], {n, 1, 75} ]
%t Table[SequenceCount[IntegerDigits[n!],IntegerDigits[n],Overlaps->True],{n,100}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jun 01 2019 *)
%o (Haskell)
%o import Data.List (tails, isPrefixOf)
%o a067109 n = sum $
%o map (fromEnum . (show n `isPrefixOf`)) (tails $ show $ a000142 n)
%o -- _Reinhard Zumkeller_, Aug 28 2014
%Y Cf. A000142, A033180.
%K nonn,base
%O 1,37
%A _Amarnath Murthy_, Jan 08 2002
%E More terms from _Robert G. Wilson v_, Jan 09 2002