OFFSET
1,2
COMMENTS
This is a permutation of the positive integers with a(a(n)) = n.
Does every positive rational occur as a value of a(n)/n?
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10000
MATHEMATICA
a = {1}; Do[AppendTo[a, Complement[Select[Range[Max[a] + 2 n], GCD[#, n] > 1 &], a, {n}][[1]]], {n, 2, 71}]; a (* Ivan Neretin, Jul 09 2015 *)
PROG
(PARI) va(n) = local(v); v=vector(n); v[1]=1; for(k=2, n, v[k]=na(v, k)); v
na(v, k) = for(i=1, 2*k, if(gcd(i, k)>1&&i!=k, if(!inv(v, k-1, i), return(i))))
inv(v, k, x) = for(i=1, k, if(v[i]==x, return(1))); return(0)
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Apr 05 2009
STATUS
approved