login
A265333
Characteristic function for A265334: a(n) = 1 if n >= k! but < 2*k! for some k, 0 otherwise.
4
0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
0
COMMENTS
a(n) = 1 if the initial digit in factorial base representation (A007623) of n is 1, 0 otherwise.
a(n) = 1 if A099563(n) = 1, 0 otherwise.
PROG
(Scheme)
(define (A265333 n) (if (zero? n) n (let loop ((f 1) (i 2)) (let ((nextf (* i f))) (if (> nextf n) (if (< n (* 2 f)) 1 0) (loop nextf (+ 1 i)))))))
CROSSREFS
Cf. also A099563.
Sequence in context: A284935 A118249 A174206 * A159637 A095076 A285080
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 25 2015
STATUS
approved