login
A143691
Lexicographically earliest permutation of the natural numbers having alternating even and odd numbers of prime factors.
6
1, 2, 4, 3, 6, 5, 9, 7, 10, 8, 14, 11, 15, 12, 16, 13, 21, 17, 22, 18, 24, 19, 25, 20, 26, 23, 33, 27, 34, 28, 35, 29, 36, 30, 38, 31, 39, 32, 40, 37, 46, 41, 49, 42, 51, 43, 54, 44, 55, 45, 56, 47, 57, 48, 58, 50, 60, 52, 62, 53, 64, 59, 65, 61, 69, 63, 74, 66, 77, 67, 81, 68
OFFSET
1,2
COMMENTS
A066829(a(n)*a(n+1)) = 1; n mod 2 + A001222(a(n)) = 1;
a(2*n) = A026424(n); a(2*n-1) = A028260(n);
a(a(n)) = A143693(n).
PROG
(Haskell)
import Data.List (delete)
a143691 n = a143691_list !! (n-1)
a143691_list = f 1 [1..] where
f m xs = g xs where
g (z:zs) = if m + m' /= 1 then g zs else z : f m' (delete z xs)
where m' = a001222 z `mod` 2
-- Reinhard Zumkeller, Aug 07 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 29 2008
STATUS
approved