HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /Let dn = gcd(n² + 3, n + 2) for positive whole numbers n…
HardMathematicsHigh School (11–12)Number TheoryNumericalOlympiad

Let dn = gcd(n² + 3, n + 2) for positive whole numbers n…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

Let dn=gcd⁡(n2+3,n+2)d_n = \gcd(n^2 + 3, n + 2)dn​=gcd(n2+3,n+2) for positive whole numbers nnn. A table for n=1n = 1n=1 to 666 gives 1,1,1,1,7,11, 1, 1, 1, 7, 11,1,1,1,7,1.

  1. Prove that dnd_ndn​ is always 111 or 777. Remove a multiple of n+2n + 2n+2 from n2+3n^2 + 3n2+3.
  1. For which nnn is dn=7d_n = 7dn​=7?
  1. How many whole numbers nnn from 111 to 100100100 give dn=7d_n = 7dn​=7?

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

gcd⁡\gcdgcd takes the smaller exponent of each prime and lcm⁡\operatorname{lcm}lcm the larger, so gcd⁡(a,b)⋅lcm⁡(a,b)=ab\gcd(a, b) \cdot \operatorname{lcm}(a, b) = abgcd(a,b)⋅lcm(a,b)=ab. Also gcd⁡(a,b)=gcd⁡(a−kb,b)\gcd(a, b) = \gcd(a - kb, b)gcd(a,b)=gcd(a−kb,b), and a=dxa = dxa=dx, b=dyb = dyb=dy with gcd⁡(x,y)=1\gcd(x, y) = 1gcd(x,y)=1.

The worked solution

Check an answer or open a hint to unlock the worked solution.

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. Part (a). n2+3=(n+2)(n−2)+7n^2 + 3 = (n + 2)(n - 2) + 7n2+3=(n+2)(n−2)+7. By the subtracting rule, dn=gcd⁡(n+2,7)d_n = \gcd(n + 2, 7)dn​=gcd(n+2,7). The only positive divisors of 777 are 111 and 777.

Step 2. Part (b). dn=7d_n = 7dn​=7 exactly when 7∣n+27 \mid n + 27∣n+2, that is, when n=7k+5n = 7k + 5n=7k+5.

Step 3. Part (c). The numbers 5,12,19,…,965, 12, 19, \dots, 965,12,19,…,96 are 7k+57k + 57k+5 for k=0k = 0k=0 to 131313. That is 141414 numbers.

Check. For n=5n = 5n=5: n2+3=28n^2 + 3 = 28n2+3=28 and n+2=7n + 2 = 7n+2=7, with HCF 777. For n=12n = 12n=12: 147147147 and 141414, with HCF 777.

Answer: dnd_ndn​ is 111 or 777, the value 777 comes for n=7k+5n = 7k + 5n=7k+5, and 141414 numbers from 111 to 100100100 give it.

Log in to save this for later
← All Problems
← Two positive whole numbers a < b have the sum a + b = 96 and the least common multiple lcm(a, b) =…For two numbers, gcd · lcm equals the product… →
More onNumber Theory

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. The triangular numbers are 1, 3, 6, 10, …, where the nth one is (n(n + 1))/2…Advanced
  2. Prove that the equation x³ + y³ + z³ = n has no solution in integers when n leaves remainder 4 or 5…Advanced
  3. Find every triple of positive integers a ≤ b ≤ c with 1/a + 1/b + 1/c = 1, and prove that there are…Advanced
  4. Find all pairs of positive integers (x, y) with x² - y² = 945…Hard
  5. A teacher wants a list of every primitive Pythagorean triple whose hypotenuse is less than 100…Advanced
All problems on this topic →