OFFSET
1,2
COMMENTS
This is a self-inverse permutation of the positive integers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..5000
Rémy Sigrist, Scatterplot of (n, a(n)) for n, a(n) <= 25000
PROG
(PARI) invect(v, n, x)=for(i=1, n, if(v[i]==x, return(1))); 0
nextnew(v, n)=local(k); k=1; while(!R(n, k)||invect(v, n-1, k), k++); k
newvect(n)=local(v); v=vector(n); for(k=1, n, v[k]=nextnew(v, k)); v
R(n, m)=bigomega(n)==bigomega(m)&&gcd(n, m)==1
newvect(80)
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Apr 16 2009
STATUS
approved