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 A268711 #7 Feb 13 2016 23:17:50 %S A268711 1,2,3,5,7,4,11,15,6,10,9,14,8,22,23,31,30,13,21,19,12,29,17,20,18,45, %T A268711 47,28,16,44,63,61,46,27,62,43,39,60,26,25,59,35,42,38,24,58,41,37,34, %U A268711 91,40,95,57,36,90,33,89,94,127,123,56,32,88,93,55,125,126,122,87,79,92,121,54,53,51,124,86,78,120 %N A268711 Permutation of natural numbers: a(1) = 1, a(A268677(n)) = 2*a(n), a(A268678(n+1)) = 1+(2*a(n)). %H A268711 Antti Karttunen, <a href="/A268711/b268711.txt">Table of n, a(n) for n = 1..16384</a> %H A268711 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A268711 a(1) = 1, for n > 1: if A268680(n) = A268680(n-1) [when n is in A268677] a(n) = 2*a(n-A268680(n)), otherwise [when n is in A268678] a(n) = 1 + 2*a(A268680(n)-1). %o A268711 (Scheme, with memoization-macro definec) %o A268711 (definec (A268711 n) (cond ((= 1 n) n) ((zero? (- (A268680 n) (A268680 (- n 1)))) (* 2 (A268711 (- n (A268680 n))))) (else (+ 1 (* 2 (A268711 (- (A268680 n) 1))))))) %Y A268711 Inverse: A268712. %Y A268711 Cf. A268677, A268678, A268680. %K A268711 nonn %O A268711 1,2 %A A268711 _Antti Karttunen_, Feb 11 2016