Showing posts with label golden ratio. Show all posts
Showing posts with label golden ratio. Show all posts

Saturday, 9 May 2026

Horadam Sequences

A Horadam sequence is a generalization of the Fibonacci numbers defined by the four constants (\(p,q,r,s\)) and the definitions \(H_0=p\) and \(H_1=q\) together with the linear recurrence equation for \(n>1\):$$H_n=sH_{n-1}+rH_{n-2}$$Specific values of \(r\) and \(s\) lead to well known sequences:

  • Fibonacci Numbers: \(F_n=F_{n-1}+F_{n-2}\\ \text{ where }n \geq 2, F_0=0, F_1=1\)
     
  • Lucus Number: \(L_n=L_{n-1}+L_{n-2} \\ \text{ where } n \geq 2, L_0=2, L_1=1\)

  • Pell Numbers: \(P_n=2P_{n-1}+P_{n-2} \\ \text{ where } n \geq 2, P_0=0, P_1=1\)

  • Pell-Lucus Numbers: \(Q_n=2Q_{n-1}+Q_{n-2} \\ \text{ where } n \geq 2, Q_0=Q_1=1\)

  • Jacobsthal Numbers: \(J_n=J_{n-1}+2J_{n-2} \\ \text{ where } n \geq 2, J_0=0, J_1=1 \)

  • Jacobsthal-Lucas Numbers: \( j_n=j_{n-1}+2j_{n-2} \\ \text{ where } n \geq 2, j_0=j_1=2\)

Today I turned 28160 days old and this number is a member of OEIS A085449:


 A085449: Horadam sequence (0,1,4,2)

The numbers indicate that the sequence is generated as follows for \(n>1\):$$H_n=2H_{n-1}+4H_{n-2}$$with \(H_0=0\), \(H_1=1\), \(r=4\) and \(s=2\)

The sequence begins: 0, 1, 2, 8, 24, 80, 256, 832, 2688, 8704, 28160

The generating function is:$$ \frac{x}{1-2x-4x^2}$$The progressive ratios between successive terms approach the following number:$$ \frac{H_n}{H_{n-1}} \rightarrow 2\phi = \sqrt{5}+ 1 \text{ as }n \text{ gets larger}$$In the general case we have:$$ \frac{H_n}{H_{n-1}} \rightarrow \frac{r}{s} \phi = \frac{r}{s} (\sqrt{5}+ 1) \text{ as }n \text{ gets larger}$$Oddly, the name Horadam does not appear in the MacTutor biographies of mathematicians but Gemini provided the following summary of his life and work:

Alwyn Francis ("Horrie") Horadam (1923–2016)

Alwyn Francis ("Horrie") Horadam was a prominent Australian mathematician best known for his extensive work in number theory and for generalizing second-order linear recurrences.

Here is a comprehensive overview of his life, career, and the mathematical sequences that bear his name.


Early Life and Education

Horadam was born on March 22, 1923, to a family of dairy farmers in the rural settlement of Scotts Flat in the Hunter Valley of New South Wales, Australia. His dedication to education was evident early on; during the Great Depression, he traveled 110 kilometers round-trip by train every day just to attend high school in Maitland, all while managing farm duties before and after his commute.

He went on to graduate with First Class Honours in Mathematics from the University of Sydney in 1944. He later earned a BEd from the University of Melbourne and a PhD from the University of Sydney, focusing his early doctoral research on Clifford geometry in complex projective spaces.

Academic Career at UNE

Horadam spent nearly his entire 40-year academic career at the University of New England (UNE) in Armidale, New South Wales. Starting as a lecturer in 1947, he eventually progressed to Professor of Mathematics and served as the Dean of the Faculty of Science.

Beyond his research, he was widely regarded as a deeply committed and generous educator. He served on the New South Wales Junior School Mathematics Committee for 25 continuous years, co-authored several high school mathematics textbooks, and maintained an open-door policy for his university students throughout his tenure.

The Horadam Sequence

While Horadam's early interests included geometry and algebra, his most lasting mathematical legacy lies in number theory—specifically, his generalization of integer sequences. Introduced in a series of papers in the 1960s, the Horadam sequence, commonly denoted as Wn(a, b; p, q), provides a unified framework for second-order linear recurrences.

The sequence is defined by two initial conditions:

W0 = a
W1 = b

And the recurrence relation for n ≥ 2:

Wn = pWn-1 - qWn-2

(Note: Depending on the specific convention used in various literature, the recurrence is sometimes written as Wn = pWn-1 + qWn-2.)

By altering the four parameters (a, b, p, q), the Horadam sequence acts as a parent to many famous recursive sequences:

  • Fibonacci Numbers: Generated by setting a=0, b=1, p=1, and q=-1.
  • Lucas Numbers: Generated by setting a=2, b=1, p=1, and q=-1.
  • Pell Numbers: Generated by setting a=0, b=1, p=2, and q=-1.

This generalization allowed mathematicians to prove broad identities and Binet-style formulas that apply universally to all these sequences at once, rather than analyzing them in isolation.

Legacy in Sequence Analysis

Horadam's generalizations paved the way for modern, systematic analysis of recurrence relations. He was a foundation and sustaining member of the Fibonacci Association and served extensively on the editorial board of the Fibonacci Quarterly. Over his lifetime, he published widely on combinatorial structures, generating functions, and sequence periodicities.

He continued his research well into his retirement, publishing his final papers in 2006. Horadam passed away in Armidale in 2016 at the age of 93, leaving behind a profound legacy in both Australian mathematical education and global number theory.

Interestingly his wife was a fellow mathematician and clearly an impressive woman:

Eleanor Mollie Horadam (née Spedding) (1921–2002)

Eleanor Mollie Horadam was a highly accomplished mathematician in her own right, with a fascinating career and a lasting legacy in Australian academia. She was the wife of Alwyn Francis Horadam.


Early Life and World War II

