1,2

Antti Karttunen, Table of n, a(n) for n = 1..8192

Index entries for sequences that are permutations of the natural numbers

a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A268674(2n+1)-1).

(Scheme, with memoization-macro definec)

(definec (A269866 n) (cond ((<= n 1) n) ((even? n) (* 2 (A269866 (/ n 2)))) (else (+ 1 (* 2 (A269866 (- (A268674 n) 1)))))))

Inverse: A269865.

Cf. A268674.

Related or similar permutations: A269867, A249813, A252756, A270196.

Differs from similarly constructed A246376 for the first time at n=21, where a(21) = 19, instead of 15.

Sequence in context: A222253 A269838 A246376 * A246375 A269865 A269387

Adjacent sequences: A269863 A269864 A269865 * A269867 A269868 A269869

nonn

Antti Karttunen, Mar 12 2016

approved