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 A066194 #52 Jul 01 2022 17:34:23 %S A066194 1,2,4,3,8,7,5,6,16,15,13,14,9,10,12,11,32,31,29,30,25,26,28,27,17,18, %T A066194 20,19,24,23,21,22,64,63,61,62,57,58,60,59,49,50,52,51,56,55,53,54,33, %U A066194 34,36,35,40,39,37,38,48,47,45,46,41,42,44,43,128,127,125,126,121,122 %N A066194 A permutation of the integers (a fractal sequence): a(n) = A006068(n-1) + 1. %C A066194 With an initial zero, inverse of the Gray Code (A003188). See also A006068. - _Robert G. Wilson v_, Jun 22 2014 %C A066194 I suspect the above comment refers to function A105081(n) = 1 + A003188(n - 1), n >= 1. - _Antti Karttunen_, Feb 15 2016 %H A066194 Antti Karttunen, <a href="/A066194/b066194.txt">Table of n, a(n) for n = 1..8192</a> (first 1024 terms from Robert G. Wilson v) %H A066194 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A066194 a(n) = A006068(n-1) + 1, n >= 1. - _Philippe Deléham_, Apr 29 2005 %F A066194 a(n) = A006068(A268717(n)), composition of related permutations. - _Antti Karttunen_, Feb 14 2016 %F A066194 a(n) = 1 + Sum_{j=1..n-1} (1/6)*(-3 + (-1)^A007814(j) + 2^(A007814(j) + 3))*(-1)^(A000120(j) + 1). - _John Erickson_, Oct 18 2018 %e A066194 Third nesting gives {1,2,4,3, 8,7,5,6} by means of joining the lists {1,2,4,3} = second nesting and {8,7,6,5} permuted by {1,2,4,3} giving {8,7,5,6}. %t A066194 Nest[ Join[ #, (Length[ #] + Range[ Length[ #], 1, -1 ])[[ # ]]] &, {1}, 7 ] %t A066194 GrayCode[n_] := BitXor[n, Floor[n/2]]; t = Array[ GrayCode, 1000, 0]; Table[ Position[ t, n], {n, 0, 100}] // Flatten (* _Robert G. Wilson v_, Jun 22 2014 *) %o A066194 (Scheme) (define (A066194 n) (+ 1 (A006068 (- n 1)))) ;; _Antti Karttunen_, Feb 14 2016 %o A066194 (Python) %o A066194 def A066194(n): %o A066194 k, m = n-1, n-1>>1 %o A066194 while m > 0: %o A066194 k ^= m %o A066194 m >>= 1 %o A066194 return k+1 # _Chai Wah Wu_, Jul 01 2022 %Y A066194 Inverse: A105081. %Y A066194 Cf. A003188, A006068, A268717. %K A066194 easy,nonn %O A066194 1,2 %A A066194 _Wouter Meeussen_, Dec 15 2001 %E A066194 Deléham's formula added to the name by _Antti Karttunen_, Feb 14 2016