8
$\begingroup$

All variables involved are nonnegative integers.

Given a variable $g$, what is the largest $x$ where $g$ cleanly divides $x(x-1)$ and $x\lt g$? Do I only need prime factors of $g$?

  • 3
    If $g$ is a prime, then $x=1$.2012-12-23
  • 0
    Also $g$ must be even...otherwise no such integer $x$ exists. So therefore $g\gt 2$, thanks to @Marvis' observation. This is wrong, thanks to a simple counter-example $g=15$, $x=6$ (thanks @Marvis!).2012-12-23
  • 1
    @AlexNelson Not necessarily. $g = 15$, $x=6, 10$.2012-12-23
  • 0
    Ah yes, well played, @Marvis!2012-12-23
  • 0
    @Tomasz but $g=4$ doesn't cleanly divide $3(3-1)=6$ for $x=3$...2012-12-23
  • 0
    @AlexNelson: Touche. Change the example: it is not enough to consider prime factors, as seen by $g=6$ (and $x=4$) or $g=12$ (and $x=9$). Positive powers of $2$ will always have $x=1$, as will other prime powers.2012-12-23
  • 0
    Right but this is maximal x given g2012-12-23

2 Answers 2