Born on June 29, 1921, in Yorkshire, England, to a suffragette mother and a pharmacist father, Mollie demonstrated early academic brilliance. She studied the Mathematical Tripos at Girton College, Cambridge, earning her BA in 1942. However, because Cambridge did not allow women to receive degrees at public graduation ceremonies at the time, she was not publicly conferred her degree until she returned on a sabbatical in 1956.

During World War II, she worked in the Stress Group at Rolls-Royce, performing stress-strain analyses on jet engines. While working by day, she took night classes in engineering at the University of London, ultimately earning a First Class Honours degree. During this time, she even outpaced early computing; when told it would take weeks to run a stress problem on the newly constructed Mark 1 computer in Manchester, she manually proved the exact mathematical solution much faster.

Move to Australia and Academic Career

Dissatisfied with post-war England's lack of opportunities and preference for promoting less-qualified men, Mollie emigrated alone to Australia in 1949 to take up a lectureship in mathematics and physics at the New England University College (which later became the University of New England, or UNE). It was here that she met fellow mathematics lecturer Alwyn Horadam, whom she married in 1950.

Mollie became a trailblazer for women in Australian academia. She successfully lobbied UNE to update its maternity policies, which allowed her to retain her lecturing position while raising their three daughters—a highly unusual achievement for the era. One of their daughters, Kathy Horadam, also went on to become a prominent Australian mathematician and Emeritus Professor at RMIT.

Mathematical Contributions

Inspired by lectures from J.E. Littlewood during her 1956 sabbatical at Cambridge, Mollie shifted her focus to number theory at the age of 35. Over the next decade, she published more than 30 research papers, primarily focusing on the number theory of generalised integers and generalised prime numbers. This extensive body of research earned her a PhD by Prior Publication from UNE in 1965, leading to her promotion to Senior Lecturer. She also authored the textbook Principles of Mathematics for Economists.

In 1970, she broke another barrier by becoming the first female Sub-Dean of a faculty (Science) at UNE. Following her academic retirement in 1982, she established a successful commercial business dealing in antique silver. She was admitted as a Fellow of the University of New England in 1995. Mollie passed away in Armidale in 2002 at the age of 80, remembered as a pioneering intellect, a community leader, and a resilient force in a predominantly male profession.

Their eldest daughter followed in her parents' footsteps:

Alwyn and Mollie Horadam had three daughters: Kathryn (Kathy), Kerry, and Alanna. They also had a total of five granddaughters and one grandson.

The most publicly known of their children is their daughter Kathryn Jennifer Horadam (born in 1951 in Armidale), who followed in her parents' footsteps to become a highly accomplished and internationally recognized mathematician.


Kathryn Horadam's Career and Contributions

  • Education: She studied mathematics at the Australian National University, earning her bachelor's degree in 1972 and completing her PhD in 1977 with a dissertation titled The Homology of Groupnets.
  • Academic Career: She built a long and distinguished career at the Royal Melbourne Institute of Technology (RMIT), where she worked for over 30 years. She became a full professor of mathematics there in 1995 and currently holds the title of Emeritus Professor.
  • Research Focus: She is best known for her specialized research on Hadamard matrices and their applications in information security (keeping digital data safe). Outside of academia, she applied this expertise by working for three years with Australia's Defence Science and Technology Group.
  • Publications: She authored the comprehensive text Hadamard Matrices and Their Applications, published by Princeton University Press in 2007.
  • Recognition: Her impact on mathematics has been widely celebrated. She became a fellow of the Institute of Combinatorics and its Applications in 1991 and a fellow of the Australian Mathematical Society in 2001. In 2011, RMIT hosted a special international workshop on Hadamard matrices specifically in honor of her 60th birthday, with the resulting papers published in a special 2013 issue of the Australasian Journal of Combinatorics.

While Kathy pursued a high-profile academic career in mathematics like her parents, public details regarding the specific careers and lives of Kerry and Alanna are not prominently featured in public or academic records.

Saturday, 4 October 2025

Primes Within Transcendental Numbers

One of the properties of the number associated with my diurnal age today, 27943, is that it is a prime formed by merging five successive digits in the decimal expansion of \(e \). Primes with this property form OEIS A104846. This got me thinking about whether all possible primes could be expressed by merging successive digits in the decimal expansions of all transcendental numbers like \(e\) and \( \pi \).  

However, as Grok explained:

No, it cannot be proven that the decimal expansions of transcendental numbers like \( \pi \) or \(e\) contain representations of all prime numbers through progressive concatenations of consecutive digits. This interpretation hinges on whether every possible finite sequence of digits—including the decimal representations of all primes—appears as a substring somewhere in their infinite, non-repeating expansions. While this would be true if \( \pi \) and \(e\) are normal numbers (where every digit sequence of length \(k\) appears with equal frequency \(1/10^k\) in the limit), the normality of \( \pi \) and \(e\) remains an open problem in mathematics. 

If numbers like \( \pi \) and \(e\) could be proven to be normal then not only would every prime occur but it would occur an infinite number of times. It's interesting to look at 27943 and see how many times it appears in the first million digits of \(e\). Here are the initial positions for the "2" (permalink):

166, 46606, 217029, 234391, 248347, 258504, 483659, 832027, 941722

For \( \pi \), it takes a while before the first occurrence but afterwards the occurrences of 27943 are more frequent (permalink):

94943, 146738, 216793, 253032, 283291, 290571, 302660, 350882, 358637, 520562, 632389, 661691, 715324, 805161, 843112, 890626

I wondered if there was any difference between algebraic numbers like \( \phi \), the golden ratio, and transcendental numbers in regards to being able to represent all primes as concatenations of successive digits. Here's was Grok's response:

No, it cannot be proven that the decimal expansions of algebraic irrational numbers like the golden ratio (\( \phi  \approx 1.6180339887 \dots \)) contain representations of all prime numbers through progressive concatenations of consecutive digits, for essentially the same reasons as with transcendentals like \( \pi \) and \(e\). Their normality in base 10 remains unproven. 

