考点数论

特殊数与不定方程

考什么 · What it tests

围绕几类「有个性的数」——阶乘、完全平方数、三角形数——以及只要整数解的方程怎么枚举出全部答案。
Centered on a few "special" numbers — factorials, perfect squares, triangular numbers — and how to enumerate all integer solutions of an equation.

需要先会 · Prerequisites

  • 质因数分解 / Prime factorization
  • 完全平方数、阶乘的定义 / The definitions of perfect squares and factorials
  • 整除与因数 / Divisibility and factors

常见套路 · Common moves

  1. 不定方程靠范围 + 整除收网:一个方程多个未知数,先用「正整数」「不超过某值」把范围压小,再逐个验,答案是有限的——这类题的通用套路。
    Corner a Diophantine equation with ranges and divisibility: one equation, several unknowns — shrink the range with "positive integer" and upper bounds, then test each; the answers are finite.
  2. 连续整数和拆成「中间数 × 个数」:奇数个连续整数的和 = 正中间那个 × 个数,偶数个则用首尾配对。
    Split a sum of consecutive integers as "middle × count": an odd count sums to the middle term times the count; an even count pairs the ends.
  3. 完全平方数看质因数指数:nn 是完全平方数当且仅当质因数分解里每个指数都是偶数。
    Judge a perfect square by exponents: nn is a perfect square exactly when every exponent in its prime factorization is even.

易错点 · Common pitfalls

  • 枚举整数解时漏掉边界或负数/零:题目没说正整数时,0 和负数也可能是解。
    Missing the boundary or negatives/zero when enumerating: unless the problem says positive integers, 0 and negatives may be solutions too.
  • 把「连续整数」默认成从 1 开始:题目常是任意一段连续整数,别自动从 1 起。
    Assuming "consecutive integers" start at 1: they're usually any run of consecutive integers, so don't default to starting at 1.
开始练习包真题混变形,自动配 8–12 题

真题

官方真题20

变形生成中 · 练习包先用官方真题