OFFSET
1,1
COMMENTS
a(13) > 10^10. - Giovanni Resta, May 23 2016
EXAMPLE
If n = 217667, starting from the most significant digit, let us cut the number into the set 2, 21, 217, 2176, 21766. We have:
sigma(2) = 3;
sigma(21) = 32;
sigma(217) = 256;
sigma(2176) = 4590;
sigma(21766) = 32652.
Then, starting from the least significant digit, let us cut the number into the set 7, 67, 667, 7667, 17667. We have:
sigma(7) = 8;
sigma(67) = 68;
sigma(667) = 720;
sigma(7667) = 9072;
sigma(17667) = 27664.
Finally,
3 + 32 + 256 + 4590 + 32652 - (8 + 68 + 720 + 9072 + 27664) = 1 = sigma(217667) - 217667.
MAPLE
with(numtheory); P:=proc(q) local a, b, k, n;
for n from 2 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+phi(n mod 10^k); k:=k+1; od;
if phi(n)=a-b then print(n); fi; od; end: P(10^9);
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Paolo P. Lava, Apr 17 2014
EXTENSIONS
a(6)-a(12) from Giovanni Resta, May 23 2016
STATUS
approved