Just as with π and e, the golden ratio's decimal expansion is infinite and non-repeating (since it's irrational), but this doesn't guarantee it contains all sequences. Empirical checks of millions of digits suggest randomness consistent with normality, but no proof exists—not even that all digits 0-9 appear infinitely often. It's widely conjectured that φ (a quadratic irrational algebraic number) is normal in base 10, mirroring beliefs about π and e. Proving this would be a major result in number theory.

There's a specific conjecture (dating back to Borel in 1909, refined later) that every irrational algebraic number is absolutely normal (normal in every integer base \(\geq 2)\). This includes \( \phi, \sqrt{2}, \sqrt{3} \), and others. No counterexamples exist, but crucially, no irrational algebraic has ever been proven normal in any base. In contrast, for transcendentals, normality isn't conjectured for all—only for certain "natural" ones like \( \phi \) and \(e\)—while many non-normal transcendentals are known (e.g., Liouville numbers designed to lack certain digits). 

Proven examples: We have constructed transcendentals proven to be normal, such as Champernowne's constant ( 0.123456789101112 ...)  or the Copeland–Erdős constant (formed by concatenating primes: 0.235711131719... ). These do contain every finite digit sequence infinitely often, including all primes. No such proven-normal algebraic irrationals exist, partly because algebraics satisfy polynomial equations, which might impose subtle constraints on their expansions (though the conjecture suggests not). 

In summary, algebraic irrationals like \( \phi \) aren't fundamentally "different" in the sense that the core question—whether all primes appear as substrings—remains unproven and conjectured true, just like for \( \phi\) and \(e\). The main distinction lies in the broader landscape: Algebraics have a stronger universal conjecture without exceptions or proven cases, while transcendentals show a mix of proven normal and non-normal examples. If the conjectures hold, then yes, \( \phi \)'s expansion would contain all primes, but we can't prove it yet.

So at what positions does the prime 27943 appear in the decimal expansion of \( \phi \). Here are the locations (permalink):

33280, 127164, 129935, 529433, 597796, 795399, 971620

Monday, 25 October 2021

Fee, Phi, Fo, Sum

Time to return to integrals for a while and practice my LaTeX skills. I came across an interesting video on YouTube recently that investigated the following integral:$$\int_0^{\infty} \frac{1}{(1+x^{\phi})^{\phi}}\, \text{d}x$$Figure 1 shows that the result is 1 using GeoGebra, using 1000 as the limit of integration rather than infinity, because the program doesn't seem to cope with the latter. 


Figure 1

The program however, gives no clue as to how this result was arrived at, although it looks to be likely given the appearance of the area under the curve. Symbolab isn't much help. See Figure 2.


Figure 2

The online integral calculator wasn't any help either. See Figures 3 and 4.


Figure 3


Figure 4

So to show why the integral is equal to 1, I'll basically follow the steps as outlined in the video. Let's remember that \(\phi\) is the solution to the equation:$$ \begin{align}x^2-x-1&=0\\ \text{where }x&=\frac{1+\sqrt{5}}{2}=\phi\\ \text{also } 1&=\phi^2-\phi\\ \text{and } \frac{1}{\phi}&=\phi-1 \end{align}$$To integrate, the following substitution is used:$$\begin{align}u&=x^{\phi}\\ \text{d}u&=\phi x^{\phi-1} \text{d}x\\ \frac{\text{d}u}{\phi x^{\phi-1}}&=\text{d}x \end{align}$$The limits of integration don't need to be changed because \(u=0\) when \(x=0\) and \(u \rightarrow \infty\) as \(x \rightarrow \infty\). So the integral becomes:$$ \int_0^{\infty} \frac{\text{d} u}{(1+u)^{\phi} \, \phi \, x^{\phi-1}}$$ However \( \dfrac{u}{x}=x^{\phi-1} \) because \(u=x^{\phi}\) and so the integral becomes:$$ \frac{1}{\phi} \, \int_0^{\infty} \frac{x}{(1+u)^{\phi} \, u} \text{d}u$$Because \(u=x^{\phi}\), we can write \(u^{1/\phi}=x\), thus the integral now becomes:$$\frac{1}{\phi} \, \int_0^{\infty} \frac{u^{1/\phi}}{(1+u)^{\phi} \, u} \text{d}u$$Now we saw earlier that \(\dfrac{1}{\phi}=\phi-1\) and we can use this fact in transforming the integral even further. We can now write it as:$$ \begin{align} \frac{1}{\phi} \, \int_0^{\infty} \frac{u^{\phi-1}}{(1+u)^{\phi} \, u} \text{d}u &= \frac{1}{\phi} \, \int_0^{\infty} \frac{u^{\phi-1-1}}{(1+u)^{\phi}} \text{d}u \\ &= \frac{1}{\phi} \, \int_0^{\infty} \frac{u^{\phi-1-1}}{(1+u)^{\phi-1+1}} \text{d}u \end{align} $$Now this last transformation of the integral may seem strange but it's usefulness becomes apparent once we bear in mind the beta function, defined as:$$ \beta(x,y)=\int_0^{\infty} \frac{u^{x-1}}{(1+u)^{x+y}} \text{d}u=\frac{\Gamma(x) \, \Gamma(y)}{\Gamma(x+y)}$$In this beta function, if we let \(x=\phi-1\) and \(y=1\), our integral now becomes:$$\begin{align} \frac{1}{\phi} \beta(\phi-1,1)&=\frac{1}{\phi} \, \frac{\Gamma(\phi-1) \, \Gamma(1)}{\Gamma(\phi)}\\ &=\frac{1}{\phi} \, \frac{(\phi-2)! \, 0!}{(\phi-1)!}\\&= \frac{1}{\phi} \, \frac{1}{\phi-1} \\ &= \frac{1}{\phi^2-\phi}\\ &=1 \end{align} $$Thus we have confirmed that the integral does indeed evaluate to 1. The transformation of the gamma function to the factorial is achieved via the fact that \( \Gamma(x)=(x-1)!\).

