OFFSET
1,1
COMMENTS
No single-digit terms are permitted. - Harvey P. Dale, Mar 08 2015
EXAMPLE
If n = 423775, starting from the least significant digit, let us cut the number into the set {5, 75, 775, 3775, 23775}. We have:
sigma(5) = 6;
sigma(75) = 124;
sigma(775) = 992;
sigma(3775) = 4712;
sigma(23775) = 39432.
Then, starting from the most significant digit, let us cut the number into the set {4, 42, 423, 4237, 42377}. We have:
phi(4) = 2;
phi(42) = 12;
phi(423) = 276;
phi(4237) = 3996;
phi(42377) = 40980.
Finally, 6 + 124 + 992 + 4712 + 39432 = 2 + 12 + 276 + 3996 + 40980 = 45266.
MAPLE
with(numtheory); P:=proc(q) local a, b, k, n; for n from 10 to q do
a:=0; k:=1; while trunc(n/10^k)>0 do a:=a+phi(trunc(n/10^k)); k:=k+1; od;
b:=0; k:=1; while (n mod 10^k)<n do b:=b+sigma(n mod 10^k); k:=k+1; od;
if a=b then print(n); fi; od; end: P(10^9);
MATHEMATICA
dsepQ[n_]:=Module[{idn=IntegerDigits[n], len}, len=Length[idn]-1; Total[ DivisorSigma[1, #]&/@(FromDigits/@Table[Take[idn, -k], {k, If[Last[idn] == 0, 2, 1], len}])]==Total[EulerPhi/@(FromDigits/@Table[Take[idn, i], {i, len}])]]; Select[Range[10, 10^6], dsepQ] (* Harvey P. Dale, Mar 08 2015 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Jun 19 2014
EXTENSIONS
Corrected (a(18) added) by Harvey P. Dale, Mar 08 2015
STATUS
approved