Background and Motivation
The golden ratio, $$ \phi = \frac{1 + \sqrt{5}}{2}, $$ is a well-known irrational constant that appears frequently in geometry, algebra, and in the Fibonacci and Lucas sequences. Though fundamentally irrational and geometric, it surprisingly shows up in discrete number theory as well.
Primality testing, on the other hand, is a central topic in number theory with both theoretical and practical importance, especially in cryptography. Most known primality tests rely on modular arithmetic, integer sequences, or algebraic identities — but very few, if any, directly involve irrational constants like $\phi$.
While experimenting numerically with powers of $\phi$, I noticed an unexpected and elegant pattern. The simplicity and strength of this condition — despite its seemingly irrational origin — suggest a potentially deep connection between the golden ratio and prime numbers, possibly via the Lucas or Fibonacci sequences.
This motivates the following natural questions:
- Why does this work?
- Is there a theoretical explanation rooted in recurrence sequences or algebraic number theory?
- Could this inspire a new class of primality tests?
I am sharing this in hopes of uncovering deeper insights or connections that could explain the phenomenon.
The Golden Ratio Primality Test (GRPT)
If any positive integer $n>5$ is not divisible by $2$ or $5$, and satisfies the condition: $$ \lfloor \phi^n \rfloor \mod n = 1, $$
then,
$$ n \text{ is prime}. $$
Here,
$$ \phi=\frac{1+\sqrt{5}}{2}.$$
Empirical Evidence
I have verified GRPT for the range $5<n\leq 1{,}000{,}000 $ using Wolfram GPT.
No false positives or false negatives found.
Let's see how this applies to the first few $n>5$ (excluding the multiples of $2$ and $5$):
$$\begin{array}{|c|c|c|} \hline n & \lfloor \phi^n \rfloor & \lfloor \phi^n \rfloor \mod n & \\ \hline 7 & 29 & 1 & \text{Prime}\\ \hline 9 & 76 & 4\neq1 & \text{Not prime}\\ \hline 11 & 199 & 1 & \text{Prime}\\ \hline 13 & 521 & 1 & \text{Prime}\\ \hline 17 & 3571 & 1 & \text{Prime}\\ \hline 19 & 9349 & 1 & \text{Prime}\\ \hline 21 & 24476 & 11\neq1 & \text{Not prime}\\ \hline 23 & 64079 & 1 & \text{Prime}\\ \hline 27 & 439204 & 22\neq1 & \text{Not prime}\\ \hline 29 & 1149851 & 1 & \text{Prime}\\ \hline 31 & 3010349 & 1 & \text{Prime}\\ \hline 33 & 7881196 & 4\neq1 & \text{Not prime}\\ \hline 37 & 54018521 & 1 & \text{Prime}\\ \hline 39 & 141422324 & 17\neq1 & \text{Not prime}\\ \hline 41 & 370248451 & 1 & \text{Prime}\\ \hline 43 & 969323029 & 1 & \text{Prime}\\ \hline 47 & 6643838879 & 1 & \text{Prime}\\ \hline 49 & 17393796001 & 29\neq1 & \text{Not prime}\\ \hline 51 & 45537549124 & 4\neq1 & \text{Not prime}\\ \hline 53 & 119218851371 & 1 & \text{Prime}\\ \hline 57 & 817138163596 & 4\neq1 & \text{Not prime}\\ \hline 59 & 2139295485799 & 1 & \text{Prime}\\ \hline 61 & 5600748293801 & 1 & \text{Prime}\\ \hline 63 & 14662949395604 & 41\neq1 & \text{Not prime}\\ \hline 67 & 100501350283429 & 1 & \text{Prime}\\ \hline 69 & 263115950957276 & 50\neq1 & \text{Not prime}\\ \hline 71 & 688846502588399 & 1 & \text{Prime}\\ \hline 73 & 1803423556807921 & 1 & \text{Prime}\\ \hline 77 & 12360848946698171 & 73\neq1 & \text{Not prime}\\ \hline 79 & 32361122672259149 & 1 & \text{Prime}\\ \hline 81 & 84722519070079276 & 22\neq1 & \text{Not prime}\\ \hline 83 & 221806434537978679 & 1 & \text{Prime}\\ \hline 87 & 1520283919093591604 & 62\neq1 & \text{Not prime}\\ \hline 89 & 3980154972736918051 & 1 & \text{Prime}\\ \hline 91 & 10420180999117162549 & 3\neq1 & \text{Not prime}\\ \hline 93 & 27280388024614569596 & 35\neq1 & \text{Not prime}\\ \hline 97 & 186982561199565069121 & 1 & \text{Prime}\\ \hline 99 & 489526700523968661124 & 76\neq1 & \text{Not prime}\\ \hline 101 & 1281597540372340914251 & 1 & \text{Prime}\\ \hline \end{array}$$
Why does this work?
Can this become a deterministic primality test?
Any insights, references, counterexamples, or theoretical developments would be greatly appreciated.