Here is the actual video embedded into this blog. It covers precisely the same steps and my main purpose in creating this blog is simply to prevent my LaTeX skills from becoming too rusty.

Friday, 25 June 2021

Dying Rabbits

The title of this post may seem unusual for a mathematical blog but rabbits of course have a close association with the Fibonacci sequence. Well live, reproducing rabbits at least. The following explains what the rabbits are all about (source):

Fibonacci's Rabbits

In the West, the Fibonacci sequence first appears in the book Liber Abaci (1202) by Leonardo of Pisa, known as Fibonacci. Fibonacci considers the growth of an idealized (biologically unrealistic) rabbit population, assuming that:
    1. a single newly born pair of rabbits (one male, one female) are put in a field;
    2. rabbits are able to mate at the age of one month so that at the end of its second month a female can produce another pair of rabbits;
    3. rabbits never die and a mating pair always produces one new pair (one male, one female) every month from the second month on.
The puzzle that Fibonacci posed was: how many pairs will there be in one year?


Suppose we let the number of rabbit pairs in the field at the end of the nth month be denoted by \(F_n\).

Consider just the new "baby rabbit pairs" in the nth month. They must be equal in number to the pairs of rabbits that are mature enough to give birth to baby rabbits. This, of course, is precisely the number of rabbit pairs alive two months previously, \(F_{n−2}\).

Now the total number of rabbit pairs in the nth month is the number of pairs alive in the previous month (i.e., \(F_{n−1}\)) plus the number of new baby rabbit pairs, \(F_{n−2}\).

Thus, we have the following recursive definition for the nth Fibonacci number: $$F_0=F_1=1 \text{ and } F_n=F_{n−1}+F_{n−2}$$

The assumption that "rabbits never die" is big presumption for they do die and the formula for the Fibonacci sequence can be modified to account for this. I discovered this because my diurnal age at the time of writing this post is 26381 and this number happens to be a member of OEIS A023440:


 A023440

Dying rabbits: a(n) = a(n-1) + a(n-2) - a(n-10)                      


The sequence members, up to 26381, are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 88, 142, 228, 367, 590, 949, 1526, 2454, 3946, 6345, 10203, 16406, 26381.

The sequence is identical to the Fibonacci up to to the 10th term (55): 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 88, … because a(10) = a(9) + a(8) - a(0) = 34 + 21 - 0 = 55. However, with a(11) = a(10) + a(9) - a(1) = 55 + 34 - 1, it begins to differ because the oldest generation of rabbits dies off.

It’s easier to generate the terms using the generating function rather than a recursive sequence. In the case of OEIS A023440, this generating function is:$$\frac{x}{(x - 1)(x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 - 1)}$$Here is the SageMath code to generate the terms together with a permalink :

L, k=[], var('k')
S=sum(x^k for k in [2..9])
P=x/((x - 1)*(S - 1))
T=taylor(P,x,0,23).coefficients()
for t in T:
    L.append(t[0])
print(L)

It is easy to generalise this function to accommodate longevities other than 10. For example, changing the 9 to an 8 in the code above will generate OEIS A023439:

 
 A023439

Dying rabbits: a(n) = a(n-1) + a(n-2) - a(n-9)                        


Here is the SageMath code together with a permalink:

L, k=[], var('k')
S=sum(x^k for k in [2..8])
P=x/((x - 1)*(S - 1))
T=taylor(P,x,0,23).coefficients()
for t in T:
    L.append(t[0])
print(L)

There are OEIS sequences corresponding to a(n-3) to a(n-12). Of course the ratio of successive terms doesn't approach the golden ratio as it does with the Fibonacci terms. In the case of OEIS A023440, the ratio approaches 1.6079827279... rather than 1.6180339887... and in the case of OEIS A023439, the ratio approaches 1.6013473338...

So that's the story of the dying rabbits.

Wednesday, 10 June 2020

Fibonacci-like Sequences

I've posted a lot about Fibonacci numbers over the years:
The Fibonacci sequence is the most famous example of a generalised sequence that begins with two seed numbers \( a \) and \( b \) and then proceeds as follows:$$ a_n=\begin{cases}a&\mbox{if }n=0;\\b&\mbox{if }n=1;\\a_{n-1}+a_{n-2}&\mbox{otherwise.}\end{cases} $$No matter what the values of the seed numbers, the ratio of one term to its predecessor always approaches \( \phi \), the golden ration. This ratio is equal to: $$ \frac{1+\sqrt{5}}{2}$$There is an even more generalised sequence that also begins with two seed numbers \( a \) and \( b \) but then proceeds as follows:$$ a_n=\begin{cases}a&\mbox{if }n=0;\\b&\mbox{if }n=1;\\A \, a_{n-1}+ B \, a_{n-2}&\mbox{otherwise.}\end{cases} $$Here \(A\) and \(B\) are constants and in the case where \(A=1\) and \(B=1\), we have the earlier sequence. The ratio of one term to its predecessor however, is no longer the golden ratio. The \(n\)-th term for such a sequence is given by:$$\frac{ \alpha^n- \beta^n}{\alpha-\beta}$$Here \( \alpha \) and \( \beta \) are the roots of the quadratic \(x^2=Ax+B\). Let's take a specific example where \(A=3\) and \(B=3\) and so \(x^2=3x+3\). The solution to this is:$$\alpha=\frac{3+\sqrt{21}}{2} \text{ and } \beta=\frac{3-\sqrt{21}}{2}$$Thus the \(n\)-th term approaches:$$\frac{(3+\sqrt{21})^n- (3-\sqrt{21})^n}{2^n \times \sqrt{21}}$$This simplifies to:$$\frac{1}{\sqrt{21}}\, \left(\frac{3+\sqrt{21}}{2}\right)^n$$Thus the ratio between successive terms will tend to \( \displaystyle \frac{3+\sqrt{21}}{2}\)

In the case where \(A=1\) and \(B=1\), the ratio is  \( \displaystyle \frac{1+\sqrt{5}}{2}=\phi\) and so different surds will appear depending on the values of \(A\) and \(B\).

