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 A222208 #20 Jan 22 2017 13:32:48 %S A222208 1,3,2,6,4,12,5,18,8,24,7,36,9,15,16,54,10,48,11,72,20,21,13,108,28, %T A222208 27,32,30,14,96,17,162,42,60,40,144,19,33,90,216,22,120,23,84,64,39, %U A222208 25,324,35,168,50,270,26,192,56,180,44,126,29,288,31,51,80,486 %N A222208 a(1) = 1, a(2) = 3; for n>2, a(n) = smallest number not in {a(1), ..., a(n-1)} such that a(n) is divisible by a(d) for all divisors d of n. %C A222208 Permutation of the natural numbers A000027 with inverse permutation A222209. %H A222208 Alois P. Heinz, <a href="/A222208/b222208.txt">Table of n, a(n) for n = 1..10000</a> %H A222208 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %p A222208 b:= proc(n) false end: %p A222208 a:= proc(n) option remember; local h, i; %p A222208 if n<3 then h:= 2*n-1 else a(n-1); h:= ilcm(map(a, %p A222208 numtheory[divisors](n) minus {1, n})[]) fi; %p A222208 for i while b(i*h) do od; %p A222208 b(i*h):= true; i*h %p A222208 end: %p A222208 seq(a(n), n=1..100); %t A222208 a[1] = 1; a[2] = 3; a[n_] := a[n] = Module[{d, s, c, k}, d = Divisors[n] ~Complement~ {1, n}; For[s = Sort[Array[a, n-1]]; c = Complement[ Range[ Last[s]], s]; k = If[c == {}, Last[s]+1, First[c]], True, k++, If[FreeQ[s, k], If[AllTrue[d, Divisible[k, a[#]]&], Return[k]]]]]; %t A222208 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jan 22 2017 *) %o A222208 (Haskell) %o A222208 import Data.List (delete) %o A222208 a222208 n = a222208_list !! (n-1) %o A222208 a222208_list = 1 : 3 : f 3 (2 : [4 ..]) where %o A222208 f u vs = g vs where %o A222208 g (w:ws) = if all (== 0) $ map ((mod w) . a222208) $ a027751_row u %o A222208 then w : f (u + 1) (delete w vs) else g ws %o A222208 -- _Reinhard Zumkeller_, Feb 13 2013 %Y A222208 Cf. A000027, A211384, A222209. %Y A222208 Cf. A027751. %K A222208 nonn %O A222208 1,2 %A A222208 _Alois P. Heinz_, Feb 12 2013