OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
E. Angelini, Fun and quick permutation (with a digital root), SeqFan list, Sep 29 2014.
MATHEMATICA
Nest[Append[#, Block[{k = 1, r = Mod[#[[-1]], 9] + 9 Boole[Mod[#[[-1]], 9] == 0]}, While[Nand[FreeQ[#, k], IntegerDigits[k][[1]] == r], k++]; k]] &, {1}, 73] (* Michael De Vlieger, Oct 15 2020 *)
PROG
(PARI) a(n, S=1, u=2)={for(i=1, n, print1(S", "); S=(S-1)%9+1; for(k=1, 9e9, bittest(u, k)&&next; S==digits(k)[1]||next; u+=1<<S=k; break)); S}
(Haskell)
import Data.List (delete)
a248025 n = a248025_list !! (n-1)
a248025_list = 1 : f 1 [2..] where
f x zs = g zs where
g (y:ys) = if a000030 y == a010888 x
then y : f y (delete y zs) else g ys
-- Reinhard Zumkeller, Sep 30 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Sep 29 2014
STATUS
approved