

A109465


a(1)=1; for n>1, a(n) = smallest positive integer not among the earlier terms of the sequence that is divisible by a different number of distinct primes than a(n1).


3



1, 2, 6, 3, 10, 4, 12, 5, 14, 7, 15, 8, 18, 9, 20, 11, 21, 13, 22, 16, 24, 17, 26, 19, 28, 23, 30, 25, 33, 27, 34, 29, 35, 31, 36, 32, 38, 37, 39, 41, 40, 42, 43, 44, 47, 45, 49, 46, 53, 48, 59, 50, 60, 51, 61, 52, 64, 54, 66, 55, 67, 56, 70, 57, 71, 58, 73, 62, 78, 63, 79, 65
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Sequence is a permutation of the positive integers.


LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for sequences that are permutations of the natural numbers


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.


PROG

(Haskell)
import Data.List (delete)
a109465 n = a109465_list !! (n1)
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

Cf. A001221.
Cf. A241012 (inverse), A143691.
Sequence in context: A079297 A276941 A143219 * A090705 A208547 A167979
Adjacent sequences: A109462 A109463 A109464 * A109466 A109467 A109468


KEYWORD

nonn


AUTHOR

Leroy Quet, Aug 28 2005


EXTENSIONS

Extended by Ray Chandler, Aug 28 2005


STATUS

approved



