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(n-1).
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
Offset: 1
Keywords
Examples
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.
Links
Programs
-
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
-
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 *)
Extensions
Extended by Ray Chandler, Aug 28 2005
Comments