OFFSET
1,2
COMMENTS
a(n) = least k such that A232096(k) >= n.
Each a(n) or a(n)+1 is divisible by A060828(n), and similarly for all the higher bases.
If we were instead searching for the first occurrence where A232096 gets a new distinct value, then we would have another sequence, b, which would start as: 1, 3, 4, 15, 32, 224, 575, 4095, ... as those distinct values do not appear in monotone order, being for n>=1, A232096(b(n)) = 1, 3, 2, 5, 4, 7, 6, 8, 9, 10, ...
EXAMPLE
a(5) = 15 as binomial(15 + 1, 2) = 120 is the smallest binomial that is divisible by 5! = 120. - David A. Corneth, Mar 29 2021
PROG
(Scheme)
(define (A232097 n) (let ((increment (* 2 (A060818 n)))) (let loop ((k increment)) (cond ((>= (A232096 (- k 1)) n) (- k 1)) ((>= (A232096 k) n) k) (else (loop (+ k increment)))))))
;; Alternative, very naive and slow version:
(define (A232097v2 n) (let loop ((k 1)) (if (>= (A232096 k) n) k (loop (+ 1 k)))))
(PARI) a(n) = { my(p = 2*n!, f = factor(p), res = oo); for(i = 2^(#f~-1), 2^#f~-1, b = binary(i); pr = prod(j = 1, #f~, f[j, 1]^(b[j]*f[j, 2])); ipr = p/pr; for(j = -1, 0, c = lift(chinese(Mod(-1-j, ipr), Mod(j, pr))); if(c > 0, res = min(res, c)))) res } \\ David A. Corneth, Mar 29 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 18 2013
STATUS
approved