login
A258199
a(n) = largest term of A001563 <= n.
7
0, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18
OFFSET
0,5
LINKS
FORMULA
a(n) = A001563(A258198(n)).
MATHEMATICA
Table[# #! &@ NestWhile[# + 1 &, 0, # #! <= n &[# + 1] &], {n, 0, 96}] (* Michael De Vlieger, Aug 31 2016 *)
PROG
(Scheme, two variants)
(define (A258199 n) (let loop ((k 1) (f 1)) (if (> (* k f) n) (* (- k 1) (/ f k)) (loop (+ k 1) (* (+ k 1) f)))))
(define (A258199 n) (A001563 (A258198 n)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 23 2015
STATUS
approved