As we've seen in the case of \(A=3\) and \(B=3\), the surd turns out to be \( \sqrt{21} \). Here is an example of an OEIS sequence with seed numbers \(a_0=1\) and \(a_1=2\) that has both constants equal to 3:



a(n) = 3*a(n-1) + 3*a(n-2) with a(0)=1 and a(1)=2           


The first terms of the sequence are 1, 2, 9, 33, 126, 477, 1809, 6858, 26001, 98577, 373734, 1416933, ... Naturally the terms get larger far more quickly than the Fibonacci sequence. Note that the ratio of the last two terms is getting close to the predicted value:$$\frac{1416933}{373734} \approx 3.79128738621586 \text{ and } \frac{3+\sqrt{21}}{2} \approx 3.79128784747792$$A further point to note is that the formula: $$\frac{ \alpha^n- \beta^n}{\alpha-\beta}$$only produces the correct terms of the sequence when a(0)=0 and a(1)=1 and the result is rounded to the nearest whole number. See permalink. However, no matter what the seed numbers, the ratio of terms for a particular sequence always approaches the same limit.

Friday, 12 July 2019

Finding Fibonacci and Tribonacci Seed Numbers

Today I turned 25667 days old. This number is prime but there is little of interest to be found concerning its properties in either the OEIS or NumbersAplenty, my usual resources. For a while now, the idea that every number could be considered as being part of a Fibonacci sequence has been knocking around in my head.

Today the idea came into focus when I started to look at 25667 in this light. I knew that the ratio of consecutive terms in a Fibonacci sequence approached closer and closer to the Golden Ratio as the terms got larger. I figured I'd use this property to find the previous term.$$ \frac{25667}{\frac{1+ \sqrt {5}}{2}} \approx 15863.0783892436$$Rounding to the nearest whole number gives 15863 and from there it is easy to reverse engineer the remaining terms until a point is reached where the previous term is larger than the subsequent term. This is the point at which the algorithm I developed will stop.

Here is the SageMathCell permalink to the algorithm and Figure 1 shows a screenshot of the SageMath code.

Figure 1

The sequence of Fibonacci terms is:

25667 15863 9804 6059 3745 2314 1431 883 548 335 213 122 91 31

The two seed numbers are 31 and 91. Different numbers produce different sequences, even when only differing by 1. Consider the sequences for the two previous numbers: 25666 and 25665.

25666 15862 9804 6058 3746 2312 1434 878 556 322 234 88

25665 15862 9803 6059 3744 2315 1429 886 543 343 200 143 57

Of course, changing the manner in which the immediate predecessor of the starting number is calculated can affect the sequence. Suppose instead of rounding the decimal number, we simply truncated it, discarding the decimal part and leaving only the whole number. In the examples cited, the sequence remains the same for 25667 and 25666 but there is a difference in the case of 25655.

25665 15861 9804 6057 3747 2310 1437 873 564 309 255 54

The reason is that the decimal number is 15861.8423212660, so that rounding produces 15862 whereas truncating produces 15861. I think rounding is the better way to calculate the immediate predecessor of the starting number because this gives a result that is closest to the Golden Ration when the two numbers are compared. This benefit is clearly seen when a number from the classic Fibonacci sequence is entered e.g. 6765.

6765 4181 2584 1597 987 610 377 233 144 89 55 34 21 13 8 5 3 2 1 
(using rounding)

6765 4180 2585 1595 990 605 385 220 165 55 
(using truncation)

Now every number can be associated with two seed numbers so that the three of them form part of a Fibonacci sequence.



Of course, the idea can be extended to tribonacci numbers with a slight modification of the code. Information about the tribonacci constant can be found here. Here is a permalink to the SageMathCell code and Figure 2 shows a screenshot of the SageMath code:

Figure 2

The sequence of tribonacci terms is:

25667 13955 7587 4125 2243 1219 663 361 195 107 59 29 19 11

So every number can be associated with three tribonacci seed numbers.


Sunday, 10 March 2019

Beyond Fibonacci

The Fibonacci sequence is the most famous example of a generalised sequence that begins with two seed numbers \( a \) and \( b \) and then proceeds as follows:$$ G_n=\begin{cases}a&\mbox{if }n=0;\\b&\mbox{if }n=1;\\G_{n-1}+G_{n-2}&\mbox{otherwise.}\end{cases} $$So \(G_3=b+a \), \(G_4=a+2b \) etc. It can be shown that the \(n\)-th term in the Fibonacci sequence is given by \( [ \phi ]^n/ \sqrt 5 \) (where the square brackets denote rounding to the nearest whole number) and so the question could be asked is there a general formula for calculating the \(n\)-th term of the generalised sequence \(a, b, a+b, a+2b, ... \)? Well, after watching this Numberphile video, it turns out that there is:


The formula is:$$G_n=\bigg [ \phi ^n \times \frac{(3 \sqrt 5 - 5) \, a + (5 - \sqrt 5) \, b}{10} \bigg ] $$When \(a=1\) and \(b=1\), we get \( [ \phi ]^n/ \sqrt 5 \) so all is well. When \(a=1 \) and \(b=3 \), we get simply \( [ \phi ]^n  \) and this generates the Lucas numbers: 1, 3, 4, 7, 11, ...

The Numberphile video makes the point that it is the number \( \sqrt 5 \) that is at the heart of this formula and thus underlies all these Fibonacci-like sequences that are generated from two seed numbers.

We can also consider not two but three seed numbers and this leads to what is called the Tribonacci sequence defined by:$$
T_n=\begin{cases}0&\mbox{if }n=0\\1&\mbox{if }n=1\\1&\mbox{if }n=2\\T_{n-1}+T_{n-2}+T_{n-3}&\mbox{if }n \geq 3\end{cases}

