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 A163236 #19 Jul 03 2025 20:39:48 %S A163236 0,2,1,4,9,5,13,8,6,11,3,7,24,17,18,12,35,27,43,34,14,20,19,26,62,51, %T A163236 52,42,32,41,25,33,28,37,21,29,58,47,48,38,10,16,15,22,31,23,39,30, %U A163236 112,97,98,84,70,83,59,71,73,61,85,72,40,50,49,60,135,119,151,134,90 %N A163236 Inverse permutation to A163235. %H A163236 Antti Karttunen, <a href="/A163236/b163236.txt">Table of n, a(n) for n = 0..4095</a> %H A163236 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A163236 a(n) = A001477bi(A006068(A059906(n)),A006068(A059905(n))), where A001477bi(x,y) = (((x+y)^2)+x+(3y))/2. %o A163236 (Scheme) (define (A163236 n) (A001477bi (A006068 (A059906 n)) (A006068 (A059905 n)))) %o A163236 (define (A001477bi x y) (/ (+ (expt (+ x y) 2) x (* 3 y)) 2)) %o A163236 (Python) %o A163236 def A(x, y): return (((x + y)**2) + x + 3*y)//2 %o A163236 def a006068(n): %o A163236 s=1 %o A163236 while True: %o A163236 ns=n>>s %o A163236 if ns==0: break %o A163236 n=n^ns %o A163236 s<<=1 %o A163236 return n %o A163236 def a059905(n): return sum([(n>>2*i&1)<<i for i in range(int(len(bin(n)[2:])//2) + 1)]) %o A163236 def a059906(n): %o A163236 x=[int(k) for k in list(bin(n)[2:])][::-1] %o A163236 return sum([x[2*i + 1]*2**i for i in range(len(x)//2)]) %o A163236 def a(n): return A(a006068(a059906(n)), a006068(a059905(n))) %o A163236 print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 25 2017 %Y A163236 Inverse: A163235. a(n) = A163234(A057300(n)). Cf. A163234. %K A163236 nonn %O A163236 0,2 %A A163236 _Antti Karttunen_, Jul 29 2009