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!)
A072178 a(n)-th factorial is the smallest factorial containing exactly n 4's, or 0 if no such number exists. 8
4, 19, 21, 24, 44, 42, 50, 57, 0, 60, 76, 91, 56, 86, 85, 66, 92, 88, 114, 129, 131, 106, 130, 122, 117, 157, 134, 175, 119, 150, 181, 165, 185, 179, 198, 182, 220, 228, 188, 190, 261, 235, 222, 231, 229, 233, 224, 227, 288, 372, 241, 279, 254, 253, 318, 267 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

It is conjectured that a(9) = 0 since no factorial < 10000 contained just 9 fours.

LINKS

Table of n, a(n) for n=1..56.

EXAMPLE

a(2) = 19 since 19th factorial, i.e., 19! = 121645100408832000 contains exactly two 4's.

MATHEMATICA

Do[k = 1; While[ Count[IntegerDigits[k! ], 4] != n, k++ ]; Print[k], {n, 1, 60}]

PROG

(Python)

from math import factorial

def a(n, limit=1000):

  fact = 1

  for t in range(limit+1):

    if str(fact).count('4') == n: return t

    fact *= (t+1)

  return 0

print([a(n) for n in range(1, 57)]) # Michael S. Branicky, Apr 19 2021

CROSSREFS

Cf. A072244, A072220, A072208, A072204, A072200, A072199, A072177, A072163, A072124.

Sequence in context: A165820 A043056 A012879 * A116980 A296602 A022135

Adjacent sequences:  A072175 A072176 A072177 * A072179 A072180 A072181

KEYWORD

base,nonn

AUTHOR

Shyam Sunder Gupta, Jul 30 2002

EXTENSIONS

Edited and extended by Robert G. Wilson v, Jul 31 2002

STATUS

approved

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 May 22 09:50 EDT 2022. Contains 353949 sequences. (Running on oeis4.)