The following is an arithmetic progression and $m$ is a positive integer.

$$m, \underbrace{\dots}_{n+1 \text{ terms}}, 33, \underbrace{\dots}_{3n+1 \text{ terms}}, 113$$

Find the maximum value of $n-m$.

Does it require the use of derivatives? I understand that in an arithmetic progression this equation is used:


but I don't know how to relate it with the problem or if it would be used at all.


Looking at the solution from the source where I found this problem the author addresses it this way:

Because $m>0m$ , $m\in \mathbb{N}$ (sidenote: not sure how to conclude this)


$$m;\underset{\overbrace{\textrm{n+1 terms}}}{\cdots};33;\underset{\overbrace{\textrm{3n+1 terms}}}{\cdots};113$$

33 is positioned in the place labeled as $\textrm{n+3}$, which comes from $\textrm{1+n+1+1}$,

from $a_{n}=a_{1}+(n-1)d$



$$33;\underset{\overbrace{\textrm{3n+1 terms}}}{\cdots};113$$


Which leads to:


The part which gets tricky comes here as the author concludes that $n=106$, $d=\frac{1}{4}$ (without explaining how).

Replacing $n=106$, $d=\frac{1}{4}$



Then the author concludes in order $n-m$ to be maximum $n$ should be maximum and $m$ minimum.

Therefore, $n-m=106-6=100$,

which is the answer provided. Although the above approach does not require calculus topics (i.e derivatives). Instead guesses values based on a lineal equation with two unknowns. This part is something which is confusing. Any help on an alternative that can lead to that answer but with a more logical and easy to follow algorithm?.


$$m+(n+2)d=33\tag1$$ $$m+(4n+4)d=113\tag2$$

Hence we get, from $(1) - (2)$, $$(3n+2)d=80 \Rightarrow n=\frac{80}{3d}-\frac{2}{3}$$ And $4\times (1) - (2)$ gives, $$3m+4d=19 \Rightarrow m=\frac{19}{3}-\frac{4d}{3}$$

So, we get $$n-m=\frac{80}{3d}-\frac{2}{3}-\frac{19}{3}+\frac{4d}{3}=\frac{4d^2+80}{3d}-7$$

To make $n-m$ maximum, differentiate $\frac{4d^2+80}{3d}$ with respect to $d$ and equate to $0$. Also check the second derivative at that point to ensure it is a maximum.

Now, conclude accordingly.

Hope you can finish this.

  • $\begingroup$ By continuing from where you left off should be like this, ${\left ( \frac{4d^{2}}{3d}+\frac{80}{3d} \right )}'={\left ( \frac{4d}{3}+\frac{80}{3d} \right )}'=\frac{4}{3}-\frac{80}{3}d^{-2}=0, d=2\sqrt{5}$, and the second derivative will become ${\left ( \frac{4}{3}-\frac{80}{3}d^{-2} \right )}'=0, \frac{-160}{3}d^{-3}=0, d^{-3}=0.$ But it is the latter part which does not make sense. Moreover it cannot be guaranteed to be maximum. Mind if you solve this part?. Now, why 33 is $a_{n+1}$, this part is not very clear to me. $\endgroup$ – Chris Steinbeck Bell Oct 10 '17 at 17:33
  • $\begingroup$ And you dont equate the second derivative to 0. Please read some standard text on this and try it. Else you wont learn anything. $\endgroup$ – SchrodingersCat Oct 10 '17 at 17:38
  • $\begingroup$ But if its $a_{n+2}$ wouldn't it be $a_{n+2}=m+((n+2)-1)d=33$, hence $a_{n+2}=m+(n+1)d=33$?. $\endgroup$ – Chris Steinbeck Bell Oct 10 '17 at 18:14
  • $\begingroup$ I was wrong, it should be $a_{n+3}$, since $m$ is first term, followed by $n+1$ terms. $\endgroup$ – SchrodingersCat Oct 10 '17 at 18:17
  • $\begingroup$ Regarding the second derivative I made a mistake. It should had been $\frac{160}{3}d^{-3}$ since there are two roots in the first derivative $d= -2\sqrt{5}$ would be a local maximum by entering this into $\frac{160}{3}(-2\sqrt{5})^{-3}$. But a problem arises, ${\left ( \frac{4d^{2}+80}{3d} -7\right )}={\left ( \frac{4(-2\sqrt{5})^{2}+80}{3(-2\sqrt{5})} -7\right )}={\left ( \frac{160}{-6\sqrt{5})} -7\right )}={\left ( \frac{-16\sqrt{5}}{3} -7\right )}=\frac{-16\sqrt{5}-21}{3}$ and this part does not seem correct. $\endgroup$ – Chris Steinbeck Bell Oct 10 '17 at 18:23

Letting $d$ be the common difference of successive members, we have $$m+(n+2)d=33\tag1$$ $$m+(4n+4)d=113\tag2$$

From $(1)(2)$, we have $$3m=19-4d,\quad 3n+2=\frac{80}{d}$$

Now, since $m$ is a positive integer, we see that $4d$ has to be an integer less than $19$, from which we can write $d=\frac{N}{4}$ where $N\lt 19$ is an integer.

Also, since $n$ is a non-negative integer, we see that $\frac{80}{d}=\frac{320}{N}$ is a positive integer.

It follows from this that $N\lt 19$ has to be a positive divisor of $320$.

So, $N$ has to be either $1,2,4,5,8,10,16$.

Here, using $d=\frac N4$, we have $$n-m=\frac 13\left(\frac{80}{d}-2\right)-\frac{19-4d}{3}=\frac N3+\frac{320}{3N}-7$$

