Skip to main content
QUICK REVIEW

[Paper Review] A natural prime-generating recurrence

Eric Rowland|ArXiv.org|Oct 17, 2007
Advanced Combinatorial Mathematics8 references16 citations
TL;DR

This paper presents a naturally occurring prime-generating recurrence defined by $ a(n) = a(n-1) + \gcd(n, a(n-1)) $ with initial value $ a(1) = 7 $, proving that the differences $ a(n) - a(n-1) $ are always 1 or prime. The key contribution is an elementary proof of this primality property, leveraging number-theoretic properties of the GCD and a structural lemma that identifies the minimal $ k $ for which $ \gcd(n+k, a(n-1)+k) \neq 1 $, enabling efficient computation of nontrivial prime outputs.

ABSTRACT

For the sequence defined by a(n) = a(n-1) + gcd(n, a(n-1)) with a(1) = 7 we prove that a(n) - a(n-1) takes on only 1s and primes, making this recurrence a rare "naturally occurring" generator of primes. Toward a generalization of this result to an arbitrary initial condition, we also study the limiting behavior of a(n)/n and a transience property of the evolution.

Motivation & Objective

  • To investigate whether a non-engineered, naturally occurring recurrence can generate primes reliably.
  • To prove that the recurrence $ a(n) = a(n-1) + \gcd(n, a(n-1)) $ with $ a(1) = 7 $ produces only 1s and primes as differences.
  • To generalize the behavior of the recurrence for arbitrary initial conditions and analyze its long-term evolution and convergence.
  • To develop a computational shortcut based on the structure of GCD behavior to efficiently extract prime outputs without computing all intermediate steps.

Proposed method

  • Define the recurrence $ a(n) = a(n-1) + \gcd(n, a(n-1)) $ with $ a(1) = 7 $, and analyze the sequence of differences $ \gcd(n, a(n-1)) $.
  • Use the fundamental property that $ \gcd(n, m) $ divides any integer linear combination $ rn + sm $ to analyze the structure of nontrivial GCDs.
  • Introduce a lemma identifying the minimal $ k \geq 1 $ such that $ \gcd(n+k, a(n-1)+k) \neq 1 $, based on the prime divisors of $ \Delta = a(n-1) - n $.
  • Express the minimal $ k $ as $ \min\{ \textnormal{mod}_1(-n, p) \mid p \mid \Delta \} $, where $ p $ is a prime divisor of $ \Delta $.
  • Apply this lemma to skip sequences of 1s in the difference sequence and directly compute the next nontrivial GCD, which is either 1 or a prime.
  • Use the transformation $ n' = n/2 $, $ a'(n') = a(n) - n/2 $ to emulate $ r=2 $ evolutions via $ r=3 $, enabling faster computation and structural comparison.

Experimental results

Research questions

  • RQ1Does the recurrence $ a(n) = a(n-1) + \gcd(n, a(n-1)) $ with $ a(1) = 7 $ generate only 1s and primes as differences?
  • RQ2Can the behavior of this recurrence be generalized to arbitrary initial conditions, and what is the limiting behavior of $ a(n)/n $?
  • RQ3What is the structure of the sequence of 1s, and can they be skipped efficiently to extract only prime outputs?
  • RQ4Do all primes (except possibly 2) appear in the difference sequence for this recurrence?
  • RQ5How do different initial conditions evolve, and do they eventually converge to equivalent trajectories?

Key findings

  • The recurrence $ a(n) = a(n-1) + \gcd(n, a(n-1)) $ with $ a(1) = 7 $ produces differences that are exclusively 1 or prime, as proven via number-theoretic properties of GCD.
  • The minimal $ k \geq 1 $ such that $ \gcd(n+k, a(n-1)+k) \neq 1 $ is given by $ \min\{ \textnormal{mod}_1(-n, p) \mid p \text{ prime}, p \mid (a(n-1) - n) \} $, enabling efficient skipping of 1s.
  • After 10,000 applications of the shortcut from $ a(1) = 7 $, the smallest odd prime not yet generated is 587, suggesting all primes except possibly 2 may eventually appear.
  • For $ r=3 $, primes congruent to 5 modulo 6 are always generated after large gaps, and the next nontrivial GCD is always 3.
  • Evolutions from different initial conditions frequently converge to the same trajectory, with only 203 distinct equivalence classes found below $ n = 2^{23} $ for initial values $ 4 \leq a(1) \leq 2^{13} $.
  • The $ r=2 $ evolution can be emulated by an $ r=3 $ evolution via the transformation $ n' = n/2 $, $ a'(n') = a(n) - n/2 $, preserving the GCD structure and enabling faster computation.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.