Antti Karttunen, <a href="/A326198/b326198_1.txt">Table of n, a(n) for n = 1..16384</a>
Antti Karttunen, <a href="/A326198/b326198_1.txt">Table of n, a(n) for n = 1..16384</a>
proposed
approved
editing
proposed
A326198aux(n, xs) = { xs = setunion([n], xs); if(1==n, xs, my(a=gcd(n, eulerphi(n)), b=n-eulerphi(n)); xs = A326198aux(a, xs); A326198aux(b, xs)); };
Antti Karttunen, <a href="/A326198/b326198_1.txt">Table of n, a(n) for n = 1..6553716384</a>
A326198aux(n, xs) = { xs = setunion([n], xs); if(1==n, xs, my(a=gcd(n, eulerphi(n)), b=n-eulerphi(n)); xs = A326198aux(a, xs); A326198aux(b, xs)); };
Antti Karttunen, <a href="/A326198/a326198.txt">Data supplement: n, a(n) computed for n = 1..100000</a>
nonn,look,new
A326198aux(n, xs) = { xs = setunion([n], xs); if(1==n, xs, my(a=gcd(n, eulerphi(n)), b=n-eulerphi(n)); xs = A326198aux(a, xs); if((a==b), xs, A326198aux(b, xs))); };
A326198aux(n, xs) = if(vecsearch(xs, n), xs, xs = setunion([n], xs); if(1==n, xs, my(a=gcd(n, eulerphi(n)), b=n-eulerphi(n)); xs = A326198aux(a, xs); if((a==b), xs, A326198aux(b, xs))));
approved
editing