Using a quick search with my computer, hereβs what I found so far :
Looking only at the last digit, some power of $n$ must be congruent
to $1$ modulo $10$, so $n$ must be congruent to $1,3,7$ or $9$ modulo
$10$.
Looking at the last two digits, some power of $n$ must be congruent
to $11$ modulo $100$, so $n$ must be congruent to $11,31,71$ or $91$ modulo
$100$.
Looking at the last three digits, ome power of $n$ must be congruent
to $111$ modulo $1000$, so $n$ must be congruent to one of $31, 71, 111, 191, 231, 271, 311, 391, 431, 471, 511, 591, 631, 671, 711,
791, 831, 871, 911, 991$ modulo $1000$.
Looking at the last four digits, ome power of $n$ must be congruent
to $1111$ modulo $10000$, so $n$ must be congruent to one of $71, 1031, 2071, 3031, 4071, 5031, 6071, 7031, 8071, 9031$ modulo $10000$.
Do you see the pattern in those sequences ?
Letting $$N={p_1}^{q_1}\cdot {p_2}^{q_2}\cdots \cdot {p_k}^{q_k}\ \ (p_i\ \text{are primes}, q_i\ge 1\in\mathbb N,k\in\mathbb N)$$ be your number, the following has to be satisfied (see here for details):
$$(q_1+1)(q_2+1)\cdots(q_k+1)=40=2^3\cdot 5.$$
(Here, LHS represents the number of the positive divisors of $N$.)
So, separate it into cases as the followings :
(1) Since $40=40$, $N=p^{39}$. Hence, we have $2^{39}.$ (Note this is the smallest number in this case)
(2) Since $40=2\times 20$, $N={p_1}^{1}\cdot {p_2}^{19}$. Hence, we have $3^1\cdot 2^{19}.$
(3) Since $40=4\times 10$, $N={p_1}^{3}\cdot {p_2}^{9}$. Hence we have $3^3\cdot 2^9$.
Can you take it from here? Note that there are still several cases.
Best Answer
If the roots are $\alpha, \beta$ then we have $\alpha \beta = 2014.$ As they are integers, $\alpha, \beta$ must be divisors of $2014=2\cdot19\cdot53$, giving $\left \{ \alpha, \beta \right \}=\left \{ 1,2014 \right \}$, or $\left \{ -1,-2014 \right \}$ or $\left \{ 2,1007 \right \}$ or $\left \{ -2,-1007 \right \}$ or $\left \{ 19,106 \right \}$ or $\left \{ -19,-106 \right \}$ or $\left \{ 38,53 \right \}$ or $\left \{ -38,-53 \right \}$.
Also $n=\alpha+\beta$, has the least positive value of $n$ as $38+53=91$
AND WE'RE DONE