This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A246678 #9 Sep 11 2014 18:57:35 %S A246678 1,2,3,4,5,8,7,6,9,14,11,24,17,26,15,10,13,20,19,34,29,44,23,48,49,32, %T A246678 35,124,53,80,31,12,21,74,27,54,41,62,39,76,69,38,59,174,89,134,47, %U A246678 120,97,50,99,64,65,98,71,342,249,104,107,624,161,242,63,16,25,56,43,244,149,224,55,90,109,68,83 %N A246678 Permutation of natural numbers: a(1) = 1, a(2n+1) = 1 + 2*a(n), a(2n) = A242378(A001511(n), (1+A000265(n))) - 1. %C A246678 See the comments in A246676. This is a similar permutation, except for odd numbers, which are here recursively permuted by the emerging permutation itself. The even bisection halved gives A246680, the odd bisection from a(3) onward with one subtracted and then halved gives this sequence back. %H A246678 Antti Karttunen, <a href="/A246678/b246678.txt">Table of n, a(n) for n = 1..8192</a> %H A246678 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A246678 a(1) = 1, a(2n+1) = 1 + 2*a(n), a(2n) = A242378(A001511(n), (1+A000265(n))) - 1. [Where the bivariate function A242378(k,n) changes each prime p(i) in the prime factorization of n to p(i+k), i.e., it's the result of A003961 iterated k times starting from n]. %o A246678 (Scheme, with memoization-macro definec) %o A246678 (definec (A246678 n) (cond ((<= n 1) n) ((odd? n) (+ 1 (* 2 (A246678 (/ (- n 1) 2))))) (else (+ -1 (A242378bi (A007814 n) (+ 1 (A000265 n))))))) ;; Code for A242378bi given in A242378. %Y A246678 Inverse: A246677. %Y A246678 Variants: A246676, A246684. %Y A246678 Even bisection halved: A246680. %Y A246678 Cf. A000265, A001511, A003961, A242378. %K A246678 nonn %O A246678 1,2 %A A246678 _Antti Karttunen_, Sep 01 2014