OFFSET
1,1
COMMENTS
3-digit numbers abc must be divisible by a+b+c and a-b-c.
4-digit numbers abcd must be divisible by a+b+c+d and a-b-c-d, ....
LINKS
Derek Orr, Table of n, a(n) for n = 1..10000
EXAMPLE
102 is a term because 102 is divisible by 1+0+2 and it is divisible by 1-0-2.
MAPLE
filter:= proc(n)
local A, s, d;
A:= convert(n, base, 10);
s:= convert(A, `+`);
d:= 2*A[1]-s;
d <> 0 and n mod s = 0 and n mod d = 0;
end proc:
select(filter, [$10 .. 1000]); # Robert Israel, Aug 12 2014
PROG
(Magma) [n: n in [10..500] | not IsZero(u) and IsDivisibleBy(n, &+t) and IsDivisibleBy(n, u) where u is 2*t[#t]-&+t where t is Intseq(n)]; // Bruno Berselli, Aug 13 2013
(PARI)
for(n=10, 10^3, d=digits(n); if(sumdigits(n)!=2*d[1], if(n%sumdigits(n)==0&&n%(sumdigits(n)-2*d[1])==0, print1(n, ", ")))) \\ Derek Orr, Aug 12 2014
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Derek Orr, Aug 04 2013
STATUS
approved