OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Angelini, Quick and fun permutation, SeqFan list, Sep 29 2014
MATHEMATICA
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 *)
PROG
(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
(Haskell)
import Data.List (delete)
a248024 n = a248024_list !! (n-1)
a248024_list = 1 : f 1 [2..] where
f x zs = g zs where
g (y:ys) = if x `mod` (a000030 y) == 0
then y : f y (delete y zs) else g ys
-- Reinhard Zumkeller, Sep 30 2014
CROSSREFS
KEYWORD
AUTHOR
Eric Angelini and M. F. Hasler, Sep 29 2014
STATUS
approved