What is a niven number?

486 Views Asked by At

How do you work out if a number (214) is a niven number with a base n? but it cant be just to base 10

the number needs to be divisible by the sum of its digits when written in base n

1

There are 1 best solutions below

1
On

$241$ is prime, so it's only divisible by the sum of its base $n$ digits if that sum is $1$ (which means $n = 241$) or $241$ (which means $n=1$).

EDIT: For $214 = 2 \cdot 107$, the other divisors are $2$ and $107$.

Base $107$: $214 = [2,0]$ with sum $2$.

Base $108$: $214 = [1, 106]$ with sum $107$.

Base $213$: $214 = [1, 1]$ with sum $2$.

It turns out those are the only possibilities (I wrote a program to try all bases from $2$ to $213$).