login
A244068
Consider a number of k digits n = d_(k)*10^(k-1) + d_(k-1)*10^(k-2) + … + d_(2)*10 + d_(1). Sequence lists the numbers n such that Sum_{i=1..k-1}{sigma(Sum_{j=1..i}{d_(j)*10^(j-1)})} = Sum_{i=1..k-1}{phi(Sum_{j=1..i}{d_(k-j+1)*10^(i-j)})} (see example below).
3
11, 12, 35, 38, 57, 59, 152, 599, 2812, 3419, 3915, 6733, 11671, 16706, 16714, 16858, 25303, 26752, 128257, 171762, 238571, 265872, 345715, 375923, 486141, 496975, 573433, 1492832, 2324671, 2944061
OFFSET
1,1
EXAMPLE
If n = 345715, starting from the least significant digit, let us cut the number into the set {5, 15, 715, 5715, 45715}. We have:
phi(5) = 4;
phi(15) = 8;
phi(715) = 480;
phi(5715) = 3024;
phi(45715) = 35520.
Then, starting from the most significant digit, let us cut the number into the set {3, 34, 345, 3457, 34571}. We have:
sigma(3) = 4;
sigma(34) = 54;
sigma(345) = 576;
sigma(3457) = 3458;
sigma(34571) = 34944.
Finally, 4 + 8 + 480 + 3024 + 35520 = 4 + 54 + 576 + 3458 + 34944 = 39036.
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+sigma(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 a=b then print(n); fi; od; end: P(10^9);
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Jun 19 2014
STATUS
approved