OFFSET
1,1
LINKS
Paolo P. Lava and Giovanni Resta, Table of n, a(n) for n = 1..207(terms < 3*10^9, first 50 terms from Paolo P. Lava)
EXAMPLE
For n = 9481 we can consider 9481 = 9 U 481 and sigma(9481) = 10000, sigma(481) = 532, sigma(9) = 13 and 532 - 13 = 519 = 10000 - 9481.
MAPLE
with(numtheory);
T:=proc(t) local w, x, y; x:=t; y:=0; while x>0 do x:=trunc(x/10); y:=y+1; od; end:
P:=proc(q) local a, b, c, d, i, n;
for n from 1 to q do a:=sigma(n); b:=T(n);
for i from 1 to b-1 do c:=trunc(n/10^i); d:=n-c*10^i;
if abs(sigma(c)-sigma(d))=a-n then print(n); break; fi;
od; od; end: P(10^9);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Mar 21 2014
STATUS
approved