login
A159587
a(n) is the smallest number not yet in the sequence with the same number of distinct prime divisors as n, but relatively prime to n.
3
1, 3, 2, 5, 4, 35, 8, 7, 11, 21, 9, 55, 16, 15, 14, 13, 19, 65, 17, 33, 10, 39, 25, 77, 23, 45, 29, 51, 27, 1001, 32, 31, 20, 57, 6, 85, 41, 63, 22, 69, 37, 715, 47, 75, 26, 87, 43, 91, 53, 93, 28, 95, 49, 115, 12, 99, 34, 111, 61, 1309, 59, 117, 38, 67, 18, 455, 64, 123, 40, 429
OFFSET
1,2
COMMENTS
This is a self-inverse permutation of the positive integers.
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)=omega(n)==omega(m)&&gcd(n, m)==1
newvect(80)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved