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 A248024 #25 Dec 23 2024 14:53:44 %S A248024 1,10,2,11,12,3,13,14,7,15,5,16,4,17,18,6,19,100,20,21,30,22,23,101, %T A248024 102,24,8,25,50,26,27,9,31,103,104,28,29,105,32,40,41,106,107,108,33, %U A248024 34,109,110,51,35,52,42,36,37,111,38,112,43,113,114,39,115,53,116,44,45,54,60 %N A248024 Lexicographically earliest permutation of the positive integers such that the first digit of a(n+1) divides a(n). %H A248024 Reinhard Zumkeller, <a href="/A248024/b248024.txt">Table of n, a(n) for n = 1..10000</a> %H A248024 Eric Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2014-September/013710.html">Quick and fun permutation</a>, SeqFan list, Sep 29 2014 %H A248024 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %t A248024 a[1] = 1; a[n_] := a[n] = Block[{k = 2}, While[Mod[a[n - 1], First@IntegerDigits[k]] != 0 || MemberQ[Array[a, n - 1], k], k++]; k]; Array[a, 68] (* _Giorgos Kalogeropoulos_, May 12 2023 *) %o A248024 (PARI) a(n,S=1,u=2)=for(i=1,n,print1(S",");for(k=1,9e9,bittest(u,k)&&next;S%digits(k)[1]&&next;u+=1<<S=k;break));S %o A248024 (Haskell) %o A248024 import Data.List (delete) %o A248024 a248024 n = a248024_list !! (n-1) %o A248024 a248024_list = 1 : f 1 [2..] where %o A248024 f x zs = g zs where %o A248024 g (y:ys) = if x `mod` (a000030 y) == 0 %o A248024 then y : f y (delete y zs) else g ys %o A248024 -- _Reinhard Zumkeller_, Sep 30 2014 %Y A248024 Cf. A248043 (inverse), A000030. %K A248024 nonn,base,look %O A248024 1,2 %A A248024 _Eric Angelini_ and _M. F. Hasler_, Sep 29 2014