login
A262691
Permutation of natural numbers: a(1) = 1; a(A182859(n+1)) = 2*a(n), a(A080218(n)) = 1 + 2*a(n).
3
1, 2, 3, 4, 5, 7, 9, 11, 6, 15, 19, 8, 23, 13, 31, 10, 39, 14, 17, 18, 47, 27, 63, 22, 12, 21, 79, 30, 29, 38, 35, 16, 37, 95, 55, 127, 45, 25, 43, 46, 159, 26, 61, 62, 20, 59, 77, 78, 28, 34, 71, 36, 33, 94, 75, 54, 191, 111, 255, 91, 51, 87, 126, 44, 93, 24, 319, 42, 53, 158, 123, 125, 41, 119, 60, 58, 155, 76, 157, 70, 32, 57, 69, 143, 73, 67, 189, 74, 151, 109, 383, 190, 223, 511
OFFSET
1,2
FORMULA
a(1) = 1; thereafter if A262683(n)=1 [i.e., when n is one of the terms of A182859] then a(n) = 2*a(A262685(n)-1), otherwise a(n) = 1 + 2*a(n-A262685(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A262691 n) (cond ((<= n 1) n) ((zero? (A262684 n)) (* 2 (A262691 (+ -1 (A262685 n))))) (else (+ 1 (* 2 (A262691 (- n (A262685 n))))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 28 2015
STATUS
approved