

A143692


Permutation of natural numbers: If n is kth number with an odd number of prime divisors (counted with multiplicity) [i.e., n = A026424(k)], a(n) = 2*k, otherwise, when n is kth number with an even number of prime divisors [i.e., n = A028260(k)], a(n) = (2*k)1.


4



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



OFFSET

1,2


COMMENTS



LINKS



FORMULA

(End)


MAPLE

N:= 1000: # to get a(1) to a(N)
Odds, Evens:= selectremove(t > numtheory:bigomega(t)::odd, [$1..N]):
for k from 1 to nops(Odds) do A[Odds[k]]:= 2*k od:
for k from 1 to nops(Evens) do A[Evens[k]]:= 2*k1 od:


MATHEMATICA

m = 100;
odds = Select[Range[m], OddQ[PrimeOmega[#]]&];
evens = Select[Range[m], EvenQ[PrimeOmega[#]]&];
Do[a[odds[[k]]] = 2k, {k, 1, Length[odds]}];
Do[a[evens[[k]]] = 2k1, {k, 1, Length[evens]}];


PROG

(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a243692 = (+ 1) . fromJust . (`elemIndex` a143691_list)


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



