encyclopegia.org

Pillai sequence

The Pillai sequence is the sequence of integers that have record numbers of terms in their greedy representations as sums of prime numbers (and one).[src] It is named after Subbayya Sivasankaranarayana Pillai, who first defined it in 1930.[src] It would follow from Goldbach's conjecture that every integer greater than one can be represented as a sum of at most three prime numbers.[src] However, finding such a representation could involve solving instances of the subset sum problem, which is computationally difficult.[src] Instead, Pillai considered the following simpler greedy algorithm for finding a representation of n as a sum of primes: choose the first prime in the sum to be the largest prime p that is at most n , and then recursively construct the remaining sum recursively for n-p .[src] If this process reaches zero, then it halts; if it reaches one instead of zero, then it must include one in the sum (even though it is not prime), and then halt.[src] For instance, this algorithm represents 122 as 113 + 7 + 2, even though the shorter representations 61 + 61 or 109 + 13 are also possible.[src] The n th number in the Pillai sequence is the smallest number whose greedy representation as a sum of primes (and one) requires n terms.[src] These numbers are :0, 1, 4, 27, 1354, 401429925999155061, ...[src] .…[src]

The Pillai sequence is the sequence of integers that have record numbers of terms in their greedy representations as sums of prime numbers (and one).[src] It is named after Subbayya Sivasankaranarayana Pillai, who first defined it in 1930.[src] It would follow from Goldbach's conjecture that every integer greater than one can be represented as a sum of at most three prime numbers.[src] However, finding such a representation could involve solving instances of the subset sum problem, which is computationally difficult.[src] Instead, Pillai considered the following simpler greedy algorithm for finding a representation of n as a sum of primes: choose the first prime in the sum to be the largest prime p that is at most n , and then recursively construct the remaining sum recursively for n-p .[src] If this process reaches zero, then it halts; if it reaches one instead of zero, then it must include one in the sum (even though it is not prime), and then halt.[src] For instance, this algorithm represents 122 as 113 + 7 + 2, even though the shorter representations 61 + 61 or 109 + 13 are also possible.[src] The n th number in the Pillai sequence is the smallest number whose greedy representation as a sum of primes (and one) requires n terms.[src] These numbers are 0, 1, 4, 27, 1354, 401429925999155061, ...[src] .[src] Each number a(n) in the sequence is the sum of the previous number a(n-1) with a prime number p , the smallest prime whose following prime gap is larger than a(n-1) .[src] For instance, the number 27 in the sequence is 4 + 23, and the first prime gap larger than 4 is the one between 23 and 29.[src] Because the prime numbers become less dense as they become larger (as quantified by the prime number theorem), there is always a prime gap larger than any term in the Pillai sequence, so the sequence continues to an infinite number of terms.[src] However, the terms in the sequence grow very rapidly; Cramér's conjecture implies the sequence grows tetrationally.[src] It has been estimated that expressing the next term in the sequence would require "hundreds of millions of digits".[src] ==References==[src]

26 sentences · 26 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Pillai sequence." encyclopegia.org, 2025, https://encyclopegia.org/wiki/pillai-sequence. Accessed 29 November 2026.

Chicago

"Pillai sequence." encyclopegia.org. Accessed November 29, 2026. https://encyclopegia.org/wiki/pillai-sequence.

APA

encyclopegia.org. (2025). Pillai sequence. Retrieved November 29, 2026, from https://encyclopegia.org/wiki/pillai-sequence

Accessed November 29, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

sequence

stub · references available

Just in sequence

stub · references available

sonnet sequence

stub · references available

Sequence

stub · references available

adenoma-carcinoma sequence

stub · references available

Golomb sequence

stub · references available

Thakazhi Sivasankara Pillai

stub · references available

Baum–Sweet sequence

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1297148594 · 0.5 · snapshot enwiki-001297148594

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.