Is it a Harshad Number? A Harshad number is a number that is divisible by the sum of its digits.  This is obviously dependent on what base the integer is written in.  Base 10 Harshad numbers are sequence A005349 in the OEIS.  

Your Task:

Write a program or function that determines whether a given integer is a Harshad number in a given base.  

Input:

A positive integer &lt;10^9, and a base between 2 and 36, OR, a positive integer in its base, using lowercase letters for the numbers from 11-36 and a base between 2 and 36.  You only have to handle one of these options.  

Output:

A truthy/falsy value indicating whether the first input is a Harshad number in the base of the second input.  

Examples:

27,10 ----------&gt; truthy
8,5 ------------&gt; truthy
9,5 ------------&gt; falsy
1a,12 OR 22,12 -&gt; truthy


Scoring:

This is code-golf, lowest score in bytes wins.
Jelly, 4 bytes

bSḍḷ


Try it online!

How it works

bSḍḷ  Main link. Arguments: n (integer), k (base)

b     Convert n to base k.
 S    Take the sum.
   ḷ  Left; yield n.
  ḍ   Test for divisibility.