document.write( "Question 1074625: Find all positive integers $n$ for which $n^2 - 19n + 99$ is a perfect square. \n" ); document.write( "
Algebra.Com's Answer #689544 by KMST(5328)\"\" \"About 
You can put this solution on YOUR website!
TIP:
\n" ); document.write( "When I see $ wrapping equations,
\n" ); document.write( "it remind me of LATEX,
\n" ); document.write( "and makes me suspect you come from artofproblemsolving.
\n" ); document.write( "We use triple curly brackets, like {, here.
\n" ); document.write( "I am going to look at the embarrassingly simpler solution in that website
\n" ); document.write( "as soon as I finish typing my awkward solution here.
\n" ); document.write( "
\n" ); document.write( "ONE WAY:
\n" ); document.write( "We want \"n%5E2-19n%2B99=K%5E2\" to be true
\n" ); document.write( "for some positive integers \"n\" and \"k\" .
\n" ); document.write( "\"n%5E2-19n%2B99=K%5E2\"
\n" ); document.write( "\"n%5E2-19n-K%5E2=-99\"
\n" ); document.write( "\"n%5E2-19n%2B19%5E2%2F4-K%5E2=19%5E2%2F4-99\"
\n" ); document.write( "\"%28n-19%2F2%29%5E2-K%5E2=19%5E2%2F4-99\"
\n" ); document.write( "\"4%28n-19%2F2%29%5E2-4K%5E2=19%5E2-4%2A99\"
\n" ); document.write( "\"%282n-19%29%5E2-%282K%29%5E2=361-396\"
\n" ); document.write( "\"%282n-19%29%5E2-%282K%29%5E2=-35\"
\n" ); document.write( "\"%282K%29%5E2-%282n-19%29%5E2=35\"
\n" ); document.write( "Let me abbreviate with the change of variables
\n" ); document.write( "\"system%28a=2K%2Cb=2n-19%29\" ,
\n" ); document.write( "knowing that \"a=2K%3E0\" is a positive, even integer,
\n" ); document.write( "and \"b\" is an integer.
\n" ); document.write( "The equation becomes
\n" ); document.write( "\"a%5E2-b%5E2=35\" , so much easier to write,
\n" ); document.write( "and immediately we think of
\n" ); document.write( "\"%28a%2Bb%29%28a-b%29=35\" .
\n" ); document.write( "Are those factors in brackets positive or negative?
\n" ); document.write( "We knew that \"a%5E2-b%5E2=35%3E0\" ,
\n" ); document.write( "so \"a%5E2%3Eb%5E2\" --> \"sqrt%28a%5E2%29%3Esqrt%28b%5E2%29\" --> \"a%3Eabs%28b%29\" ,
\n" ); document.write( "so whether \"b%3E0\" or \"b%3C0\" ,
\n" ); document.write( "\"%28a%2Bb%29%3E0\" and \"%28a%2Bb%29%3E0\" .
\n" ); document.write( "Back to the product of positive integer factors
\n" ); document.write( "\"%28a%2Bb%29%28a-b%29=35\" .
\n" ); document.write( "The factors could be 1 and 35 or 5 and 7.
\n" ); document.write( "We have 4 possibilities:
\n" ); document.write( "\"system%28a%2Bb=1%2Ca-b=35%29\"-->\"system%28a=18%2Cb=-17%29\"-->\"2n-19=-17\"-->\"highlight%28n=1%29\"
\n" ); document.write( "\"system%28a%2Bb=35%2Ca-b=1%29\"-->\"system%28a=18%2Cb=17%29\"-->\"2n-19=17\"-->\"highlight%28n=18%29\"
\n" ); document.write( "\"system%28a%2Bb=5%2Ca-b=7%29\"-->\"system%28a=6%2Cb=-2%29\"-->\"2n-19=-1\"-->\"highlight%28n=9%29\"
\n" ); document.write( "\"system%28a%2Bb=7%2Ca-b=5%29\"-->\"system%28a=6%2Cb=1%29\"-->\"2n-19=1\"-->\"highlight%28n=10%29\"
\n" ); document.write( "
\n" ); document.write( "ANOTHER WAY:
\n" ); document.write( "\"y=x%5E2-19x%2B99\"<-->\"y=%28x-9.5%29%5E2%2B8.75\" , so if \"y=K%5E2\" ,
\n" ); document.write( "\"K%5E2=%28x-9.5%29%5E2%2B8.75\"-->\"K%5E2-%28x-9.5%29%5E2=8.75\"-->\"%282K%29%5E2-%282x-19%29%5E2=4%2A8.75=35\" .
\n" ); document.write( "The two perfect squares we look for, \"%282K%29%5E2\" and \"%282x-19%29%5E2\" ,
\n" ); document.write( "cannot be too large if their difference is only \"35\" .
\n" ); document.write( "There are not many possible solutions,
\n" ); document.write( "and they will all be close to the \"x=9.5\" of the vertex.
\n" ); document.write( "So, listing values for \"y=n%5E2-19n%2B99\" around \"n=9.5\" ,
\n" ); document.write( "(or listing values for \"%282n-19%29%5E2%2B35\" for \"2n\" around \"n=9.5\" ),
\n" ); document.write( "until you find a perfect square is an option.
\n" ); document.write( "
\n" ); document.write( "PS: Actually, it was not that the artofproblemsolving solution was so much simpler,
\n" ); document.write( "but that they skip steps/explanations that \"should be obvious,\"
\n" ); document.write( "so they do not need to write as much.
\n" ); document.write( "If you get all those steps, artofproblemsolving is a fun site,
\n" ); document.write( "but I tend to/like to overexplain, so I belong at this website.
\n" ); document.write( "
\n" );