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 A143691 #12 Apr 10 2018 14:38:41 %S A143691 1,2,4,3,6,5,9,7,10,8,14,11,15,12,16,13,21,17,22,18,24,19,25,20,26,23, %T A143691 33,27,34,28,35,29,36,30,38,31,39,32,40,37,46,41,49,42,51,43,54,44,55, %U A143691 45,56,47,57,48,58,50,60,52,62,53,64,59,65,61,69,63,74,66,77,67,81,68 %N A143691 Lexicographically earliest permutation of the natural numbers having alternating even and odd numbers of prime factors. %C A143691 A066829(a(n)*a(n+1)) = 1; n mod 2 + A001222(a(n)) = 1; %C A143691 a(2*n) = A026424(n); a(2*n-1) = A028260(n); %C A143691 a(a(n)) = A143693(n). %H A143691 Reinhard Zumkeller, <a href="/A143691/b143691.txt">Table of n, a(n) for n = 1..10000</a> %H A143691 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %o A143691 (Haskell) %o A143691 import Data.List (delete) %o A143691 a143691 n = a143691_list !! (n-1) %o A143691 a143691_list = f 1 [1..] where %o A143691 f m xs = g xs where %o A143691 g (z:zs) = if m + m' /= 1 then g zs else z : f m' (delete z xs) %o A143691 where m' = a001222 z `mod` 2 %o A143691 -- _Reinhard Zumkeller_, Aug 07 2014 %Y A143691 Cf. A143692 (inverse), A001222, A066829, A026424, A028260, A143693, A109465. %K A143691 nonn %O A143691 1,2 %A A143691 _Reinhard Zumkeller_, Aug 29 2008