login
Numbers n such that sum of digits of n = sum of digits of n’, where n’ is the arithmetic derivative of n.
2

%I #18 Jun 15 2012 19:40:52

%S 4,22,27,54,56,81,94,108,121,135,166,202,216,243,245,260,265,266,272,

%T 274,308,344,346,355,382,405,445,454,459,513,517,518,526,562,567,594,

%U 634,648,675,702,706,729,784,806,832,837,841,891,913,920,922,945,950,972

%N Numbers n such that sum of digits of n = sum of digits of n’, where n’ is the arithmetic derivative of n.

%H Paolo P. Lava, <a href="/A213240/b213240.txt">Table of n, a(n) for n = 1..10000</a>

%e n=344 and 3+4+4=11; n’=524 and 5+2+4=11.

%p with(numtheory);

%p A213240:=proc(q)

%p local a,b,d,n,p,pfs;

%p for n from 1 to q do

%p pfs:=ifactors(n)[2]; a:=n*add(op(2,p)/op(1,p),p=pfs); b:=0;

%p while a>0 do b:=b+(a mod 10); a:=trunc(a/10); od;

%p a:=n; d:=0; while a>0 do d:=d+(a mod 10); a:=trunc(a/10); od;

%p if b=d then print(n); fi;

%p od; end:

%p A213240(100000000);

%Y Cf. A003415, A006753, A213239

%K nonn,base

%O 1,1

%A _Paolo P. Lava_, Jun 07 2012