login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A159588
a(n) is the smallest number not yet in the sequence with the same number of prime factors as n (with repetition), but relatively prime to n.
3
1, 3, 2, 9, 7, 25, 5, 27, 4, 21, 13, 125, 11, 15, 14, 81, 19, 175, 17, 63, 10, 35, 29, 625, 6, 33, 8, 45, 23, 343, 37, 243, 26, 39, 22, 875, 31, 49, 34, 189, 43, 275, 41, 75, 28, 51, 53, 3125, 38, 99, 46, 105, 47, 1225, 57, 135, 55, 65, 61, 2401, 59, 69, 20, 729, 58, 245, 71
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)=bigomega(n)==bigomega(m)&&gcd(n, m)==1
newvect(80)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved