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 A254117 #10 Jun 06 2017 10:33:24 %S A254117 1,2,3,6,5,4,10,7,11,21,9,31,16,15,23,27,63,13,43,8,19,53,14,37,45,47, %T A254117 95,26,22,17,511,127,12,91,39,18,85,62,29,2047,30,38,111,20,54,75,42, %U A254117 55,157,35,46,174,25,79,24,59,77,303,123,94,78,167,87,223,61,103,699,191,41,107,183,125,431,28,71,84,60,93,110,767,51 %N A254117 Permutation of natural numbers: a(n) = A254104(A249746(1+n)-1). %H A254117 Antti Karttunen, <a href="/A254117/b254117.txt">Table of n, a(n) for n = 1..8192</a> %H A254117 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A254117 a(n) = A254104(A249746(1+n)-1). %F A254117 a(n) = (A254115((2*n)+1)-1) / 2. [Obtained also from the odd bisection of A254115.] %o A254117 (Scheme, two versions) %o A254117 (define (A254117 n) (A254104 (+ -1 (A249746 (+ 1 n))))) %o A254117 (define (A254117 n) (/ (+ -1 (A254115 (+ 1 n n))) 2)) %o A254117 (Python) %o A254117 from sympy import factorint, nextprime %o A254117 from operator import mul %o A254117 def a048673(n): %o A254117 f = factorint(n) %o A254117 return 1 if n==1 else (1 + reduce(mul, [nextprime(i)**f[i] for i in f]))/2 %o A254117 def a254104(n): %o A254117 if n==0: return 0 %o A254117 if n%3==0: return 1 + 2*a254104(2*n/3 - 1) %o A254117 elif n%3==1: return 1 + 2*a254104(2*(n - 1)/3) %o A254117 else: return 2*a254104((n - 2)/3 + 1) %o A254117 def a254115(n): return a254104(a048673(n)) %o A254117 def a(n): return (a254115(2*n + 1) - 1)/2 # _Indranil Ghosh_, Jun 06 2017 %Y A254117 Inverse: A254118. %Y A254117 Other related permutations: A249746, A254104, A254115. %K A254117 nonn %O A254117 1,2 %A A254117 _Antti Karttunen_, Feb 05 2015