Now, we define $$f(N)=\frac N3+\frac{320}{3N}-7$$ to have $$f(N)-f(N+1)=\frac{-N^2-N+320}{3N(N+1)}$$

Here, note that when $f(N)-f(N+1)\gt 0$, i.e. $f(N)\gt f(N+1)$, $f(N)$ is decreasing.

So, we see that $f(N)$ is decreasing when $-N^2-N+320\gt 0\implies (0\lt)\ N\lt \frac{-1+\sqrt{1281}}{2}$ where $$17=\frac{-1+\sqrt{1225}}{2}\lt \frac{-1+\sqrt{1281}}{2}\lt\frac{-1+\sqrt{1369}}{2}=18$$

Since we already see that $N$ has to be either $1,2,4,5,8,10,16$ (note that all of these values are smaller than $17$), the maximum of $n-m$ is attained when $N$ is the minimum, i.e. $N=1$.

Therefore, the maximum of $n-m$ is $f(1)=100$ when $N=1,d=\frac 14,m=6,n=106$.

  • $\begingroup$ Where do $f(N)-f(N+1)$ come from?. I'm also stuck at trying to know how did you get with $\sqrt{1225}$ and $\sqrt{1369}$?, the other seems to be logical as it comes from the value of the discriminant from $-N^{2}-N+320$. How exactly do I know $f(N)$ is decreasing?. What's the purpose of $17<\frac{-1+\sqrt{1281}}{2}<18$? $N=1$ is not very clear to me, mind if you explain a bit how do I get to that number?. I think that's the key as a domino effect the rest is easy for values of d, m and n. But the N in the function I dont get it. $\endgroup$ – Chris Steinbeck Bell Oct 15 '17 at 12:07
  • $\begingroup$ @ChrisSteinbeckBell: (1) I defined $f(N)$ as $(n-m=)\frac N3+\frac{320}{3N}-7$. Then, I just calculated $f(N)-f(N+1)$. (2) $\sqrt{1225},\sqrt{1369}$ come from the fact that $1225=35^2,1369=37^2$. (3) Note that $f(N)-f(N+1)\gt 0$ is equivalent to $f(N+1)\lt f(N)$ which means $f(N)$ is decreasing. (4) Please note that $N$ has to be either $1,2,4,5,8,10,16$. (note that all these values are less than $17$) Since we see that in $0\lt N\lt 17+\alpha$, $f(N)$ is decreasing, $f(1)$ is the maximum. (4) Please note that $N=4d$. The reason I use $N$ is that $N$ is an integer (while $d$ is not). $\endgroup$ – mathlove Oct 15 '17 at 12:24
  • $\begingroup$ @ChrisSteinbeckBell: I added some explanations. $\endgroup$ – mathlove Oct 15 '17 at 12:34
  • $\begingroup$ Okay, but my question was why did you decided to use $f(N+1)$?. Why not let's say $f(N)-f(N+2)$? Is it because $+1$ is the minimum difference between positive integers? I am still unable to understand where do $\frac{-1+\sqrt{1225}}{2}$ comes?. If its because $35^{2}$, where does that $35$ come from?, the same applies for $37$. $f(N)$ is decreasing because of this symbol $>$? I can understand the symbolic expressions in your argumentation but it would help a lot if you could explain it with words. $\endgroup$ – Chris Steinbeck Bell Oct 15 '17 at 12:57
  • $\begingroup$ The part where you say that $N$ has to be less than $17$ because $N$ is between $0$ and $17+\alpha$ comes from $17<\frac{-1+\sqrt{1281}}{2}<18$? There is another answer which does uses derivatives, however it does not come to the same result, why such approach fails?. $\endgroup$ – Chris Steinbeck Bell Oct 15 '17 at 13:01

Just to propose an alternative simple and easy to follow approach (as requested in the OP) that maybe could have been that of who conceived the original problem and did not explain the final step. Starting from $(3n+2)d=80 \,\,\,\,\,$, we have $n=80/(3d) - 2/3\,\,\,\,$. Substituting this in $(n+2)d=33-m\,\,\,\,\,$, we directly get


Now since $m$ is a positive integer and $d$ must be positive, the only possible values of $d$ are $1/4\,$, $1\,$, and $4\,$. These values lead to $m=6\,$, $m=5\,$, and $m=1\,$, respectively. The corresponding values of $n$ are $n=106\,$, $n=26\,$, and $n=6\,$, respectively. So the solution that maximizes $n-m\,\,$ is the first one, with $n=106\,\,$ and $d=1/4\,\,$.

  • $\begingroup$ That's a good observation, and it uses trial and error approach to solve the problem. Since there are few values you can come up to the answer quickly. $\endgroup$ – Chris Steinbeck Bell Oct 19 '17 at 6:07
  • $\begingroup$ This is IMHO the right way to do this problem. @Chris Don't shun "trial and error"! When elementary number theory leaves you with only finitely many possibilities it is a perfectly valid approach to try them all, and see which works! Calculus is quite the wrong tool for this problem. And for my money also one of the duller parts in math, but your mileage may vary :-) $\endgroup$ – Jyrki Lahtonen Apr 9 '18 at 21:05
  • $\begingroup$ @JyrkiLahtonen Thanks for your feedback. It has been a while since this question was posted but to me I felt that the most obvious choice was to use calculus as it said "maximum" yet in the end seems that just trying out the few values can render an answer. But at the time I faced this problem it felt that I may end by trying many values and not getting an answer at all. In other words not getting scared when having to deal with these things. $\endgroup$ – Chris Steinbeck Bell Apr 10 '18 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.