A251808 Numbers n such that if m = reverse(phi(n)) then n = reverse(phi(m)).
1, 21, 63, 291, 2744, 2991, 6102, 6711, 46676013, 69460293, 272543398, 896172631
Offset: 1
Examples
phi(2744) = 1176 and reverse(1176) = 6711; phi(6711) = 4472 and reverse(4472) = 2744;
Programs
-
Maple
with(numtheory):T:=proc(w) local x,y,z; x:=0; y:=w; for z from 1 to ilog10(w)+1 do x:=10*x+(y mod 10); y:=trunc(y/10); od; x; end: P:=proc(q) local k,n; for n from 1 to q do if n=T(phi(T(phi(n)))) then print(n); fi; od; end: P(10^12);
-
PARI
for(n=1, 1e9, m=eval(concat(Vecrev(Str(eulerphi(n))))); if(n==eval(concat(Vecrev(Str(eulerphi(m))))), print1(n, ", "))) \\ Felix Fröhlich, Dec 30 2014
Extensions
a(9)-a(12) from Felix Fröhlich, Dec 30 2014
Comments