Skip to content

Bailey–Borwein–Plouffe Formula

A base-16 rational series for π whose radix alignment lets modular exponentiation recover hexadecimal or binary digits at a distant position without first generating the intervening expansion.

Version
v3 · 2026-09-19 · History
Domain-specific #
1337
Domain group
Formal Sciences
Origin domain
Mathematics
Subdomain
Computational Number Theory → Mathematics
Aliases
BBP Formula, Bailey Borwein Plouffe Pi Formula

Core Idea

The Bailey–Borwein–Plouffe formula (BBP formula) is the identity.

π = Σ[k=0..∞] 16^(-k) (4/(8k+1) - 2/(8k+4) - 1/(8k+5) - 1/(8k+6)).

Its importance is not merely that the rapidly convergent series evaluates to π. The powers of 16 and the arithmetic-progression denominators align with hexadecimal positional notation so that a distant block of hexadecimal digits can be computed from the fractional part of 16^n π using modular exponentiation, without first storing or computing all preceding digits.

How would you explain it like I'm…

The Pi Digit Jumper

Pi is a number whose digits go on forever. Usually, to find a digit far, far away, you have to work out every digit before it. The Bailey-Borwein-Plouffe formula is a special recipe that can jump straight to faraway digits, but only when pi is written in a counting system with 16 symbols instead of our usual 10.

Skip-Ahead Pi Recipe

The Bailey–Borwein–Plouffe Formula, or BBP formula, is an equation that adds up infinitely many fractions to get exactly pi. Its fractions are built around powers of 16, which lines up perfectly with writing numbers in base 16 (hexadecimal), a counting system computers use. Because of this, you can calculate a group of pi's hexadecimal digits at a faraway position without calculating or storing all the digits before it. Simon Plouffe discovered the formula using a computer search, and David Bailey, Peter Borwein and Plouffe proved and published it. There are similar formulas for other numbers, but those are relatives, not this exact formula.

Hexadecimal Digit-Extraction Formula for Pi

The Bailey–Borwein–Plouffe (BBP) formula is the identity pi = sum over k from 0 to infinity of 16^(-k) times (4/(8k+1) - 2/(8k+4) - 1/(8k+5) - 1/(8k+6)). Besides being a fast-converging series for pi, its structure — powers of 16 and denominators in arithmetic progression — matches hexadecimal notation. That lets you compute the fractional part of 16^n times pi using modular exponentiation, which reveals hexadecimal digits starting at position n without computing all earlier digits. Simon Plouffe found it by an integer-relation search, and Bailey, Borwein and Plouffe proved and published it in 1997, showing the method uses little memory, runs in nearly linear time, and works with ordinary rather than arbitrary-precision arithmetic. It should be distinguished from the broader family of 'BBP-type' formulas for other constants and bases.

 

The Bailey–Borwein–Plouffe formula is the series pi = sum_{k>=0} 16^(-k) [4/(8k+1) - 2/(8k+4) - 1/(8k+5) - 1/(8k+6)]. Its significance lies less in its rapid convergence than in its alignment with base-16 positional notation. To get hexadecimal digits of pi beginning at position n, one computes the fractional part of 16^n pi; splitting each term's sum at k = n, the head terms can be reduced using modular exponentiation of 16 modulo the denominators, and the tail is small and bounded, so no preceding digits need be computed or stored. Plouffe discovered the series via integer-relation search, and the 1997 paper by Bailey, Borwein and Plouffe proved it and placed the digit-extraction algorithm in a low-space, nearly linear-time class, demonstrating computations at very distant positions with ordinary machine arithmetic. Three things should be kept distinct: the exact series identity, the modular digit-extraction procedure it enables, and the wider family of BBP-type formulas for other constants and bases. The named formula is specifically the original pi identity together with its base-16 (hence binary) extraction property.

Scope of Application

The formula belongs to computational number theory, experimental mathematics, computer arithmetic, and the study of mathematical constants. Its direct uses include extracting remote hexadecimal or binary digits of π, independently checking large prefix computations, distributing independent position ranges across processors, and studying how special-function identities yield digit algorithms.

The broader methodology applies to compatible polylogarithmic constants. The original paper gives formulas and digit computations for π, π², log 2, (log 2)², and related values, but each identity has its own base and coefficient structure. Bailey's later compendium records many BBP-type formulas and treats the original π identity as the defining example.

Clarity

The formula clarifies why “compute digit n” is not one computational problem independent of representation. A digit belongs to a base. Multiplying by 16^n shifts hexadecimal positions exactly, and the series already contains powers of 16. That shared radix is what makes modular reduction local. Decimal digits do not inherit the property merely because every real number can be written in base ten.

Manages Complexity

A naïve request for the digit at an enormous position appears to require storing an enormous prefix. BBP changes the state representation. Instead of maintaining digits 1...n, it maintains residues of powers modulo comparatively small denominators plus a short floating-point tail. The storage need grows polylogarithmically rather than with the length of the skipped expansion.

Abstract Reasoning

Radix-compatibility inference: if a series is weighted by powers of base b, multiplying by b^n aligns its fractional part with base-b digits. The same conclusion does not automatically hold in an unrelated base.

Modular-reduction inference: for head terms with nonnegative exponent, only b^(n-k) mod q(k) affects the fractional quotient modulo one. Replacing an enormous numerator by its residue preserves the desired fractional part.

Knowledge Transfer

Inside computational number theory, the method transfers exactly to BBP-type identities: identify a radix-weighted rational or polylogarithmic series, shift by the target position, split head and tail, reduce the head modularly, bound the tail, and extract the fractional digits. Constants, bases, coefficients, and denominator lanes change while the algorithmic skeleton remains.

The discovery workflow also transfers within experimental mathematics: compute high-precision candidate values, search for an integer relation, simplify the relation into a structured series, and then prove it analytically. The workflow is useful but must preserve the proof boundary.

Relationships to Other Abstractions

Local relationship map for Bailey–Borwein–Plouffe FormulaParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Bailey–Borwein–Plouf…DOMAINPrime abstraction: Algorithm — presupposesAlgorithmPRIME

Current abstraction Bailey–Borwein–Plouffe Formula Domain-specific

Parents (1) — outgoing typed relations

  • Bailey–Borwein–Plouffe Formula presupposes Algorithm Prime

    The broader abstraction is prime:algorithm by strict compositional presupposition.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Bailey–Borwein–Plouffe Formula sits in a sparse region of the domain-specific corpus (86th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Numeral Systems & Digit Algorithms (11 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25