Factor base 2026-10-14
A factor base is a finite set of small prime numbers over which selected auxiliary integers are completely factored. Some methods also record a sign coordinate for , which is not a prime number. A positive integer supported entirely on the chosen factor base gives an exponent vector; reducing that vector modulo two records which prime exponents are odd integers. The product is a square of a number precisely when every prime exponent is an even integer.
For the original toy , use factor base and the two relationsThe residues have exponent vectors and in the order . Adding the two vectors modulo two gives , so multiplying the residues gives . Consequentlyand and . Neither individual residue was a square; combining the relations made all exponents even.
In a larger collection, choose relations with positive residues . If a nonempty selection has an even sum in every exponent coordinate, setThen . Finding such a selection is a linear dependence problem over the finite field : the indicator vector of the chosen relations belongs to the kernel of a linear map given by the parity matrix. This is why a problem about prime factors recruits linear algebra. The final congruence of squares may still be trivial, so another selection can be needed. [ref]
https://crypto.stanford.edu/pbc/notes/crypto/factoring.html. Ben Lynn, Factoring and Discrete Logarithms, Dixon's Algorithm: exponent matrix and kernel
.There is a tradeoff: a small factor base gives a smaller parity matrix, but fewer auxiliary integers factor completely over it. A larger factor base accepts more relations but makes the linear algebra larger. Negative auxiliary values need an additional sign coordinate, and a selected product needs even sign parity as well as even prime exponents. Pomerance's account explains this balance and the historical development of combining smooth relations; the toy example omits algorithm-specific sieving and running-time claims. [ref]
https://math.dartmouth.edu/~carlp/PDF/paper109.pdf. Carl Pomerance, A Tale of Two Sieves (1996), pp. 1475–1476: exponent parity, factor bases and signs
. Karatsuba multiplication Created 2026-09-28 Updated 2026-10-13
Karatsuba multiplication is a divide-and-conquer algorithm for multiplication of integers. Splitting each operand into two blocks seems to require four smaller products; the Karatsuba three-product identity recovers the two cross terms together from just three products. Repeating that saving through recursion changes the time complexity from quadratic to , where counts digits in a fixed positional notation. The exponent is about : the benefit comes from the algorithm, even though each splitting step needs more addition and subtraction.
The Karatsuba worked multiplication below computes using , , and . The last operand already shows why “half-size” needs care: Karatsuba carry handling and Karatsuba recursion termination account for the extra digit. Karatsuba digit-operation cost states the operation model; Karatsuba practical crossover explains why the asymptotic saving alone does not select a useful threshold.
The original 1962 paper presents a binary numeral system automaton construction: its Theorem 2 and proof reduce multiplication to taking squares of numbers, then reduce a larger square of a number to three smaller squares of numbers. Its footnote explicitly addresses the extra digit in a sum of halves. The sequential time complexity analysis below uses a different operation model from that paper's automaton size and depth bounds, including its Boolean circuit realization without feedback.[ref]
Multiplication of many-digital numbers by automatic computers by A. Karatsuba and Yu. Ofman. Karatsuba and Ofman, Multiplication of many-digital numbers by automatic computers, original Russian article, 1962, pp. 293–294: Theorem 2, its proof, and the footnote on p. 294
P-adic valuation Created 2026-09-24 Updated 2026-10-13
For a prime number and a nonzero integer , the P-adic valuation counts the exponent of in its prime factorization:For , it gives , , and . The sign of a nonzero integer does not change these prime exponents. Relative to an ordered factor base, the valuations supply the coordinates of its exponent vector.
The P-adic valuation extends to nonzero rational numbers by . For example, records a factor in the denominator instead of the numerator. Multiplication adds valuations, ; this is the arithmetic reason why adding exponent vectors can make a product a square. In particular, a positive integer is a square of a number precisely when all its prime exponents are even integers, the criterion used by a factor base.
Squared triangular number 2026-10-14
A squared triangular number is the square of a number , where is a triangular number. Beginning at , the values are . Nicomachus's theorem gives them a second description as cumulative sums of cubes of numbers.
Triangular number 2026-10-14
A triangular number counts rows of objects, with a nonnegative integer:The first values are . The empty arrangement contributes zero, by the empty sum convention. Adding one more row gives the triangular number recurrence for . The row lengths form an arithmetic progression, while their running totals are triangular numbers.
Pair the rows with a reversed copy: . There are such pairs, so two copies contain dots. Dividing by two proves the formula. This rectangle picture explains the factor one-half without requiring a formula for a long summation. For example, one hundred rows contain dots.
The same count appears whenever every pair of different objects must be considered once. Five participants make ten possible handshakes; five sensors have ten different pairwise comparisons; a complete graph on five vertices has ten edges. These are the triangular number pair-counting identity, with one fewer row than objects. The distinction prevents a common error: counts all pairs from six objects, whereas five objects give .
The triangular number square-complement identity says that two neighboring triangular numbers fill a square. Combining that identity with the one-row difference makes the difference of squares equal to . It leads to Nicomachus's theorem: the sum of the first cubes of numbers is the square of a number . A change in the way one groups objects exposes a relation between summation, multiplication and geometry.
This geometric view is already visible in Nicomachus's Introduction to Arithmetic by Nicomachus (Hahn teacher edition): Book II, Chapter 8 describes growing triangular rows, Chapter 12 combines successive triangular counts into squares, and Chapter 20 groups successive odd integers into cubes of numbers.[ref]
Introduction to Arithmetic by Nicomachus (Hahn teacher edition). Book II, Chapters 8, 12 and 20, printed pp. 63–64, 70 and 75
The linked edition uses Martin Luther D'Ooge's translation, revised with modern teaching material by Nathanael Hahn. Our empty-row index is a modern convention; the historical passage starts from unity and calls three the first actual triangle.

