OFFSET
1,6
COMMENTS
a(p) = 0, iff p is a prime. This is a generalization of sequence A110416.
EXAMPLE
a(6) = 3!/(C(6,1)) + 4!/(C(6,1)) + 5!/(C(6,3)) = 1 + 4 + 6 = 11.
PROG
;; PLT DrScheme. (Zucker)
;; (! n), (binom n r) have the obvious definitions
;; (min-list a-list) produces 0 if the list is empty.
(define (A110417 n)
(local ((define (smallest-C-n-r-quotient kfactorial)
(min-list (filter integer?
(build-list (quotient n 2)
(lambda (r) (/ kfactorial (binom n (add1 r)))))))))
(apply + (build-list n (lambda (k) (smallest-C-n-r-quotient (! k)))))))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Aug 01 2005
EXTENSIONS
Corrected and extended by Joshua Zucker, May 10 2006
STATUS
approved