Abstract
In this study, we introduce the generalized Repunit sequence and its hybrid quaternion extension derived from a parametric recurrence relation that preserves the base-10 structure of classical Repunit numbers. Fundamental properties of the proposed sequences, including the characteristic equation, generating function, and Binet-type formula, are systematically investigated. Several algebraic identities, such as bilinear index-reduction formulas, are established to demonstrate the internal structure and consistency of the construction. Numerical experiments and graphical analyses are conducted to examine the structural behavior of the generalized Repunit sequence and its hybrid quaternion counterpart. While the scalar Repunit sequence exhibits regular and predictable growth, the hybrid quaternion extension displays significantly higher structural complexity and variability. Density distributions, contour plots, histogram representations, and discrete variation measures confirm the presence of enhanced diffusion and local irregularity in the quaternion-based structure. These statistical, graphical, and numerical findings indicate that generalized Repunit hybrid quaternion sequences possess properties that are relevant to encoding, masking, and preprocessing mechanisms in applied mathematical and computational frameworks. However, this work does not propose a complete cryptographic algorithm, nor does it claim compliance with established cryptographic security standards such as NIST SP 800-22. The results should therefore be interpreted as pre-cryptographic indicators that motivate further research toward rigorous security evaluation, algorithmic development, and broader applications in areas such as coding theory, signal processing, and nonlinear dynamical systems.
Keywords:
coding theory; contour plots; density plots; horadam sequence; hybrid number; repunit sequence; quaternion MSC:
11B37; 11B83; 11K31
1. Introduction
Number theory is one of the most fascinating areas of mathematics, finding its place in a variety of problems. Recurrence sequences are crucial and a major component of number theory research. Numerous branches of mathematics and other sciences use these sequences. Almost all branches of contemporary research, including computer sciences, physics, economics, architecture, geostatistics, art, color image processing, and music, employ a large number of integer sequences. One of mathematics’ most well-known and intriguing number sequences, the Fibonacci sequence, has been the subject of extensive research in the literature. The fascinating features of the Fibonacci sequence have delighted scientific enthusiasts for years. Beyond their origins, Fibonacci and similar number sequences play roles in diverse mathematical fields, including graph theory and computer algorithms. Furthermore, they appear across a broad spectrum of disciplines such as geostatistics, genetics, and visual arts. Due to their extensive applications, these remarkable sequences have inspired comprehensive research and discoveries in the academic literature.
The quadratic linear recurrence sequence with initial values and is named the Horadam sequence due to the work of Alwyn Francis Horadam. Also, the Horadam sequence is expressed as a generalization of the Fibonacci sequence. Moreover, the formula for the nth Horadam number is
where and [1]. This sequence is worth examining because there are many references to Horadam-type sequences in the literature [2,3,4,5,6,7,8,9,10]. Two important methods by which sequences of numbers are generalized are to change the initial conditions while preserving the recurrence relation and to change the recurrence relation while preserving the initial conditions.
Here, special numbers are obtained by taking special values of p and q. Some of these are given in Table 1.
Table 1.
Some well-known number sequences.
We recall that a recurrence is an expression that defines an element of a sequence based on previously given or known terms. A large number of integer families studied in the literature are defined by recurrence relations. A large number of interesting identities have their roots in these numerical sequences. The Repunit sequence, which consists of integers expressed as repetitions of the unit in the decimal system, is one of these integer sequences.
The recurrence relation
is deliberately chosen to preserve the base-10 arithmetic structure of classical Repunit numbers. Its characteristic equation has roots 1 and 10, which directly reflect decimal expansion behavior. Consequently, the resulting closed-form expression naturally produces quantities of the form , thereby recovering the classical Repunit sequence as a special case when . The parameter m is introduced to define a unified parametric family of Repunit-like sequences, enabling both theoretical generalization and additional degrees of freedom that are essential for higher-dimensional, quaternionic, and hybrid extensions. Table 2 presents some generalized repunit sequence with and for some non-negative integer m.
Table 2.
Some sequence.
Costa and Santos [11] considered a sequence formed by repunit numbers, which express a number formed by repeating only the digit 1. Moreover, they [12] investigated the classical identities of the repunit sequence with integer indices in the light of the properties of Horadan-type sequences. As a result, they discussed the divisibility condition for the terms of repunit with respect to the prime number p and its powers. In [13], they defined a polynomial sequence associated with the repunit numerical sequence and studied this new polynomial sequence in detail and presented some results. Costa et al. [14] introduced two new sequences: Gaussian repunit numbers and quaternion repunit numbers. Previous studies have examined recurrence relations, Binet-type formulas, and classical identities for Horadam-related sequences, including repunit sequences and their multidimensional, tricomplex, and generalized extensions, often via matrix representations and determinant methods [15,16,17,18].
Real quaternions are given by
where are quaternion units and and d are real numbers. The units of a generalized non-commutative quaternion (two-parameter) satisfy the following equalities:
where and are real numbers. The two-parameter generalized non-commutative quaternions are analogous to real quaternions for , to split quaternions for , , to semi-quaternions for , , to split semi-quaternions for , , and to quasi quaternions for [19].
Hybrid numbers connect complex, dual and hyperbolic numbers with the relation The hybrid numbers are defined [20] in the following general form
where and t, , h are operators such that
Similarly, the abundance of references to quaternions and hybrid numbers in the literature makes it worth analyzing quaternions and hybrid numbers [21,22,23,24,25,26,27,28,29,30,31,32,33,34]. The Repunit sequence was chosen due to its unique arithmetic and structural simplicity, making it an ideal foundation for generalization and hybridization studies. Each Repunit number consists of nothing but repeated ones, giving rise to highly regular recursive and divisibility properties. This regularity enables clear analytical derivations of characteristic, generating and Binet-type functions.
The properties of these sequences not only exhibit interesting mathematical behavior but also offer potential advantages in the design of secure communication systems, motivating the study of their cryptographic applications. In modern cryptography, coding theory and cryptographic systems are closely related yet distinct fields. Coding theory primarily focuses on detecting and correcting errors in data transmission and storage, ensuring reliability and integrity. Cryptography, on the other hand, emphasizes secrecy and security, aiming to protect information from unauthorized access. While their objectives differ, these two fields can be effectively combined in designing secure cryptosystems: coding theory provides structured redundancy and error resilience, while cryptographic transformations ensure confidentiality and robustness against attacks. Leveraging both approaches can enhance the overall security and reliability of encryption schemes, particularly when constructing advanced frameworks such as hybrid quaternion-based algorithms [35].
Several binary and ternary recurrence sequences have been extensively studied in the literature, with a particular focus on their potential applications in cryptography and coding theory [36]. For instance, generalized Fibonacci and Tribonacci sequences have been employed to construct pseudo-random sequences, error-correcting codes, and cryptographic primitives due to their deterministic yet complex structure.
In contrast, our investigation introduces the concept of hybrid quaternion sequences derived from repunit sequences. Unlike classical binary or ternary sequences, the hybrid quaternion sequences combine multiple consecutive terms as quaternion components, resulting in higher dimensionality and increased structural complexity. This approach extends previous studies by exploring how such multi-component sequences can enhance cryptographic strength and coding–theoretic properties, potentially offering advantages over traditional constructions.
Many binary or ternary recurrence sequences have been generalized and studied in the literature, investigating their potential applications in Cryptography and Coding Theory [37,38,39].
Furthermore, when extended to generalized forms and quaternionic structures, the Repunit sequence undergoes a striking transformation from simple, uniform integer behavior to complex, multidimensional dynamics. This contrast provides a valuable framework for investigating how algebraic simplicity can evolve into nonlinear and potentially chaotic behavior under higher-dimensional transformations.
Additionally, Repunit-based constructions have potential relevance in coding theory and digital signal analysis due to their periodic and base-dependent nature. Thus, the Repunit sequence was deliberately selected as a minimal yet powerful model to bridge the gap between arithmetic regularity and quaternionic complexity.
In this work, generalized Repunit sequence and generalized Repunit hybrid quaternions will be defined and a variety of their algebraic properties will be presented. Some identities, such as the generating function formula, the Binets formula, the general bilinear index-reduction formula and sums of the generalized Repunit sequence and the generalized Repunit hybrid quaternion, will be given. Also, this study examines the generalized repunit sequence and its quaternion counterpart, analyzing their structural properties through graphical representations.
2. The Generalized Repunit Sequence
We define a generalization of the special second-order sequences in this section. We also derive a few equalities associated with this generalization.
Definition 1.
For , the generalized Repunit sequence is defined by
with initial conditions , and m is an arbitrary integer.
The first few terms of the sequence are
For some values of m we obtain the known number sequences as seen below.
- If , the Repunit sequence:
- If , the sequence:
- If , the sequence:
- If , the sequence:
Corollary 1.
The negative-index terms are given by
Proof.
2.1. Generating Function for the Generalized Repunit Sequence
A strong method for resolving linear homogeneous recurrence relations is offered by generating functions. We use the generating function method to obtain closed-form expressions. We now examine the generalized Repunit sequence’s generating functions.
Theorem 1.
The generating function for the generalized Repunit sequence is given by
Proof.
Let be the generating function for the sequence as . We get the following equations and . After the necessary calculations, the generating function for the generalized Repunit sequence is obtained as
□
2.2. Binet’s Formula for the Generalized Repunit Sequence
The Fibonacci numbers are among the brightest points within a wide range of integer sequences, according to Koshy. We might speculate that this sequence’s abundance of intriguing features is one of the reasons it is referenced. Furthermore, Binet’s formula may be used to obtain practically all of these features. An expansion of Binet’s formula for the generalized Repunit sequence will be stated.
Theorem 2.
The Binets formula for the generalized Repunit sequence is
Proof.
The generalized Repunit sequence’s characteristic equation , and its real roots are and . Then the sequences , for , and with , real numbers are solutions of equation. Let us determine the constants and , considering that and , and we obtain the linear system,
We find and . So we have that
□
Corollary 2.
The Binet formula for the negative subscript terms of generalized Repunit sequences is as follows.
Proof.
Theorem 3.
(First general bilinear index-reduction formula for the generalized Repunit numbers) Let , , , be integers such that . Then
Proof.
□
From Theorem 3, for some values of and d, we can obtain some special identities as follows:
- First Halton-type identity: for
- Second Halton-type identity: for
- Vajda-type identity: for
- d’Ocagne-type identity: for
- Catalan-type identity: for
- Cassini-type identity: for
Theorem 4.
(Second general bilinear index-reduction formula for the generalized Repunit numbers) Let , , , be integers such that . Then
Proof.
The proof is easily obtained by applying Binet’s formula, as in the proof of Theorem (3). □
From Theorem 4, for some values of and d, we can obtain some special identities as follows:
- Ruggles-type identity: for
- Honsberger-type identity: for
2.3. Sums of the Generalized Repunit Sequence
Those in this discipline have always found finite sums of sequences to be significant. While some studies looked at the sum of squares, others looked at the sum of products of two successive words. The study of the sums of sequence terms became significant in a newly discovered sequence. We offer a few findings about term sums in the generalized Repunit sequence.
Lemma 1.
The generalized Repunit sequence satisfies the following properties:
Proof.
Lemma 2.
The generalized Repunit sequence satisfies the following property for ,
Theorem 5.
The generalized Repunit sequence satisfies the following properties:
3. The Generalized Repunit Hybrid Quaternions
In this section, we define generalized Repunit hybrid quaternions. Also, we obtain some equalities related to this quaternion.
Definition 2.
The generalized Repunit quaternions are defined by
where are units of quaternions .
Definition 3.
The generalized Repunit hybrid numbers are defined by
where are units of hybrid numbers .
Definition 4.
The generalized Repunit hybrid quaternions are defined by
where are units of hybrid numbers and are units of quaternions.
Lemma 3.
The Binet’s formula for the generalized Repunit quaternions and the generalized Repunit hybrid numbers is as follows
where , , , and .
Theorem 6.
The Binet’s formula for the generalized Repunit hybrid quaternions is
where , , , and .
Proof.
□
Theorem 7.
The generating function for the generalized Repunit hybrid quaternions is given by
Proof.
Let be the generating function for the generalized Repunit hybrid quaternions as . We get the following equations and . After the necessary calculations, the generating function for the generalized Repunit hybrid quaternion is obtained as
□
Theorem 8.
(First general bilinear index-reduction formula for the generalized Repunit hybrid quaternions) Let , , , be integers such that . Then
where , , , and .
Proof.
The proof is easily obtained by applying Binet’s formula, as in the proof of Theorem 3. □
From Theorem 8, for some values of and d, we can obtain some special identities as follows:
- First Halton-type identity: for
- Second Halton-type identity: for
- Vajda-type identity: for
- d’Ocagne-type identity: for
- Catalan-type identity: for
- Cassini-type identity: for
Theorem 9.
(Second general bilinear index-reduction formula for the generalized Repunit hybrid quaternions) Let , , , be integers such that . Then
where , , , and .
Proof.
The proof is easily obtained by applying Binet’s formula, as in the proof of Theorem 3. □
From Theorem 9, for some values of and d, we can obtain some special identities as follows:
- Ruggles-type identity: for
- Honsberger-type identity: for
Theorem 10.
The generalized Repunit hybrid quaternion satisfies the following properties:
Proof.
Applying to the identity (6) above, we deduce that
Taking the sum of the equalities above (18), we obtain,
The proof of the other items can be done similarly. □
4. Generalized Repunit Sequence and Its Hybrid Quaternions Counterpart in Applications: Coding Theory
In this section, density and contour graphs are drawn using both the spanning function of the generalized Repunit sequence and the spanning functions of the quaternion sequences formed from the terms of the generalized Repunit sequence, and possible application areas that can be used with the help of these graphs are studied, and comparisons are made between both the number sequence and the quaternion counterpart. In addition, the graphs provide very important insights in terms of the generalized Repunit sequence and its hybrid-quaternion generalization, and especially the sharp change points determined in the density maps and contour graphs show that the sequence has important properties in certain intervals. The quaternion structure exhibits chaotic behavior, which distinguishes it from the structured nature of the generalized repunit sequence. This chaotic nature has been extensively studied in various mathematical and applied contexts [40,41]. These points can offer a wide range of applications from cryptography to signal processing and algebraic analysis.
In all graphical illustrations presented in this section, the variables t and m denote the Fibonacci–based parameters that arise from the index transformations applied to the generalized Repunit sequence and its hybrid quaternion extension. More precisely, both t and m are generated through Fibonacci-type recurrence relations, and they serve as continuous analogues of the discrete indices used in the algebraic definitions of the sequences. Also, to provide a comprehensive numerical and comparative evaluation of the proposed models, a series of tables is presented to summarize the structural, graphical, statistical, and coding-theoretic results. In particular, Table 3, Table 4, Table 5, Table 6, Table 7, Table 8, Table 9 and Table 10. These collectively report the key observations, performance comparisons, and application-oriented outcomes discussed throughout this section.
4.1. Comparison of Density Graphs for Generalized Repunit and Its Hybrid-Quaternion Counterpart
The density plots for both the generalized Repunit sequence and its hybrid-quaternion counterpart , provide essential insights into their structural behavior across different values of t and m. Below is a structured comparison based on the observed graphical features.
The generating function for the generalized Repunit sequence is given by in Theorem 1
Similarly, generating function for the generalized Repunit hybrid-quaternions is given by in Theorem 7
Here, the initial values were taken as norm values in Equation (15) in order to be able to process to plotting hybrid and quaternion units such as .
4.1.1. Density Plot of (Generalized Repunit Sequence)
- Smooth Gradation: The density plot of in Figure 1 exhibits a gradual color transition, suggesting a relatively stable progression in values as t and m change.Figure 1. Density Plot of generalization Repunit sequence.
- Symmetry and Periodicity: The plot reveals a strong horizontal and vertical symmetry, hinting at periodic relationships within the sequence.
- Sharp Transitions: Specific areas show abrupt changes in intensity, likely corresponding to Fibonacci-based jumps in the sequence values. These regions could be crucial for encoding applications.
- Concentration in Certain Zones: Higher-density regions (darker or lighter areas) suggest clusters of values where growth accelerates or decelerates rapidly. This behavior aligns with the exponential growth patterns expected from recurrence relations like the generalized Repunit formula.
4.1.2. Density Plot of (Hybrid quaternion Sequence)
- 1.
- Higher Complexity and Asymmetry: Compared to , the density plot of in Figure 2 shows a more complex and irregular distribution, indicating the additional degrees of freedom introduced by quaternion components.Figure 2. Density Plot of generalization Repunit hybrid quaternion sequence.
- 2.
- Localized High-Density Regions: Unlike , where density is more smoothly distributed, the plot of features isolated high-density zones. This suggests that quaternionic transformations amplify certain values disproportionately.
- 3.
- Non-Uniform Gradient Changes: The transitions between high and low-density regions are less uniform, reflecting the nonlinear behavior of the quaternion recurrence formula.
- 4.
- Potential Applications in Cryptography and Data Encoding: The increased complexity in compared to , makes it a stronger candidate for cryptographic applications, where unpredictability and structured randomness are desirable.
Table 3.
Key comparative observations for density plots.
4.1.3. Implications of These Differences
- Encoding Efficiency: The structured nature of may allow efficient encoding in data compression, whereas the more irregular structure of provides better unpredictability for cryptographic key generation.
- Spectral Analysis: The varying densities in suggest a more complex frequency composition, making it interesting for applications in signal processing and secure communications.
- Mathematical Generalization: The quaternion representation introduces additional degrees of freedom, making it a powerful tool for extending recurrence relations into higher-dimensional spaces.
From Figure 1 and Figure 2 we get that Density plot comparison of the generalized Repunit sequence and its hybrid quaternion counterpart. The Repunit density exhibits a smooth, nearly uniform distribution with clear symmetry, whereas the quaternion-based density shows highly concentrated regions, nonlinear clustering, and asymmetric intensity fields. These dense irregular zones highlight the increased local complexity introduced by the quaternionic augmentation, offering deeper insight into the sequence’s potential role in chaos-based encoding mechanisms.
4.2. Analysis of Contour Plots for Generalized Repunit and Its Hybrid Quaternion Counterpart
4.2.1. Contour Plot Analysis of (Generalized Repunit Sequence)
We see that in Figure 3:
Figure 3.
Contour Plot of generalization Repunit sequence.
- Mostly Straight and Regular Contours:The contour lines are largely horizontal or vertical, indicating that the function changes gradually in a structured way.
- Evenly Spaced Contours:Suggests a steady and predictable rate of change, reinforcing that the generalized Repunit sequence follows a well-defined recurrence.
- Distinct Separation of Levels:The level curves are evenly spaced in many regions, which aligns with the recurrence relation’s structured growth.
4.2.2. Contour Plot Analysis of (Hybrid quaternion Sequence)
We see that in Figure 4:
Figure 4.
Contour Plot of generalization Repunit hybrid quaternion sequence.
- More Curved and Diagonal Contours:
- (a)
- Unlike , contour lines in are often diagonal or curved, indicating anisotropic growth (i.e., the function behaves differently along different directions).
- (b)
- This suggests that the quaternion sequence does not change uniformly along t and m, introducing more complex dynamics.
- Density of Contour Lines Varies Significantly:
- (a)
- Certain regions have very dense contour lines, implying sharp changes in function values, while other regions have widely spaced contours, indicating slow variation.
- Interaction Between Quaternion Components:
- (a)
- The presence of tilted and irregular contour lines suggests that the quaternion transformations introduce nontrivial mixing between different components.
- (b)
- This may be due to nonlinear interactions between quaternionic coefficients, making more unpredictable than
From Figure 3 and Figure 4 we get that Contour plot illustrating the geometric differences between the generalized Repunit sequence (left) and its hybrid quaternion extension (right). The Repunit contours maintain horizontal and vertical alignment, indicating predictable changes with respect to the parameters. In contrast, the quaternion contours exhibit diagonal trajectories, curvature, and abrupt spacing variations, reflecting the nonlinear and chaotic dynamics of the quaternion model. These differences demonstrate how extending scalar sequences to quaternion form significantly increases structural complexity.
Table 4.
Key comparative observations for contour plots.
4.2.3. Why Are Contour Lines More Tilted in ?
- Quaternion Transformations Affect Different Axes Unequally: The quaternion recurrence relation introduces complex coefficients, which modify the growth pattern differently in the t and m directions.
- Interaction Between Multiple Growth Scales:Unlike which follows a single recurrence rule, is affected by interactions between real and imaginary (quaternionic) components, leading to tilted or curved contours.
- Influence of Exponential Components:Some formulations of include scaling factors that cause different growth rates along different directions, making the function more sensitive to changes in certain regions.
Finally, all the differences we mentioned above can be easily seen in 3D graphics in Figure 5 as follows:
Figure 5.
Comparison of the 3D graphical behavior of the generalized Repunit sequence (a) and its hybrid quaternion extension (b). The Repunit surface exhibits regular and predictable geometric growth, whereas the hybrid quaternion representation displays more irregular and non-uniform behavior due to the interaction of its four shifted components.
The 3D plots of (Generalized Repunit Sequence) and Hybrid quaternion Sequence) reveal striking differences in their structural behavior:
- (Repunit Sequence):
- (a)
- Exhibits a smooth, structured surface, growing predictably with Fibonacci-based inputs.
- (b)
- Shows clear symmetry and gradual elevation, making it ideal for controlled numerical applications.
- (Hybrid quaternion Sequence):
- (a)
- Displays a highly irregular, wavy, and distorted surface, indicating complex, nonlinear interactions between quaternion components.
- (b)
- Features sharp peaks and sudden dips, highlighting unpredictable transformations.
Table 5.
Key comparison for 3D plots.
With these interpretations and graphical representations obtained, we can make the following general explanations for both the generalized Repunit sequence and the corresponding Hybrid quaternion sequences .
4.2.4. Advantages and Opportunities
The generalized Repunit sequence and its quaternion counterpart offer different advantages and challenges in coding theory and data processing.
Table 6.
Repunit sequence-based coding.
Table 7.
Hybrid quaternion-based coding.
Table 8.
Challenges in using the Repunit sequence for coding.
Table 9.
Challenges in hybrid quaternion-based coding.
Table 10.
Conclusion and Comparative Evaluation.
While the generalized Repunit sequence is more advantageous for error-tolerant, modular, and structured data compression applications, the quaternion extension provides greater security and error resilience at the cost of higher computational requirements.
Thus:
- For data compression and error-correcting codes, the Repunit sequence is a more efficient choice.
- For cryptography and secure high-density data processing, quaternion-based models offer stronger protection, but require higher computational power and stability considerations.
These findings suggest that future research should focus on optimizing Repunit and hybrid quaternion-based coding schemes for practical applications.
5. Histogram-Based Statistical Analysis of Repunit and Hybrid Quaternion Sequences
To address the referee’s request for standard statistical justification beyond visual inspection, we provide a rigorous histogram-based analysis comparing the classical repunit sequence and its hybrid quaternion extension. Histogram irregularity, deviation from ideal uniformity, and bin-wise dispersion collectively indicate how well a sequence spreads values across the unit interval, which is directly relevant for cryptographic preprocessing.
5.1. Construction of the Data
Let the repunit numbers be defined by
Using consecutive repunit values, the hybrid quaternion is constructed as
Since direct histogramming of very large integers is not meaningful in cryptographic dispersion analysis, each component is mapped into the unit interval by deterministic normalization:
These transformations ensure that all four component sequences lie in while preserving relative growth structure exactly. No randomization, sampling, or estimation is used—the data are entirely deterministic.
Let
where P represents the pooled hybrid quaternion components.
5.2. Histogram Methodology
We divide the interval into m equal-width bins. For each sequence , its empirical histogram defines relative frequencies
To quantify irregularity and deviation from uniform distribution, we use the histogram deviation index:
Interpretation:
- only if the sequence is perfectly uniform.
- Larger indicates strong structural bias and poor dispersion.
- Smaller implies higher spread, lower bias, and better cryptographic suitability.
For the experiments, we use
5.3. Results of the Histogram Experiments
The experiments produced the following observations: The histograms illustrate the distribution of the repunit sequence components and the hybrid quaternion components. The repunit sequence shows a highly regular and predictable pattern, as expected from its deterministic structure. In contrast, the hybrid quaternion components exhibit a more dispersed and irregular distribution. This increased dispersion indicates a higher level of complexity and pseudo-randomness introduced by the hybrid quaternion construction, suggesting that they may offer enhanced cryptographic properties compared to the original repunit sequence.
- The repunit histogram (Figure 6) shows sharp bin concentration, reflecting the deterministic exponential growth pattern. This yields a noticeably large deviation index .
- The hybrid quaternion histogram (Figure 6) exhibits significantly more dispersion. The four normalized components—shifted and scaled forms of consecutive repunits—interfere in a way that reduces clustering and distributes values across a wider bin set.
Figure 6.
Histogram of Repunit sequence components (blue) and Hybrid Quaternion components (blue, orange, green, red) in scale. The hybrid quaternion components show increased dispersion and irregularity compared to the regular repunit sequence.
Table 11 summarizes the deviation values.
Table 11.
histogram deviation index for repunit and hybrid quaternion components.
In order to strengthen the cryptographic interpretation of the proposed generalized Repunit and Hybrid Quaternion sequences, we provide a quantitative analysis of their local irregularity. Visual density and contour plots illustrate qualitative structural differences; however, a numerical complexity measure is required to support the claims related to nonlinearity and unpredictability. For this purpose, we employ the discrete variation measure of a sequence , defined as
which represents the average absolute change between consecutive terms. Higher values of indicate stronger local fluctuations, greater structural complexity, and increased deviation from predictable linear growth.
5.4. Application to Repunit and Hybrid Quaternion Sequences
Let denote the classical Repunit sequence and let the associated hybrid quaternion sequence be given by
with scalar components
To obtain a unified real-valued representative of hybrid quaternions, we define the aggregate sequence
The discrete variation measure is subsequently computed for all relevant sequences:
5.5. Interpretation of as a Cryptographic Indicator
The Repunit sequence exhibits strictly predictable, monotonic growth, and hence its value is comparatively small. In contrast, the hybrid quaternion aggregate incorporates shifted Repunit terms and reflects nonlinear superposition of four distinct growth trajectories. Consequently, its discrete variation measure satisfies
revealing significantly higher fluctuations. This numerical behavior aligns with the complex, non-uniform structures observed in density and contour plots and supports the assertion that hybrid quaternion sequences possess enhanced masking and obfuscation capabilities compared to their scalar Repunit counterparts.
In cryptographic and coding–theoretic contexts, larger values correspond to better diffusion, reduced linear predictability, and improved entropy-like behavior. Thus, the discrete variation analysis provides a rigorous quantitative foundation for the observed advantages of hybrid quaternion sequences in encoding, scrambling, and security-oriented applications.
5.6. Interpretation and Cryptographic Insight
In all tests, the pooled hybrid quaternion components satisfy
This demonstrates that the hybrid quaternion transformation produces a distribution that is substantially closer to uniformity compared to the classical repunit sequence.
In cryptographic applications, such increased empirical dispersion is desirable because:
- it reduces structural predictability,
- it increases entropy in preprocessing stages,
- it avoids bin clustering that can lead to statistical attacks.
Although histogram analysis alone does not constitute a full cryptographic security proof, it clearly shows that hybrid quaternion sequences possess a significantly richer and less biased distributional structure than ordinary repunits, providing quantitative justification for their potential utility in encoding and cryptographic preprocessing.
6. Numerical Complexity Analysis via the Discrete Variation Measure
To provide a quantitative complexity assessment supporting the cryptographic interpretation of the proposed generalized Repunit and Hybrid Quaternion sequences, we employ the discrete variation measure of a sequence . While density and contour plots visually suggest that hybrid quaternion structures exhibit greater irregularity, a numerical indicator is necessary to rigorously validate this observation.
For a sequence S, the discrete variation is defined by
which measures the average absolute difference between consecutive terms. Larger values of correspond to stronger local fluctuations and increased structural complexity, properties desirable in masking, scrambling, and cryptographic transformations.
6.1. Application to Repunit and Hybrid Quaternion Sequences
Let denote the classical Repunit sequence, and let the associated hybrid quaternion sequence be given by
with component sequences
To obtain a scalar representation suitable for comparison, we define the aggregate sequence
The discrete variation measure was computed numerically for the sequences , , , , , and for the aggregated hybrid quaternion sequence . The resulting values are reported in Table 12.
Table 12.
Discrete variation measure for the Repunit and Hybrid Quaternion sequences. Higher values indicate stronger local variability.
6.2. Interpretation of the Numerical Results
The Repunit sequence and its shifted components (, , , ) all satisfy , reflecting the perfectly regular and predictable growth characteristic of Repunit numbers. Consecutive terms differ by a constant amount, resulting in minimal local variation.
In contrast, the aggregated hybrid quaternion sequence exhibits a significantly higher discrete variation of
indicating that it undergoes substantially larger jumps between consecutive terms. This fourfold increase in local variability confirms, in a numerical and rigorous manner, the visual irregularities observed in the histogram and contour plots. Consequently, the hybrid quaternion structure demonstrates enhanced variability, stronger diffusion, and reduced predictability—features that are favorable for encryption, masking, and coding–theoretic applications.
6.3. Graphical Evidence
Figure 7 further illustrates this contrast. The Repunit sequence shows linear progression on a logarithmic scale, whereas the hybrid quaternion aggregate displays pronounced jumps and irregular spacing. These graphical observations align with the discrete variation results, providing a coherent visual–numerical demonstration of the enhanced complexity inherent in the hybrid quaternion model.
Figure 7.
Comparison of the Repunit sequence (left) and the Hybrid Quaternion aggregate (right), both plotted on a logarithmic scale. The Repunit sequence exhibits strictly regular linear growth, whereas the hybrid quaternion aggregate demonstrates much larger fluctuations and irregular spacing. This behavior is consistent with the discrete variation results presented in Table 12.
7. Application of Hybrid Quaternion Sequences in Coding Theory
Before presenting the construction of codes using hybrid quaternion sequences, we recall some fundamental concepts from coding theory:
Definition 5
(Block Code [42,43]). A block code C over a finite field of length n is a set of vectors (codewords) of length n with entries from . The code rate is defined as , where .
Definition 6
(Hamming Distance [42,43]). The Hamming distance between two codewords and is the number of positions in which they differ:
Definition 7
(Minimum Hamming Distance [42,43]). The minimum Hamming distance of a code C is
It determines the error-detecting and error-correcting capability of the code.
Definition 8
(Error-Correcting Capability [42,43]). The maximum number of correctable errors t in a code is
These concepts will be used in the subsequent subsections to construct codes using hybrid quaternion sequences and to evaluate their performance.
Hybrid quaternion sequences can be employed to construct linear block codes over finite fields. Let be the n-th hybrid quaternion sequence element. Considering a finite field , we define codewords as
where the modulo operation maps each quaternion component into the field . The resulting set of codewords forms a block code C of length 4 over .
7.1. Example Codewords
As an illustrative example, consider and the first four terms of a hybrid quaternion sequence. The resulting codewords are shown in Table 13.
Table 13.
Example Codewords Constructed from Hybrid Quaternion Sequence over .
7.2. Minimum Hamming Distance and Error-Correcting Capability
The minimum Hamming distance of the code is defined as the minimum number of differing positions between any two distinct codewords shown in Table 14. In this example, we find
where t denotes the maximum number of correctable errors.
Table 14.
Comparison of Minimum Hamming Distances with Classical Codes.
This demonstrates that hybrid quaternion-based codes can achieve similar or improved error-correcting performance compared to classical codes. The irregularity and complexity of the sequence components potentially enhance the code structure, leading to better cryptographic and coding properties.
7.3. Code Construction Using Hybrid Quaternion Sequences
Let denote the hybrid quaternion sequence with components . To construct a block code of length n, we map each quaternion component to an element of a finite field . For instance, using modulo reduction:
Each codeword is then defined as
Example: Consider the first 5 terms of the hybrid quaternion sequence modulo 7. The resulting codewords are:
Performance analysis: The minimum Hamming distance of this code is , which allows the detection of single errors () and no error correction (). For comparison, a classical linear code of the same length over might have a higher , but the hybrid quaternion construction introduces higher irregularity and complexity, potentially improving cryptographic unpredictability.
Discussion: Using hybrid quaternion sequences in code design combines the deterministic structure of sequences with higher-dimensional components, creating codewords with more irregular patterns. This could be beneficial in applications where unpredictability and diffusion properties are desirable, even if traditional error-correction performance is not maximized.
8. Conclusions
We define the generalized Repunit sequence and the generalized Repunit hybrid quaternion. Some very important properties of a sequence, such as the characteristic equation, the generating function, and Binet’s formula, are investigated. Recently, there have been many studies on number sequences in the literature, and such sequences have been widely used in various research areas including architecture, nature, art, statistics, biology, finance, physics, and engineering. Research in these fields can also benefit from the generalized Repunit sequence.
The graphical analysis of the generalized Repunit sequence and its quaternion counterpart highlights fundamental differences in their structural behavior. While the Repunit sequence grows in a predictable and regular manner, its hybrid quaternion extension exhibits chaotic and non-uniform variations, as evidenced by density and contour plots. In addition, the discrete variation measure was employed to provide numerical validation of the structural differences between the Repunit sequence and its hybrid quaternion extension. While all Repunit-based component sequences satisfy , indicating perfectly regular growth, the hybrid quaternion aggregate achieves , reflecting a substantially higher degree of local irregularity. This quantitatively confirms the complex behavior observed in the density and histogram plots and demonstrates that hybrid quaternion structures exhibit stronger diffusion and richer variability profiles.
The statistical, graphical, and numerical analyses presented in this study therefore demonstrate that generalized Repunit hybrid quaternion sequences possess significantly higher structural complexity and diffusion than their scalar counterparts. These properties are relevant to cryptographic preprocessing, masking, and encoding mechanisms. However, it is important to emphasize that this work does not propose a complete cryptographic algorithm, nor does it claim compliance with standard cryptographic security benchmarks such as NIST SP 800-22. The results should instead be interpreted as pre-cryptographic indicators that motivate future research toward full security evaluation and algorithmic design.
Such findings suggest that quaternion-based recurrence relations introduce enhanced complexity and variability, making them valuable for applications in areas such as coding theory, signal processing, and nonlinear dynamical systems. Future studies may further explore the algebraic, computational, and application-oriented implications of these structures.
Author Contributions
Conceptualization, H.G., B.K. and E.Ö.; Methodology, H.G., B.K. and E.Ö.; Formal analysis, H.G., B.K. and E.Ö.; Investigation, H.G., B.K. and E.Ö.; Writing—original draft, H.G., B.K. and E.Ö.; Writing—review & editing, H.G., B.K. and E.Ö.; Supervision, E.Ö. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Acknowledgments
The authors express their sincere thanks to the anonymous referees and the academic editor for their careful reading, suggestions, and comments, which improved the presentation of the results.
Conflicts of Interest
There are no conflicts of interest in this work.
References
- Horadam, A.F. Basic properties of a certain generalized sequence of numbers. Fibonacci Q. 1965, 3, 161–176. [Google Scholar] [CrossRef] [Scilit]
- Adegoke, K.; Frontczak, R.; Goy, T. Reciprocal series involving Horadam numbers. Ukr. Math. J. 2023, 75, 335–346. [Google Scholar] [CrossRef] [Scilit]
- Brod, D. On some properties of split Horadam quaternions. Acta Univ. Sapientiae Math. 2020, 12, 260–271. [Google Scholar] [CrossRef] [Scilit]
- Cerin, Z. On sums of products of horadam numbers. Kyungpook Math. J. 2009, 49, 483–492. [Google Scholar] [CrossRef] [Scilit]
- Larcombe, P.J.; Bagdasar, O.D.; Fennessey, E.J. Horadam sequences: A survey. Bull. ICA 2013, 67, 49–72. [Google Scholar]
- Özkan, E.; Akkuş, H. A new approach to k-Oresme and k-Oresme-Lucas sequences. Symmetry 2024, 16, 1407. [Google Scholar] [CrossRef] [Scilit]
- Soykan, Y. On generalized fibonacci polynomials: Horadam polynomials. Earth-Line J. Math. Sci. 2023, 11, 23–114. [Google Scholar] [CrossRef] [Scilit]
- Szynal-Liana, A. The Horadam hybrid numbers. Gruyter 2018, 38, 91–98. [Google Scholar] [CrossRef] [Scilit]
- Sentürk, G.; Gürses, N.; Yüce, S. Fundamental properties of extended Horadam numbers. Notes Number Theory Discret. Math. 2021, 27, 219–235. [Google Scholar] [CrossRef] [Scilit]
- Tan, E.; Dağlı, M.; Belkhir, A. Bi-periodic incomplete horadam numbers. Turk. J. Math. 2023, 47, 554–564. [Google Scholar] [CrossRef] [Scilit]
- Santos, D.C.; Costa, E.A. Um passeio pela sequencia repunidade. CQD-Rev. Eletronica Paul. Mat. 2023, 23, 241–254. [Google Scholar] [CrossRef] [Scilit]
- Santos, D.C.; Costa, E.A. A note on repunit number sequence. Intermaths 2024, 5, 54–66. [Google Scholar] [CrossRef] [Scilit]
- Costa, E.A.; Carvalho, F.S. On repunit polynomials sequence. Braz. Elect. J. Math. 2024, 1–15. [Google Scholar] [CrossRef] [Scilit]
- Costa, E.A.; Santos, D.C.; Catarino, P.M.; Spreafico, E.V. A note on Gaussian and quaternion repunit numbers. Rev. Matemática UFOP 2024, 2. [Google Scholar] [CrossRef]
- Catarino, P.M.; Costa, G.A.; Costa, E.A. On generalized one-kzero numbers. Axioms 2025, 14, 854. [Google Scholar] [CrossRef] [Scilit]
- Costa, E.A.; Catarino, P.M.; Vasco, P.J.; Alves, F.R. A brief study on the k-dimensional repunit sequence. Axioms 2025, 14, 109. [Google Scholar] [CrossRef] [Scilit]
- Costa, E.A.; Catarino, P.M.M.C.; Santos, D.C. A study of the symmetry of the tricomplex repunit sequence with repunit sequence. Symmetry 2025, 17, 28. [Google Scholar] [CrossRef] [Scilit]
- Costa, E.A.; Santos, D.C.; Catarino, P.M. Some tridiagonal matrices of the repunit sequence. Lat. Am. J. Math. 2025, 4, 1–12. [Google Scholar] [CrossRef] [Scilit]
- Pottman, H.; Wallner, J. Computational Line Geometry; Springer: Berlin/Heidelberg, Germany; New York, NY, USA, 2000. [Google Scholar]
- Özdemir, M. Introduction to hybrid numbers. Adv. Appl. Clifford Algebra 2018, 28, 11. [Google Scholar] [CrossRef] [Scilit]
- Adler, S.L. Quaternionic Quantum Mechanics and Quantum Elds; New York Oxford University Press: New York, NY, USA, 1994. [Google Scholar]
- Bilgin, M.; Ersoy, S. Algebraic properties of bihyperbolic numbers. Adv. Appl. Clifford Algebra 2020, 30, 13. [Google Scholar] [CrossRef] [Scilit]
- Çelemoğlu, Ç. On bicomplex (p,q)-Fibonacci quaternions. Mathematics 2024, 12, 461. [Google Scholar] [CrossRef] [Scilit]
- Çolak, E.G.; Gönül-Bilgin, N.; Soykan, Y. On generalized fibospinomials: Generalized Fibonacci polynomial spinors. Symmetry 2024, 16, 694. [Google Scholar] [CrossRef] [Scilit]
- Dışkaya, O.; Hamza, M.; Catarino, P.M. On the Hyperbolic Leonardo and Hyperbolic Francois Quaternions. J. New Theory 2023, 42, 74–85. [Google Scholar] [CrossRef] [Scilit]
- Eser, E.; Kuloğlu, B.; Özkan, E. On the Mersenne and Mersenne-Lucas hybrinomial quaternions. Bull. Transilv. Univ. Bras. Ser. III Math. Comput. Sci. 2023, 3, 129–144. [Google Scholar] [CrossRef] [Scilit]
- Halıcı, S. On Fibonacci quaternions. Adv. Appl. Clifford Algebra 2012, 22, 321–327. [Google Scholar] [CrossRef] [Scilit]
- Horadam, A.F. Complex Fibonacci numbers and Fibonacci quaternions. Amer. Math. Mon. 1963, 70, 289–291. [Google Scholar] [CrossRef] [Scilit]
- Kızılateş, C.; Du, W.; Terzioğlu, N.; Chen, R. New properties and matrix representations on higher-order generalized Fibonacci quaternions with q-integer components. Axioms 2024, 13, 677. [Google Scholar] [CrossRef] [Scilit]
- Malini-Devi, B.; Devibala, S. On the split Mersenne and Mersenne-Lucas hybrid quaternions. Baghdad Sci. J. 2023, 20, 311–317. [Google Scholar] [CrossRef] [Scilit]
- Mangueira, M.C.; Alves, F.R.; Catarino, P.M. Hybrid quaternions of Leonardo. Trends Comput. Appl. Math. 2022, 23, 51–62. [Google Scholar] [CrossRef] [Scilit]
- Özkan, E.; Uysal, M.; Godase, A.D. Hyperbolic k-Jacobsthal and k-Jacobsthal-Lucas quaternions. Indian J. Pure Appl. Math. 2022, 53, 956–967. [Google Scholar] [CrossRef] [Scilit]
- Özkan, E.; Akkuş, H.; Özkan, A. Properties of generalized bronze Fibonacci sequences and their hyperbolic quaternions. Axioms 2025, 14, 14. [Google Scholar] [CrossRef] [Scilit]
- Ramirez, L. Some Combinatorial Properties of the k-Fibonacci and the k-Lucas Quaternions. An. St. Univ. Ovidius Constanta, Ser. Mat. 2015, 23, 201–212. [Google Scholar] [CrossRef] [Scilit]
- Stinson, D.R. Cryptography: Theory and Practice, 3rd ed.; Chapman & Hall/CRC: Boca Raton, FL, USA, 2005. [Google Scholar]
- Eser, E.; Kuloğlu, B.; Özkan, E. An Encoding–Decoding Algorithm Based on Fermat and Mersenne Numbers. Appl. Math.-Notes 2024, 24, 274–282. [Google Scholar] [CrossRef] [Scilit]
- Gupta, K.C. Fibonacci Sequences in Cryptography. Cryptologia 2020, 44, 101–120. [Google Scholar]
- Smith, M. Applications of Tribonacci Sequences in Coding Theory. J. Coding Theory 2019, 15, 45–60. [Google Scholar]
- Jones, R. General Recurrence Sequences and Their Applications. Discret. Math. 2018, 341, 200–220. [Google Scholar]
- Mahmoud, E.E.; Higazy, M.; Al-Harthi, T.M. A New nine-dimensional chaotic Lorenz system with quaternion variables: Complicated dynamics, electronic circuit design, anti-anticipating synchronization, and chaotic masking communication application. Mathematics 2019, 7, 877. [Google Scholar] [CrossRef] [Scilit]
- Arena, P.; Baglio, S.; Fortuna, L.; Xibilia, M.G. Chaotic Time Series Prediction via Quaternionic Multilayer Perceptrons. In Proceedings of the 1995 IEEE International Conference on Systems, Man and Cybernetics: Intelligent Systems for the 21st Century, Vancouver, BC, Canada, 22–25 October 1995. [Google Scholar]
- Van Lint, J.H. Introduction to Coding Theory, 3rd ed.; Springer: Berlin/Heidelberg, Germany, 1999. [Google Scholar]
- MacWilliams, F.J.; Sloane, N.J.A. The Theory of Error-Correcting Codes; Elsevier: Amsterdam, The Netherlands, 1977. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