$$This leads to 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, ... and, just as the closed-form formula for the Fibonacci sequence involved the roots of the polynomial \(x^2-x-1\), it is reasonable to expect that the analogous formula for the tribonacci sequence involves the polynomial \(x^3-x^2-x-1\) and this is indeed the case. This polynomial has one real root:$$ \frac{1}{3} \bigg ( 1+ \sqrt[3] {19+ 3 \, \sqrt {33}} + \sqrt[3] {19 -\sqrt {33}} \bigg ) \approx 1.83929 $$ called the tribonacci constant and this is the ratio of successive pairs of terms. In other words:$$

\lim_{n \to \infty} \frac {T_{n+1}}{T_n}=\frac{1}{3} \bigg ( 1+ \sqrt[3] {19+ 3 \, \sqrt {33}} + \sqrt[3] {19 -\sqrt {33}} \bigg ) \approx 1.83929

$$The other two roots are complex conjugates (source). The generating function for the tribonacci numbers is quite similar to the generating function for the Fibonacci numbers:$$ \sum_0 ^ \infty \! T_n \, x^n = \frac {x}{1-x-x^2-x^3} $$

Saturday, 2 March 2019

Metallic Means

A Numberphile video on YouTube caught my attention recently. It was titled The Silver Ratio and I was prompted to investigate further.


I'll attempt to recapitulate what I discovered by watching this video and doing some additional investigation. The whole concept of Metallic Means is a generalisation of the Golden Mean. One way to approach matters is geometrically via the Golden Rectangle (Figure 1).
Figure 1: The Golden Rectangle
This rectangle has the property that \(a \div b=(a+b) \div a \) which can be rewritten as \( a^2=ab+b^2 \). Without loss of generality, we can simplify matters by letting \(b=1\) since it is the ratio that we are interested in and not any actual values of \(a\) and \(b\). This leads to \(a^2=a+1\) which can be rewritten as \( a^2-a-1=0 \). Solving this quadratic yields two solutions, one positive and one negative. Because we are dealing with positive lengths, we can ignore the negative solution. The positive solution is the familiar \( (1+\sqrt 5)/2 \) designated using the Greek letter \( \phi \). 

The equally famous Fibonacci spiral derives from the Golden Rectangle (Figure 2). If a square is removed from the rectangle, then the rectangle remaining is also a Golden Rectangle ad infinitum. The circular segments that can be inserted into each progressive square combine to form the spiral shown.

Figure 2: The Golden Spiral

The Silver Mean can be derived in a similar fashion from the so-called Silver Rectangle that has the dimensions shown in Figure 3. This rectangle has the property that \(a \div b=(2a+b) \div a \) which can be rewritten as \( a^2=2ab+b^2 \). Without loss of generality, we can again simplify matters by letting \(b=1\) and this leads to \(a^2=2a+1\) which can be rewritten as \( a^2-2a-1=0 \). Solving this quadratic yields two solutions, one positive and one negative. Because we are dealing with positive lengths, we can ignore the negative solution. The positive solution is \( (2+\sqrt 8)/2 \) which can be simplified to \( 1+\sqrt 2 \) and this is the Silver Mean or Silver Ratio. 

Figure 3: The Silver Rectangle

In the Silver Rectangle, removing two squares at a time leaves another rectangle of the same dimensions ad infinitum. The inscribed parts of the circles in the squares join together to form the characteristic spiral of the silver variety as shown in Figure 4.

Figure 4: The Silver Spiral

This process can be continued and what might be called the Bronze Rectangle is the result. Figure 5 is useful in comparing the relative dimensions of the Gold, Silver and Bronze Rectangles.

Figure 5: A comparison of the Golden, Silver and Bronze Rectangles

Looking at the progression of the numbers under the square root sign, it's immediately apparent that a Fibonacci progression is in play. The dimensions of the next rectangle would be \( (1+\sqrt 21)/2 \) and so on. Let's follow up on the Fibonacci connection by looking at the ratio of progressive pairs of terms in this sequence. The terms are 0, 1, 1, 2, 3, 5, 8, 13, 21, ... and it's well known the ratio of progressive pairs of terms approaches the Golden Mean. If we write the \(n-th\) Fibonacci term as \(F_n\) then the relationship between terms is given by:$$ F_n=\begin{cases}0&\mbox{if }n=0;\\1&\mbox{if }n=1;\\F_{n-1}+F_{n-2}&\mbox{otherwise.}\end{cases} $$With the Silver Mean, the relationship is given by:$$ P_n=\begin{cases}0&\mbox{if }n=0;\\1&\mbox{if }n=1;\\2P_{n-1}+P_{n-2}&\mbox{otherwise.}\end{cases} $$This leads to the following sequence of terms: 0, 1, 2, 5, 12, 29, ... which is known as the Pell sequence. With the Bronze Mean, the relationship is given by: $$ T_n=\begin{cases}0&\mbox{if }n=0;\\1&\mbox{if }n=1;\\3T_{n-1}+T_{n-2}&\mbox{otherwise.}\end{cases} $$Here the progression of terms is: 0, 1, 3, 10, 33, 109, ... and so, in the most general case, we have a quadratic equation of the form \(a^2-k \times a -1 \) with positive solution \( (k+ \sqrt {k^2+4}) \div 2 \) and a relationship given by:$$ T_n=\begin{cases}0&\mbox{if }n=0;\\1&\mbox{if }n=1;\\k \times T_{n-1}+T_{n-2}&\mbox{otherwise.}\end{cases}$$where \(k\) is any integer greater than or equal to 1. So we've looked at the metallic means geometrically and in terms of Fibonacci-type sequences but they can also be looked at in terms of continued fractions. 

For the Golden Mean: \( (1+\sqrt 5) \div 2 \), the convergents are 2, 3/2, 5/3, 8/5, 13/8, 21/13, 34/21, 55/34, 89/55 ... and the continued fraction is:

1 + -------------------------------------------------
                              1                   
     1 + --------------------------------------------
                                 1                 
          1 + ---------------------------------------
                                   1               
               1 + ----------------------------------
                                      1           
                    1 + -----------------------------
                                        1         
                         1 + ------------------------
                                           1       
                              1 + -------------------
                                             1     
                                   1 + --------------
                                                1 
                                        1 + ---------
                                             1 + ...

