login
A348401
a(n) is the least m > 0 such that n = m! / k! for some k <= m.
2
1, 2, 3, 4, 5, 3, 7, 8, 9, 10, 11, 4, 13, 14, 15, 16, 17, 18, 19, 5, 21, 22, 23, 4, 25, 26, 27, 28, 29, 6, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 7, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 8, 57, 58, 59, 5, 61, 62, 63, 64, 65, 66, 67, 68, 69
OFFSET
1,2
COMMENTS
For any n > 0, n appears in the a(n)-th row of A346928.
FORMULA
a(n) <= n.
a(n) < n iff n belongs to A045619 \ {2}.
If n = A045619(k), then a(n) = A137912(k). - R. J. Mathar, Oct 19 2021
PROG
(PARI) See Links section.
(Python)
from math import factorial
def a(n):
f = [factorial(i) for i in range(1, n+1)]
for m, fm in enumerate(f, start=1):
for fk in f[:m]:
if n == fm // fk:
return m
print([a(n) for n in range(1, 70)]) # Michael S. Branicky, Oct 17 2021
CROSSREFS
Sequence in context: A327498 A111615 A358668 * A324932 A348941 A053627
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 17 2021
STATUS
approved