login
Numbers n such that the decimal digits of n-phi(n) are a permutation of those of n.
1

%I #7 Jun 02 2016 09:12:42

%S 91,342,351,627,684,874,950,1824,2114,2318,2715,3051,3171,3172,3402,

%T 3411,4228,6344,6804,7346,8414,8456,8474,9093,9125,9191,9254,9500,

%U 9531,9548,9672,9824,9950,15804,18010,18312,18508,18930,19190,21028,22126,23218,24180,24716

%N Numbers n such that the decimal digits of n-phi(n) are a permutation of those of n.

%H Paolo P. Lava, <a href="/A273799/b273799.txt">Table of n, a(n) for n = 1..1000</a>

%e 91 - phi(91) = 91 - 72 = 19;

%e 342 - phi(342) = 342 - 108 = 234.

%p with(numtheory): P:=proc(q) local a,b,c,d,k,n; for n from 1 to q do a:=n; b:=n-phi(n);

%p if ilog10(a)=ilog10(b) then c:=[]; d:=[]; for k from 1 to ilog10(n)+1 do

%p c:=[op(c),(a mod 10)]; a:=trunc(a/10); d:=[op(d),(b mod 10)]; b:=trunc(b/10); od;

%p c:=sort(c); d:=sort(d); if c=d then print(n); fi; fi; od; end: P(10^25);

%t Select[Range[25000], Sort@ IntegerDigits@ # == Sort@ IntegerDigits[# - EulerPhi@ #] &] (* _Michael De Vlieger_, Jun 01 2016 *)

%Y Cf. A051953, A115921.

%K nonn,easy,base

%O 1,1

%A _Paolo P. Lava_, May 31 2016