+0  
 
+1
854
3
avatar+367 

There are exactly four integers n such that the equation below is an integer. Find the largest n.

 \(\frac{(n+1)^2}{n+23}\)

 Apr 16, 2019
 #1
avatar
+1

n=1; cycle:a = (n+1)^2 / (n+23);c=if(ceil(a)==floor(a), goto3, goto4);printn,"=",a; n++; if(n<1000, goto cycle, discard=0;
The four numbers are:
n =21, 98, 219, 461

 Apr 16, 2019
 #2
avatar+367 
+1

Nice program and thanks!

Badada  Apr 16, 2019
 #3
avatar+26364 
+2

There are exactly four integers n such that the equation below is an integer.

Find the largest \(n\).

\(\dfrac{(n+1)^2}{n+23}\)

 

\(\begin{array}{|rcll|} \hline \dfrac{(n+1)^2}{n+23} &=& \dfrac{n^2+2n+1}{n+23} \\\\ n^2+2n+1\ :\ n+23 &=& n-21 + \dfrac{484}{n+23} \quad \text{Polynomial long division} \\\\ 484 &=& 0 \pmod{n+23} \quad | \quad \dfrac{484}{n+23} \text{ must be an integer } \\\\ 484-0 &=& m\cdot (n+23), \ m \in \mathbb{Z} \\ 484 &=& m\cdot n +23m \\ m\cdot n &=& 484 - 23m \\ n &=& \dfrac{484 - 23m}{m} \\ n &=& \dfrac{484}{m} - 23 \quad | \quad n \text{ is max, when } m = 1! \\ n_{\text{max}} &=& 484 - 23 \\ \mathbf{ n_{\text{max}} } & \mathbf{=} & \mathbf{ 461 } \\ \hline \end{array}\)

 

laugh

 Apr 18, 2019

1 Online Users