login
a(1) = 1, n>1: a(n) = smallest m<>n and not occurring earlier such that m has as many prime-factors as n has (with repetition).
2

%I #9 Mar 30 2012 18:50:48

%S 1,3,2,6,7,4,5,12,10,9,13,8,11,15,14,24,19,20,17,18,22,21,29,16,26,25,

%T 28,27,23,42,37,48,34,33,38,40,31,35,46,36,43,30,41,45,44,39,53,32,51,

%U 52,49,50,47,56,57,54,55,62,61,81,59,58,66,96,69,63,71,70,65,68,67,80

%N a(1) = 1, n>1: a(n) = smallest m<>n and not occurring earlier such that m has as many prime-factors as n has (with repetition).

%C a(a(n))=n: a self-inverse permutation with A001222(a(n))=A001222(n).

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%o Contribution from _Franklin T. Adams-Watters_, Apr 16 2009: (Start)

%o (PARI) invect(v,n,x)=for(i=1,n,if(v[i]==x,return(1)));0

%o nextnew(v,n)=local(k);k=1;while(!R(n,k)||invect(v,n-1,k),k++);k

%o newvect(n)=local(v);v=vector(n);for(k=1,n,v[k]=nextnew(v,k));v

%o R(n,m)=bigomega(n)==bigomega(m)&&n!=m||n==1&&m==1

%o newvect(80) (End)

%Y Cf. A094681, A159588. [From _Franklin T. Adams-Watters_, Apr 16 2009]

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Nov 25 2004

%E Values through a(72) verified by [From _Franklin T. Adams-Watters_, Apr 16 2009]