OFFSET
1,2
COMMENTS
Sequence is a permutation of the positive integers.
LINKS
EXAMPLE
Of the positive integers (4,5,7,8,9,10,11,...) not among the first 4 terms of the sequence, 10 is the smallest which is divisible by a different number of distinct primes than a(4) = 3. So a(5) = 10.
MATHEMATICA
a = {1}; Do[k = 2; While[Nand[FreeQ[a, k], PrimeNu[k] != PrimeNu[a[[i - 1]]]], k++]; AppendTo[a, k], {i, 2, 72}]; a (* Michael De Vlieger, Sep 28 2017 *)
PROG
(Haskell)
import Data.List (delete)
a109465 n = a109465_list !! (n-1)
a109465_list = f 1 [1..] where
f o xs = g xs where
g (z:zs) = if o' == o then g zs else z : f o' (delete z xs)
where o' = a001221 z
-- Reinhard Zumkeller, Aug 07 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 28 2005
EXTENSIONS
Extended by Ray Chandler, Aug 28 2005
STATUS
approved