OFFSET
1,1
EXAMPLE
Sum of digits of 1779 is 1+7+7+9=24.
Anti-divisors of 1779 are 2, 6, 1186 and their digits’ sum is 2+6+1+1+8+6=24.
MAPLE
with(numtheory);
A213239:=proc(q)
local a, b, c, d, k, n;
for n from 1 to q do
a:=0; b:=0;
for k from 2 to n-1 do
if abs((n mod k)-k/2)<1 then
c:=k; while c>0 do b:=b+(c mod 10); c:=trunc(c/10); od; fi; od;
c:=n; d:=0; while c>0 do d:=d+(c mod 10); c:=trunc(c/10); od;
if b=d then print(n); fi; od; end:
A213239(100000);
PROG
(Python)
[n for n in range(1, 10**5) if sum([sum([int(x) for x in str(d)]) for d in range(2, n) if n % d and 2*n % d in [d-1, 0, 1]]) == sum([int(x) for x in str(n)])] # Chai Wah Wu, Aug 08 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Jun 07 2012
STATUS
approved