login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078670 Number of times n appears among the decimal digits of (n!)!. 0

%I #10 Dec 15 2017 17:36:09

%S 1,1,0,4,21,169,1504,15755,177333,213789

%N Number of times n appears among the decimal digits of (n!)!.

%e a(4)=4 because 4 appears four times in (4!)! = 620448401733239439360000.

%t Table[Count[Partition[IntegerDigits[(n!)!],IntegerLength[n],1], IntegerDigits[ n]],{n,10}] (* _Harvey P. Dale_, May 19 2014 *)

%t Table[SequenceCount[IntegerDigits[(n!)!],IntegerDigits[n]],{n,10}] (* The program uses the SequenceCount function from Mathematica version 10 *) (* _Harvey P. Dale_, Aug 08 2016 *)

%o (PARI) {mdcp(d,n)=local(a, c=0,L); L=length(Str(d)); if(L>1,a=2,a=1); while(n>0,if(n%(10^a)==d,n=floor(n/10); c++,n=floor(n/10); )); c } for(n=1,10,print1(mdcp(n,n!!)","))

%Y Cf. A000197.

%K base,more,nonn

%O 1,4

%A _Jason Earls_, Dec 16 2002

%E Added a(9) and a(10). - Ryan Leonel (ryan.leonel(AT)gmail.com), Oct 03 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)