Back to Research

    The Generalized Index Generator (GIG)

    For the Set of Primes and Composites Coprime to 6

    By Lord Sofiane AouadeneIndependent Researcher and Curious MindDecember 1, 2025Preprint — Not Peer-Reviewed

    Abstract

    This paper introduces a novel, compact, single-variable quadratic equation, termed the Generalized Index Generator (GIG), which deterministically generates every element of the set Seq={nZ+gcd(n,6)=1}\mathbf{Seq} = \{n \in \mathbb{Z}^+ \mid \gcd(n, 6) = 1\}. This set contains all prime numbers greater than 3. The GIG unifies the two established arithmetic progressions, 6k±16k \pm 1, into a single formula using a signed, alternating integer index nn. We prove the equivalence of the GIG to the traditional linear forms and demonstrate its immediate utility in formulating a two-variable composite number generator, which serves as a foundation for a deterministic algebraic sieve for prime counting.

    Introduction and Context

    The study of prime numbers often begins with the recognition that all primes p>3p > 3 must be of the form 6k±16k \pm 1. This observation defines a highly structured search space for primality, restricting the domain of interest to the set Seq\mathbf{Seq}:

    Seq={xZ+x=6k±1,kZ1}{1}\mathbf{Seq} = \{x \in \mathbb{Z}^+ \mid x = 6k \pm 1, k \in \mathbb{Z}_{\ge 1}\} \cup \{1\}

    Traditionally, generating the elements of Seq\mathbf{Seq} requires two separate linear formulas or conditional statements based on the index kk. This inherent discontinuity complicates the analytical treatment of the prime counting function π(x)\pi(x) within this restricted domain.

    This paper proposes the Generalized Index Generator (GIG), a unified formula that generates every element of Seq\mathbf{Seq} sequentially using a single variable, nn, thus eliminating the need for a case distinction.

    The Generalized Index Generator (GIG)

    Definition of the GIG

    Let II be the ordered alternating integer index set:

    I={0,1,1,2,2,3,3,,n,n,}I = \{0, 1, -1, 2, -2, 3, -3, \dots, n, -n, \dots\}

    The Generalized Index Generator (GIG) is defined as the sequence x(n)x(n) where:

    x(n)=12n(3n1)+1\mathbf{x(n) = \sqrt{12n(3n - 1) + 1}}

    (1) The Generalized Index Generator (GIG)

    Proof of Equivalence

    We prove that the GIG, x(n)x(n), is algebraically equivalent to the set of numbers generated by the traditional forms 6k±16k \pm 1 by analyzing the case where nZn \in \mathbb{Z} is non-zero. The fundamental requirement is that the radicand, R(n)=12n(3n1)+1R(n) = 12n(3n - 1) + 1, must always be a perfect square for nZn \in \mathbb{Z}.

    Case 1: n>0n > 0.

    Let k=nk = n.

    R(n)=36n212n+1=(6n1)2R(n) = 36n^2 - 12n + 1 = (6n - 1)^2

    Thus, for n>0n > 0, the GIG yields:

    x(n)=(6n1)2=6n1x(n) = \sqrt{(6n - 1)^2} = 6n - 1

    This generates the 6k16k - 1 branch of Seq\mathbf{Seq} (e.g., 5, 11, 17...).

    Case 2: n<0n < 0.

    Let k=n=nk = |n| = -n. Since nZn \in \mathbb{Z}^-, kZ+k \in \mathbb{Z}^+.

    R(n)=12(k)(3(k)1)+1=(6k+1)2R(n) = 12(-k)(3(-k) - 1) + 1 = (6k + 1)^2

    Thus, for n<0n < 0, the GIG yields:

    x(n)=(6k+1)2=6k+1=6n+1x(n) = \sqrt{(6k + 1)^2} = 6k + 1 = 6|n| + 1

    This generates the 6k+16k + 1 branch of Seq\mathbf{Seq} (e.g., 7, 13, 19...).

    Case 3: n=0n = 0.

    x(0)=12(0)(01)+1=1x(0) = \sqrt{12(0)(0 - 1) + 1} = 1

    Since every element in Seq\mathbf{Seq} is generated by either 6k16k-1 or 6k+16k+1, the GIG generates the entire set Seq\mathbf{Seq} using the continuous alternating index nn.

    Applications in Deterministic Number Theory

    Deterministic Counting Function NSeq(x)N_{\text{Seq}}(x)

    The GIG provides a simple, deterministic counting function for the total number of elements in Seq\mathbf{Seq} up to a given index n|n|:

    NTotal(n)=2n+1\mathbf{N}_{\text{Total}}(|n|) = 2|n| + 1

    To count the elements up to a specific value xSeqx \in \mathbf{Seq}, one need only solve the GIG equation for the corresponding index nn, which is directly proportional to xx.

    The Composite Generator C(nA,nB)C(n_A, n_B)

    The set Seq\mathbf{Seq} is closed under multiplication. The GIG allows the formal definition of all composite numbers CC in Seq\mathbf{Seq} using a single two-variable equation, where nAn_A and nBn_B are the indices corresponding to factors AA and BB:

    C(nA,nB)=12nA(3nA1)+112nB(3nB1)+1\mathbf{C(n_A, n_B) = \sqrt{12n_A(3n_A - 1) + 1} \cdot \sqrt{12n_B(3n_B - 1) + 1}}

    (2) The Composite Generator C(nA,nB)C(n_A, n_B)

    This single-form equation replaces the necessity of a complex, four-case combinatorial split for the products. This representation provides the algebraic foundation for the set of all "holes" NHoles(x)\mathbf{N}_{\text{Holes}}(x) needed for a deterministic prime counting function:

    π(x)=(NTotal(x)NHoles(x))+2\mathbf{\pi}(x) = \left( \mathbf{N}_{\text{Total}}(x) - \mathbf{N}_{\text{Holes}}(x) \right) + 2

    Further work will focus on the combinatorial analysis of the unique solutions to C(nA,nB)xC(n_A, n_B) \le x to derive the closed-form expression for NHoles(x)\mathbf{N}_{\text{Holes}}(x).

    Conclusion

    The Generalized Index Generator (GIG) provides an elegant, compact, and analytically powerful new tool for research in elementary number theory. By unifying the 6k±16k \pm 1 forms into the single quadratic x(n)x(n), the GIG simplifies the foundational algebra required to define the prime search space. This simplification provides a strong, unified structure necessary for tackling the problem of generating a deterministic algebraic sieve and exploring novel formulations of the Riemann Zeta Function.