login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A225742
Numbers >= 10 that are divisible by the sum and difference of their digits.
1
10, 12, 20, 21, 24, 30, 36, 40, 42, 45, 48, 50, 54, 60, 63, 70, 80, 84, 90, 100, 102, 111, 112, 120, 126, 132, 195, 200, 201, 204, 210, 222, 224, 225, 230, 240, 264, 270, 300, 306, 315, 320, 322, 324, 333, 336, 342, 351, 360, 364, 372, 392, 396, 400
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, ....
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
Sequence in context: A338640 A129845 A075492 * A338855 A221638 A358998
KEYWORD
nonn,base,easy
AUTHOR
Derek Orr, Aug 04 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 11:06 EDT 2024. Contains 376068 sequences. (Running on oeis4.)