[go: up one dir, main page]

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!)
A072204 a(n) is the smallest integer k whose factorial contains exactly n 7's, or 0 if no such number exists. 9
6, 14, 18, 31, 49, 22, 54, 48, 56, 71, 82, 72, 86, 81, 92, 97, 87, 122, 91, 119, 131, 112, 121, 140, 104, 152, 144, 173, 127, 157, 172, 201, 227, 179, 200, 187, 183, 210, 236, 221, 193, 217, 279, 212, 213, 235, 238, 289, 265, 228, 256, 261, 250, 242, 285, 307 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..148
Michael S. Branicky, Table of n, a(n) for n = 0..1000 with presumed 0 values listed (search bound 93000)
EXAMPLE
a(2) = 14 since the 14th factorial, i.e., 14! = 87178291200, contains exactly two 7's.
MATHEMATICA
Do[k = 1; While[ Count[IntegerDigits[k! ], 7] != n, k++ ]; Print[k], {n, 1, 60}]
PROG
(Python)
def a(n, bound=10**4):
k = f = 1
while not str(f).count('7') == n and k <= bound: k += 1; f *= k
return k * (k <= bound)
print([a(n) for n in range(1, 149)]) # Michael S. Branicky, Jun 14 2021
CROSSREFS
Sequence in context: A156858 A032500 A053474 * A037177 A351975 A255217
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 August 29 11:13 EDT 2024. Contains 375512 sequences. (Running on oeis4.)