Am I divisible by double the sum of my digits? Given a positive integer as input, your task is to output a truthy value if the number is divisible by the double of the sum of its digits, and a falsy value otherwise (OEIS A134516). In other words:
(sum_of_digits)*2 | number


Instead of truthy / falsy values for the true and false cases, you may instead specify any finite set of values for the true/false case, and their complement the other values. For a simple example, you may use 0 for the true case and all other numbers for the false case (or vice versa, if you like).

Standard input and output rules apply. Default Loopholes also apply.

You can take input as an integer or as the string representation of that integer.

This is code-golf, hence the shortest code in bytes wins!

I am new to PPCG, so I would like you to post an explanation if it's possible.



Test Cases

Input - Output - (Reason)

80  - Truthy - (16 divides 80)
100 - Truthy - (2 divides 100)
60  - Truthy - (12 divides 60)
18 - Truthy - (18 divides 18)
12 - Truthy - (6 divides 12)

4 - Falsy - (8 does not divide 4)
8 - Falsy - (16 does not divide 8)
16  - Falsy  - (14 does not divide 16)
21 - Falsy - (6 does not divide 21)
78  - Falsy  - (30 does not divide 78)
110 - Falsy - (4 does not dide 110)
111 - Falsy - (6 does not divide 111)
390 - Falsy  - (24 does not divide 390)
JavaScript (ES6), 31 29 27 bytes

Takes input as a string. Returns zero for truthy and non-zero for falsy.

n=&gt;n%eval([...n+n].join`+`)


Commented

n =&gt; n % eval([...n + n].join`+`)
n =&gt;                                   // take input string n  -&gt; e.g. "80"
                  n + n                // double the input     -&gt; "8080"
              [...     ]               // split                -&gt; ["8", "0", "8", "0"]
                        .join`+`       // join with '+'        -&gt; "8+0+8+0"
         eval(                  )      // evaluate as JS       -&gt; 16
     n %                               // compute n % result   -&gt; 80 % 16 -&gt; 0


Test cases



let f =

n=&gt;n%eval([...n+n].join`+`)

console.log('[Truthy]');
console.log(f("80"))
console.log(f("100"))
console.log(f("60"))
console.log(f("18"))
console.log(f("12"))

console.log('[Falsy]');
console.log(f("4"))
console.log(f("8"))
console.log(f("16"))
console.log(f("21"))
console.log(f("78"))
console.log(f("110"))
console.log(f("111"))
console.log(f("390"))