For the Silver Mean: \( (2 + \sqrt 8) \div 2 \), the convergents are 5/2, 12/5, 29/12, 70/29, 169/70, 408/169, 985/408, 2378/985, 5741/2378, ... and the continued fraction is:

                            1                     
2 + -------------------------------------------------
                              1                   
     2 + --------------------------------------------
                                 1                 
          2 + ---------------------------------------
                                   1               
               2 + ----------------------------------
                                      1           
                    2 + -----------------------------
                                        1         
                         2 + ------------------------
                                           1       
                              2 + -------------------
                                             1     
                                   2 + --------------
                                                1 
                                        2 + ---------
                                             2 + ...

For the Bronze Mean: \( (3 + \sqrt 13 ) \div 2 \), the convergents are 10/3, 33/10, 109/33, 360/109, 1189/360, 3927/1189, 12970/3927, 42837/12970, 141481/42837, ... and the continued fraction is:

                            1                     
3 + -------------------------------------------------
                              1                   
     3 + --------------------------------------------
                                 1                 
          3 + ---------------------------------------
                                   1               
               3 + ----------------------------------
                                      1           
                    3 + -----------------------------
                                        1         
                         3 + ------------------------
                                           1       
                              3 + -------------------
                                             1     
                                   3 + --------------
                                                1 
                                        3 + ---------
                                             3 + ...


and so on and so on. 

Thursday, 20 December 2018

A Prime to Remember

Primes come and go but lately, as I keep a daily track of the number of my diurnal days, there has been more than usual. To illustrate, days 25447, 25453, 25457, 25463, 25469, and 25471 are all primes in a 6-4-6-6-2 pattern. After 25471 there will quite a drought because the next prime is 25523, a gap of 32.

Today I'm 25463 days old and I can't let it pass without recording some of its more interesting properties. One of these is that it is a member of OEIS A165572: the greater prime factor of successively better Golden Semiprimes. These semiprimes p*q, starting from 6=2*3, have the property that each successive value of q/p gives a better approximation of the Golden Ratio than the previous term where the $$ \text{Golden Ratio } \phi=\frac{1+\sqrt(5)}{2} \approx \, 1.61803398874989$$Here are the initial members of this sequence: 3, 5, 11, 31, 37, 47, 157, 571, 911, 1021, 1487, 2351, 3571, 24709, 25463. The corresponding semiprimes form OEIS A165570 and consist of 6, 15, 77, 589, 851, 1363, 15229, 201563, 512893, 644251, 1366553, 3416003, 7881197, 377331139, 400711231, 2963563859, 4035221017.

Here are the progressively better approximations as the larger factor of the semiprime is divided by the smaller:

3/2         1.50000000000000
        5/3         1.66666666666667
        11/7         1.57142857142857
    31/19         1.63157894736842
      37/23         1.60869565217391
     47/29         1.62068965517241
157/97         1.61855670103093
  571/353         1.61756373937677
    911/563         1.61811722912966
1021/631         1.61806656101426
1487/919         1.61806311207835
 2351/1453         1.61803165863730
  3571/2207         1.61803352967830
 24709/15271         1.61803418243730
25463/15737         1.61803393276991

Another property of 25463, albeit a base dependent one, is its membership in OEIS A156119: primes formed by rearranging five consecutive decimal digits (avoiding leading 0). No primes can be formed from {1,2,3,4,5} or {4,5,6,7,8} since they are divisible by three. Sequence is finite, ending with a(52)=96857. Initial members of sequence are: 10243, 12043, 20143, 20341, 20431, 23041, 24103, 25463.

Yet another property, again base dependent, is its membership of OEIS A124629: primes p such that their cubes are pandigital, meaning all digits from 0 to 9 must appear at least once; here 25463^3=16509301927847. The initial members of this sequence are: 5437, 6221, 7219, 8443, 10903, 11353, 15937, 17123, 18229, 19429, 20353, 20903, 20929, 21803, 21841, 21961, 22123, 22283, 22993, 23053, 23369, 23663, 24733, 25183, 25219, 25463.

Not base dependent is the property that 25463 shares as a member of OEIS A226154: smallest of four consecutive primes whose sum is a triangular number. Triangular numbers are of the form:$$ \binom{n}{2}= \frac{n \, (n-1)}{2}$$The initial members of this sequence are: 5, 23, 191, 389, 449, 2593, 3011, 5167, 5639, 5851, 8669, 18839, 25463. Here the four primes add to 101926 = 25463+25469+25471+25523 and this sum is a triangular number because: $$101926 = \binom{452}{2}=\frac{452 \times 451}{2}$$ 

Finally and again base independently, 25463 is a member of OEIS A022121: Fibonacci sequence beginning 3, 8. The initial members of this sequence are: 3, 8, 11, 19, 30, 49, 79, 128, 207, 335, 542, 877, 1419, 2296, 3715, 6011, 9726, 15737, 25463.

Saturday, 18 February 2017

Number Bases (Radices)

In mathematical numeral systems, the radix or base is the number of unique digits, including zero, used to represent numbers in a positional numeral system. For example, for the decimal system (the most common system in use today) the radix is ten, because it uses the ten digits from 0 through 9. Source
Today I turned 24793 days old, a prime number of days, and as it turns out a palindrome in base 12 (12421). I started playing around with the representation of 24793 in other number bases or radices. In base 31, the representation is poo so I may be in for a shitty day. In base 36, the letters of the alphabet are exhausted:


Beyond base 36, the following system is used:

More generally, in a system with radix b (b > 1), a string of digits \(\ d_1 … d_n \) denotes the number \(\ d_1b^{n−1}+d_2b^{n−2}+ … +d_nb^{0} \), where \(\ 0 ≤ d_i < b \).

In practice, a colon is used to separate the individual digits e.g. 24793 is written\(\ 18:4:3 \,_{37} \)  in base 37 which can be dispensed with of course in the case of base 10.

