OFFSET
1,2
COMMENTS
a(a(n)) = A143694(n).
LINKS
FORMULA
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*k-1 od:
seq(A[k], k=1..N); # Robert Israel, Jul 27 2014
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]]] = 2k-1, {k, 1, Length[evens]}];
Array[a, m] (* Jean-François Alcover, Mar 09 2019, from Maple *)
PROG
(MIT/GNU Scheme) (define (A143692 n) (if (= 1 (A066829 n)) (* 2 (A055038 n)) (-1+ (* 2 (A055037 n)))))
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a243692 = (+ 1) . fromJust . (`elemIndex` a143691_list)
-- Reinhard Zumkeller, Aug 07 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 29 2008
EXTENSIONS
Name changed by Antti Karttunen, Jul 27 2014
STATUS
approved