login
A273665
a(0) = 0; for n >= 1: if n = A153880(k) for some k, then a(n) = 2*a(k), otherwise, n = A273670(h) for some h, and a(n) = 1 + 2*a(h).
4
0, 1, 2, 3, 5, 7, 4, 11, 6, 15, 9, 23, 10, 13, 14, 31, 19, 47, 21, 27, 29, 63, 39, 95, 8, 43, 22, 55, 59, 127, 12, 79, 30, 191, 17, 87, 18, 45, 46, 111, 119, 255, 25, 159, 61, 383, 35, 175, 20, 37, 26, 91, 93, 223, 28, 239, 62, 511, 51, 319, 38, 123, 94, 767, 71, 351, 41, 75, 53, 183, 187, 447, 42, 57, 54, 479, 125, 1023, 58
OFFSET
0,3
FORMULA
a(0) = 0; for n >= 1: if A257680(A225901(n)) = 0 [i.e., n is one of the terms of A153880], then a(n) = 2*a(A266193(n)), otherwise [when n is one of the terms of A273670], a(n) = 1 + 2*a(A273663(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A273665 n) (cond ((zero? n) n) ((zero? (A257680 (A225901 n))) (* 2 (A273665 (A266193 n)))) (else (+ 1 (* 2 (A273665 (A273663 n)))))))
CROSSREFS
Inverse: A273666.
Related or similar permutations: A255565, A273667.
Sequence in context: A125151 A372130 A302024 * A212646 A377901 A369515
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, May 30 2016
STATUS
approved