Radices are usually natural numbers but they don't have to be. For example, a base using the golden ratio\(\ \Phi\) is possible, remembering that\(\ \Phi\) is given by the expression: \[\ \frac{1+\sqrt{5}}{2}\] Commonly, the capital letter\(\ \Phi\) is used to represent 1.618033988749895… and the lower case letter \( \phi\) to represent 0.618033988749895… or\(\ \Phi-1\) but this is certainly not always the case.

Such a base is colloquially called phinary and the following table gives some idea of how it works (source) but uses\(\ \varphi\), a variation of the lowercase\(\ \phi\) but meant to equal 1.618033988749895… here:


\(\ \Phi\) is closely linked to the Fibonacci sequence since \[ \lim_{n \to \infty} \frac{F_n}{F_{n-1}}=\Phi \]More information about \( \Phi  \) as a number base can be found on this site.

Saturday, 26 November 2016

More about Golden Semiprimes


In June of 2016, I posted about Golden Semiprimes. Today I was reminded of this class of numbers once again because today's number, 24709, is a prime that forms the greater prime in a series of semiprimes that give increasingly better approximations to the golden ratio. This OEIS series is A165570: successively better golden semiprimes and begins:
6, 15, 77, 589, 851, 1363, 15229, 201563, 512893, 644251, 1366553, 3416003, 7881197, 377331139, 400711231, 2963563859, 4035221017, 28862500577, 52027213697, 133793658289, 418298061641, 1363588753103, 1970239102459
The OEIS series that gives the greater primes in these semiprimes is A165572: greater prime factor of Successively Better Golden Semiprimes. The series begins:
3, 5, 11, 31, 37, 47, 157, 571, 911, 1021, 1487, 2351, 3571, 24709, 25463, 69247, 80803, 216103, 290141, 465277, 822691, 1485373, 1785473
For today's number 24709, the associated semiprime is 377331139 and the factorisation is 15271×24709. In a little over two years time, the next prime in series A165572 will pop up, namely 25463.

Friday, 26 August 2016

Semiprime Factor Ratios

All biprimes (or semiprimes or 2-almost-primes) can be visualised as unique rectangles and all triprimes (or 3-almost-primes) as rectangular prisms. I only intend to deal with biprimes in this post. Let's take a recent biprime, 24581 = 47 x 523, as a starting point. It can be visualised as a rectangle with a width of 47 units and a length of 523 units. It's the ratio of width to length that's of interest. 

A golden semiprime is defined as a number that factors to: 
  • \(p \times q\) (with \(p<q\)) and
  • \( |p \times \phi-q|<1 \), where \( \phi\) is the golden ratio of \( \dfrac{1+\sqrt 5}{2} \)
Clearly 24581 does not satisfy this condition and not many semiprimes do. The next for me is 27641 which factors to 131 × 211 and where:$$|131\times \phi-211| \approx 0.9624525$$and so it just barely satisfies the criterion. Here is a partial list as shown in OEIS A108540:
6, 15, 77, 187, 589, 851, 1363, 2183, 2747, 7303, 10033, 15229, 16463, 17201, 18511, 27641, 35909, 42869, 45257, 53033, 60409, 83309, 93749, 118969, 124373, 129331, 156433, 201563, 217631, 232327, 237077, 255271, 270349, 283663, 303533, 326423
Presumably there is an infinity of golden semiprimes. There are other ratios of interest, for example pi. Here the number 154 = 7 x 22 could be treated in a manner similar to the golden semiprimes and the question asked as to whether \( |7 \times \pi-22| \) is less than 1. It turns out that it is (0.9911...) and so could perhaps be termed a circular semiprime. The number 15883 = 71 x 223 yields a much closer result (0.053...). Similarly for \(e\), the number 133 = 7 x 19 yields \( |7 \times e - 19| \approx 0.02797 \) and could be termed an Euler semiprime for want of a better term. 

Some semiprimes are not related to special mathematical constants but are nonetheless of interest. For instance, for Friday 26th August 2016 (the day I'm completing this post), my number 24617 = 239 x 103 and the ratio 239:103 can be expressed approximately as 2.32:1 (rounding off 2.320388... to two decimal places). This is very close to the aspect ratio for the current widescreen cinema standard of 2.35:1 or 2.39:1. However, following the pattern for the golden semiprime ratio, the result of \( |103 \times 2.35-239|=3.05 \) and \( |103 \times 2.39-239|=7.17 \) mean that the results are outside the acceptable range (less than 1).

Another way to view the ratio 239:103 is as 0.69883:0.30117 and if we round off to two decimal places, the result is 0.70:0.30 or 70% : 30%. This is the ratio of copper to zinc in so-called Cartridge brass described as follows:

70/30 brass has excellent ductility and good strength. It is often used where its deep drawing qualities are needed. The alloy is the most common brass in sheet form (source).

I guess the concept of the golden semiprime has opened my eyes to other classifications of semiprimes based on other constants such \(e\) and \( \pi\). Expressing the ratio in such a way that both sides sum to 1 is also useful because, as in the case of 0.70:0.30, connections to physical applications can be drawn.

on August 30th 2021

Saturday, 4 June 2016

Golden Semiprimes

Today I am 24534 days old and when checking this number on OEIS I came across the following:


Not having heard of the term before, I investigated what defined a golden semiprime. Below is the OEIS reference:


In today's case of 24534, the sum of the digits is 18 and the factorisation is 2×3^2×29×47, so n/(sum of digits of n) is 29 x 47. Now the absolute value of  29 x ø - 47 is approximately 0.077 and thus the criterion for a golden semiprime is satisfied. As can be seen from the list in OEIS A108542, such semiprimes are relatively sparse.

The significance of the concept is that it identifies that the fact that the two factors making up the semiprime are very nearly in the golden ratio. Of course the factors cannot be in the exact ratio because ø is not rational. Again, I've learned something quite interesting by keeping track of my daily numbers.