OFFSET
1,2
COMMENTS
The permutation which rearranges the terms of A002618 into ascending order. - Antti Karttunen, Sep 28 2019
LINKS
FORMULA
From Antti Karttunen, Sep 28 2019: (Start)
(End)
EXAMPLE
a(6) = 5 because 5*phi(5) = 20 = A082473(6).
MATHEMATICA
Block[{nn = 3000, s, t}, s = Array[EulerPhi[#] (Sqrt@ # /. (c_: 1) a_^(b_: 0) :> (c a^b)^2) &, nn]; t = TakeWhile[Union@ s, # <= nn &]; Map[Block[{y = 1}, While[y EulerPhi@ y != #, y++]; y] &, t]] (* Michael De Vlieger, Sep 29 2019, after Bill Gosper at A007913 *)
PROG
(PARI)
up_to = 105;
A327172(n) = { fordiv(n, d, if(eulerphi(d)*d == n, return(d))); (0); };
A194507list(up_to) = { my(v=vector(up_to), k=1); for(n=1, oo, if((v[k]=A327172(n))>0, k++); if(k>up_to, return(v))); };
v194507 = A194507list(up_to);
A194507(n) = v194507[n]; \\ Antti Karttunen, Sep 28 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Franz Vrabec, Aug 27 2011
STATUS
approved