0

General solution that works with not only $1025$ but also any given number is preferable.

Green.H
  • 1,201
elise
  • 9

1 Answers1

2

You need to find the smallest factor of $1025$ greater than or equal to $a$.

$1025 = 5^2\cdot41$ so only has six factors: $\{1,5,25,41,205,1025\}$. Choose $y$ to make $a{+}y$ equal to one of these.

Joffan
  • 39,627
  • Great answer, thanks! I managed to get this one but was hopping to find a "prettier" one. – elise Aug 27 '17 at 17:50
  • @elise In my opinion this is a pretty answer, I believe Joffan was trying to keep his response simple so that it would be easy to understand. What this says for the general case is that, for $b \geq (a+y)$ we have $b\equiv 0 \mod (a+y)$ if and only if $(a+y)$ divides $b$. i.e. there exists $k$ such that $k \cdot (a+y) = (b)$ and thus $(a+y)$ is the smallest factor of $b$ greater than or equal to $a$. – mm8511 Aug 27 '17 at 18:17