For positive integer weights of total , store reachable pairs of sums assigned to the first two groups after each input list prefix. The third sum is determined by the processed total minus . Assign each new occurrence to one of the three groups using a fresh layer; accept exactly final state . The transitions are sound by construction and complete by deleting the last occurrence from a valid assignment. The state range is , giving time and rolling space.
Total number of prime factors Created 2026-10-06 Updated 2026-10-13
The total number of prime factors counts every occurrence of a prime factor in the prime factorization of a positive integer . Equivalently, it adds the prime valuations:One may also write over all prime numbers, since only finitely many prime valuations are nonzero. The empty sum gives . By contrast, the prime omega function has and counts distinct prime factors. [ref]
https://darijgrinberg.gitlab.io/floor.pdf. Darij Grinberg, MIT 18.781, Floor and arithmetic functions, Definition 2.1.2: the two prime-factor counts
Expanding into shows , whereas and . The same calculation for the comparison examples givesThe total number of prime factors agrees for and , although their prime supports of an integer differ. Meanwhile and have the same radical of an integer and prime omega function, but different values of the total number of prime factors. These examples show exactly which information each arithmetic function forgets.
One box per prime factor occurrence: the total number of prime factors counts boxes, the prime omega function counts groups, and the radical of an integer multiplies one prime number from each group
. Details. The total number of prime factors is a completely additive arithmetic function:The proof is that multiplication adds each prime valuation, , and summing preserves that equality. No coprimality condition is needed. For example, and both have total number of prime factors three; their product has six. By comparison, the prime omega function is only an additive arithmetic function: here .
There is a useful way to see the total number of prime factors as a count of elementary building blocks: any expression of as a product of prime numbers has exactly factors, by the fundamental theorem of arithmetic. Equivalently, every factorization tree for has leaves. Repeated prime factors increase this count without introducing new kinds of prime number. The difference is the existing excess prime-factor multiplicity:Every summand is nonnegative, so if and only if is a squarefree integer, including . In particular, a prime power with has , and .
Historically, Hardy and Ramanujan's 1917 paper explicitly separated the prime omega function from the total number of prime factors, writing them as and , respectively. Their example has counts three and six. That distinction let them compare two measures of how an integer is built from prime factors. [ref]
https://ramanujan.sirinudi.org/Volumes/published/ram35.html. G. H. Hardy and S. Ramanujan, The normal number of prime factors of a number n, Quarterly Journal of Mathematics 48 (1917), 76–92, Section 1.2, transcribed original text
Totient chain 2026-10-20
The sequence obtained by iterating Euler's totient function on a positive integer. Since for , the sequence reaches 1. Counting both endpoints gives the length recurrence relation and ; increasing order of therefore suffices for dynamic programming.
Trial-division divisor counting 2026-10-25
Factor a positive integer while multiplying the exponent-plus-one contributions to its divisor count. After removing all prime factors below the current trial factor, a trial factor that divides the remainder must itself be prime. Remove its full power and advance. Once the trial factor's square exceeds the remainder, any remainder greater than one is prime and contributes a factor two. The invariant separates the original integer into removed prime powers and the remaining coprime factor; no factor array is necessary.
Triangular number recurrence 2026-10-14
For a positive integer , adding the row of length to the previous arrangement gives . Thus the first differences of the triangular numbers are . The triangular number recurrence provides incremental computation: after , adding seven gives .
Ulam sequence 2026-10-20
Starting with two distinct positive integers , repeatedly append the smallest integer larger than the previous term that is expressible in exactly one way as the sum of two distinct earlier terms. Requiring distinct summands and counting unordered pairs are both essential parts of the definition.
An ultrafilter on the positive integers with every member containing finite arithmetic progressions of arbitrarily large length. The Van der Waerden theorem and ultrafilter selection from a partition-rich family give existence. Such an ultrafilter must contain the complement of every set with bounded arithmetic-progression length, and it is a nonprincipal ultrafilter. No corresponding ultrafilter can have an infinite arithmetic progression in every member, by the dyadic block obstruction to infinite arithmetic progressions.
Ultrafilter with finite-sums members 2026-10-14
An ultrafilter with finite-sums members is an ultrafilter on the positive integers all of whose members are IP sets. Such an ultrafilter exists by extending the IP-star filter using the ultrafilter lemma. If a member were not IP, its complement would be an IP-star set and hence another member, contradicting properness. Conversely, every such ultrafilter contains the entire IP-star filter, since it cannot contain the non-IP complement of an IP-star set. This characterization does not assert that the ultrafilter is idempotent.
Unitary divisor 2026-10-20
A divisor of a positive integer is unitary when . Each prime power in the prime factorization of must therefore be included in completely or omitted completely. Consequently, the sum of the -th powers of unitary divisors is .
Unit fraction Created 2026-10-20 Updated 2026-10-31
A fraction of the form for a positive integer . Its numerator is 1 and its denominator determines it uniquely.
Upper asymptotic density Created 2026-10-06 Updated 2026-10-14
For a subset of the positive integers, its upper asymptotic density isThe limit superior keeps the largest limiting proportion even when the running proportions oscillate. Because they lie in , this limit superior always exists in . If natural density exists, upper asymptotic density equals it.
The convention here uses , while natural density above uses . Replacing one interval by the other changes a count by at most one, so the proportions differ by at most and have the same limit superior. For the set without natural density above, the count in is six rather than five, because is included and zero is absent. Nevertheless its upper asymptotic density is exactly . The even positive integers have upper asymptotic density and the prime numbers have upper asymptotic density zero.
The useful feature is that a large proportion along arbitrarily large initial integer intervals already supplies structure. The Szemerédi theorem says that positive upper asymptotic density forces arithmetic progressions of every finite length, with positive common difference, even without an existing natural density. Szemerédi's 1975 paper resolved this general finite-length problem; it makes density a bridge from counting to additive structure. [ref]
https://doi.org/10.4064/aa-27-1-199-245. Endre Szemerédi, On sets of integers containing k elements in arithmetic progression, Acta Arithmetica 27, 199–245, 1975
Van der Waerden theorem Created 2026-09-24 Updated 2026-09-28
Every finite coloring of the positive integers contains monochromatic arithmetic progressions of every prescribed finite length.
Von Mangoldt divisor identity Created 2026-09-24 Updated 2026-10-14
For every positive integer , the divisor sum of its Von Mangoldt function weights recovers its natural logarithm:The sum runs over the positive integer divisors of . For , its only term is . Equivalently, if and is the constant-one arithmetic function, then , where is Dirichlet convolution. [ref]
For , the positive integer divisors are . Only contribute:Thus the vanishing of loses no information here: the divisor sum retrieves both copies of the prime factor from the integer divisors and .
Proof outline: by the fundamental theorem of arithmetic, write with distinct prime numbers and positive exponents . Among the positive integer divisors, the ones with nonzero Von Mangoldt function weights are exactly . ConsequentlyThe natural logarithm turns the prime factorization product into a sum, and the prime powers greater than one supply exactly the required multiplicities.
Von Mangoldt function Created 2026-09-24 Updated 2026-10-13
The Von Mangoldt function assigns a natural logarithm weight to each positive power of a prime number. For a positive integer ,Here and throughout the Chebyshev functions, means the natural logarithm. In particular, : the exponent must be positive, even though the convention in prime power allows exponent zero. The support of a function of therefore consists precisely of the prime powers greater than one. [ref]
For example, and , whereas . A composite number can have a nonzero weight: has just one distinct prime factor. But has two distinct prime factors, so its weight is zero. At the weight is , not . This choice lets successive powers record successive copies of the same prime factor in the Von Mangoldt divisor identity.
The Von Mangoldt function is useful because it connects two views of the prime numbers: the prime factorization of an individual integer, through a divisor sum, and the accumulated weights below a cutoff, through the Second Chebyshev function. The latter turns questions about the distribution of prime numbers into questions about a partial sum of an arithmetic function.
Zeckendorf's theorem 2026-10-20
Every positive integer is a unique sum of nonconsecutive Fibonacci numbers, using the sequence with one copy of . The greedy procedure selects the largest allowable Fibonacci number and repeats on the remainder.
Zeta series truncation error 2026-10-14
For a real exponent and a positive integer , the series truncation error in the defining Riemann zeta function series isThe integral comparison for the positive decreasing function gives the explicit boundsOn each unit interval, the area under lies between its endpoint heights. Summing from the first omitted term gives the lower integral from to infinity and the upper integral from to infinity. This uses positivity and monotonicity, not an assumption that the last computed term equals the remaining error.
At , the bounds are , whereas . The errors above fit both intervals. Merely looking at the eleventh term would give for squares, far smaller than the actual remaining .
For a chosen absolute error target , the sufficient condition is , rounded upward to an integer. Thus requires by this bound for squares but only for fourth powers. This is a guarantee from an upper bound, not a claim that those are the smallest successful term counts.


