login
A231723
a(n) = the difference between the n-th node of the infinite trunk of the factorial beanstalk (A219666(n)) and the smallest integer (A219653(n)) which is as many A219651-iteration steps distanced from the root (zero); a(n) = A219666(n) - A219653(n).
3
0, 0, 0, 1, 1, 2, 0, 1, 3, 1, 2, 0, 1, 2, 4, 0, 0, 1, 3, 4, 2, 1, 1, 2, 1, 0, 1, 3, 1, 2, 0, 1, 2, 4, 0, 0, 1, 3, 4, 2, 1, 1, 2, 1, 0, 0, 1, 3, 2, 4, 0, 0, 1, 3, 4, 2, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 1, 3, 4, 2, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 1, 3, 5, 7, 8, 1, 0
OFFSET
0,6
COMMENTS
For all n, the following holds: A219653(n) <= A219666(n) <= A219655(n). This sequence gives the distance of the node n in the infinite trunk of factorial beanstalk (A219666(n)) from the left (lesser) edge of the A219654(n) wide window which it at that point must pass through.
This sequence relates to the factorial base representation (A007623) in the same way as A218603 relates to the binary system and similar remarks apply here.
LINKS
FORMULA
a(n) = A219666(n) - A219653(n).
A219654(n) = a(n) + A231724(n) + 1.
PROG
(Scheme)
(define (A231723 n) (- (A219666 n) (A219653 n)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 13 2013
STATUS
approved