login
A072124
a(n)-th factorial is the smallest factorial containing exactly n 1's, or 0 if no such number exists.
10
1, 14, 19, 25, 32, 40, 33, 60, 63, 47, 68, 64, 74, 87, 79, 73, 97, 110, 107, 132, 134, 129, 116, 136, 123, 113, 145, 143, 160, 180, 153, 171, 185, 176, 224, 209, 196, 207, 229, 221, 211, 167, 236, 252, 260, 201, 235, 274, 249, 231, 246, 284, 199, 273, 294, 267
OFFSET
1,2
COMMENTS
By checking the factorials of all the numbers below 10^6, it is conjectured that up to 10^4 there are 746 values of n for which a(n) = 0: n = 84, 164, 167, 169, 182, ... (see the link for more values). - Amiram Eldar, Sep 01 2020
EXAMPLE
a(2) = 14 since the 14th factorial, i.e., 14! = 87178291200, contains exactly two 1's.
MATHEMATICA
Do[k = 1; While[ Count[IntegerDigits[k! ], 1] != n, k++ ]; Print[k], {n, 1, 60}]
Module[{f=Table[{n, DigitCount[n!, 10, 1]}, {n, 500}]}, Table[SelectFirst[ f, #[[2]] == k&], {k, 60}]][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 27 2019 *)
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, Jul 30 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jul 31 2002
STATUS
approved