

A159193


a(n) is the smallest positive integer not yet in the sequence with gcd(n,a(n)) > 1 but a(n) != n; a(1) = 1 by convention.


1



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



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, k1, i), return(i))))
inv(v, k, x) = for(i=1, k, if(v[i]==x, return(1))); return(0)


CROSSREFS

Sequence in context: A074828 A282028 A251561 * A118967 A256508 A059030
Adjacent sequences: A159190 A159191 A159192 * A159194 A159195 A159196


KEYWORD

nonn


AUTHOR

Franklin T. AdamsWatters, Apr 05 2009


STATUS

approved



