login
A096115
If n = (2^k)-1, a(n) = a((n+1)/2) = k, if n = 2^k, a(n) = a(n-1)+1 = k+1, otherwise a(n) = (A000523(n)+1)*a(A035327(n-1)).
6
1, 2, 2, 3, 6, 6, 3, 4, 12, 24, 24, 12, 8, 8, 4, 5, 20, 40, 40, 60, 120, 120, 60, 20, 15, 30, 30, 15, 10, 10, 5, 6, 30, 60, 60, 90, 180, 180, 90, 120, 360, 720, 720, 360, 240, 240, 120, 30, 24, 48, 48, 72, 144, 144, 72, 24, 18, 36, 36, 18, 12, 12, 6, 7, 42, 84, 84, 126
OFFSET
1,2
COMMENTS
A fractal sequence. For k in range [1,(2^n)-1], a(2^n + k)/a(2^n - k) = n+1. Each n > 1 occurs 2*A045778(n) times in the sequence.
PROG
(Scheme:) (define (A096115 n) (cond ((pow2? (+ n 1)) (+ 1 (A000523 n))) ((pow2? n) (+ 1 (A096115 (- n 1)))) (else (* (+ (A000523 n) 1) (A096115 (A035327 (- n 1)))))))
(define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1)))))
CROSSREFS
Permutation of A096111, i.e. a(n) = A096111(A122199(n)-1) [Note the different starting offsets]. Cf. A096113, A052330, A096114, A096116.
Sequence in context: A119272 A308483 A070871 * A289838 A290734 A093919
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 30 2004
EXTENSIONS
Edited, extended and Scheme code added by Antti Karttunen, Aug 25 2006
STATUS
approved