|
|
A248024
|
|
Lexicographically earliest permutation of the positive integers such that the first digit of a(n+1) divides a(n).
|
|
5
|
|
|
1, 10, 2, 11, 12, 3, 13, 14, 7, 15, 5, 16, 4, 17, 18, 6, 19, 100, 20, 21, 30, 22, 23, 101, 102, 24, 8, 25, 50, 26, 27, 9, 31, 103, 104, 28, 29, 105, 32, 40, 41, 106, 107, 108, 33, 34, 109, 110, 51, 35, 52, 42, 36, 37, 111, 38, 112, 43, 113, 114, 39, 115, 53, 116, 44, 45, 54, 60
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
E. Angelini, Quick and fun permutation, SeqFan list, Sep 29 2014
Index entries for sequences that are permutations of the natural numbers
|
|
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
|
Cf. A248043 (inverse), A000030.
Sequence in context: A323821 A351840 A257277 * A269631 A334737 A334837
Adjacent sequences: A248021 A248022 A248023 * A248025 A248026 A248027
|
|
KEYWORD
|
nonn,base,look
|
|
AUTHOR
|
Eric Angelini and M. F. Hasler, Sep 29 2014
|
|
STATUS
|
approved
|
|
|
|