Showing posts with label Zeckendorf. Show all posts
Showing posts with label Zeckendorf. Show all posts

Saturday, 10 January 2026

Some Infographics

One of the trends in 2025 was prompting Gemini to create interesting infographics. In this post, I'll display three interesting mathematical infographics that I prompted Gemini to created.

Prompt 1: Create an infographic comparing real, complex, quaternion and octonian numbers.


Prompt 2: Create an infographic highlighting the differences between deficient, perfect and abundant numbers with clear examples to illustrate each type of number.


Prompt 3: Create an infographic showing how to derive the Zeckendorff representation of a number using the Fibonacci base system.


These infographics are certainly concise and informative and I'll create more in the future. For the time being, I'll go back over my previous posts and insert these three into their the appropriate posts.

Sunday, 23 November 2025

Infographic of the Zeckendorf Representation

Watching a YouTube video on the capabilities of Nano Banana Pro, I thought that I might apply it to the number associated with my diurnal age yesterday: 27992. Using thinking mode and the image generation tool, I gave Gemini the following prompt:

Create an infographic on the Zeckendorf number base representation of a positive integer using the number 27992 as the example. The infographic should explain clearly how the representation is arrived at as well as the Fibonacci numbers that comprise it. The binary form of the representation should also be explained where the 1's and 0's replace the actual Fibonacci numbers. There should be a photo of Zeckendorf along with a brief biography. The colour scheme should be pastel and a 16:9 aspect ratio suitable for placement in a blog post that will be viewed on a desktop computer. There should be a border around the infographic and it is most important that the text should stand out and be easily readable against the background colours. A sans serif font like Ubuntu should be used. 

I was skeptical that such a task could be completed but I was pleasantly surprised by the final product. Figure 1 shows the infographic that Nano Banana Pro created in png format. Double click to see it in a larger view.


Figure 1: public link
Created using Gemini's Nano Banana Pro

This is seriously impressive. The AI did everything asked of it and the task was completed almost instantly. There is also an infographic-generating option within NotebookLM so I'm keen to test that out on some blog posts that I upload in the near future.

Coincidentally, today's date, November 23rd, is regarded as Fibonacci day because of the digits involved:$$ \text{November 23rd } \rightarrow 1, 1, 2, 3$$

Saturday, 22 November 2025

The Secret Language of Numbers


This is a video generated by NotebookLM from two posts taken from this blogsite (Mathematical Meanderings). The posts are The Fibonacci Number Base from the 30th July 2019 and Zeckendorf Representation Revisited from the 14th April 2023. Here is the link but I've also embedded the video above. I'm quite pleased with the quality of the video, which is the third now that I've created using NotebookLM. The title for the video was proposed by the AI and I've gone along with it.

The whole process is just so quick and easy. You download the post or posts as PDF files and then upload them to NotebookLM. I have a dedicated notebook to which I upload the PDF files. There are several files there already that were used in previous videos. These files are deselected as sources and only the two latest files are selected. I go to video overview and get NotebookLM to generate the video and then download this as a mp4 file and upload it to YouTube. Within a few minutes I've combined two blog posts into an interesting and professional looking video. The hard work was in creating the two blog posts in the first place.

Friday, 14 April 2023

Zeckendorf Representation Revisited

I've dealt with the topic of the Zeckendorf representation of numbers in earlier posts: namely The Fibonacci Number Base on July 30th 2019 and Goldbach's Conjecture and Zeckendorf's Theorem on November 15th 2015. As can be seen, the topic doesn't come up all that much and so, when it does, it's time to make a note of it because the opportunity may not come again for a long time. There are so many interesting topics in number theory that it's easy to forget even some of the really interesting ones like the Zeckendorf representation of a number.

The reason I was reminded was that yesterday I turned 27038 days old and one the properties of this number is that it's a member of OEIS A179250:


 A179250

Numbers that have 10 terms in their Zeckendorf representation.         
  


Such numbers are uncommon as the following list of the initial members attests:

10945, 15126, 16723, 17333, 17566, 17655, 17689, 17702, 17707, 17709, 17710, 21891, 23488, 24098, 24331, 24420, 24454, 24467, 24472, 24474, 24475, 26072, 26682, 26915, 27004, 27038, 27051, 27056, 27058, 27059, 27669, 27902, 27991

Notice how the numbers are clumped together. For example: 27004, 27038, 27051, 27056, 27058, 27059. This is seen more clearly in a plot. See Figure 1.


Figure 1: horizontal red lines added for emphasis

Before going on however, we should remind ourselves what the Zeckendorp representation is all about. Let's restate Zeckendorf's Theorem:
Every positive integer can be represented uniquely as the sum of one or more distinct Fibonacci numbers in such a way that the sum does not include any two consecutive Fibonacci numbers.
The theorem has two parts:

Existence: every positive integer \(n\) has a Zeckendorf representation.

Uniqueness: no positive integer \(n\) has two different Zeckendorf representations.

Source 

So 27038 has ten terms in its Zeckendorf representation. What are these terms? We can use this site to quickly identify them. The terms are:

1, 3, 8, 21, 89, 233, 610, 1597, 6765, 17711 
and thus
27038 = 1 +3 + 8 + 21 + 89 + 233 + 610 + 1597 + 6765 + 17711 

The first few Fibonacci numbers are 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368 and so the Zeckendorf representation, using the same site as listed earlier, becomes:

\(27038 = 101001010101001010101_{Zeck} \text{ with 10 ones} \)

There are more such numbers coming up in the near future (27051, 27056, 27058 and 27059) but after that there is a big gap of 610 days to 27669. It can be noted that 27058 and 27059 are a consecutive pair. The thing about ten terms is that this number is relatively uncommon. Generally, fewer terms are required as can be seen from the following list of numbers from 27038 to 27045 (link) and this is in an area where such numbers are clumped together:

27038 = 101001010101001010101Zeck with 10 ones
27039 = 101001010101010000000Zeck with 7 ones
27035 = 101001010101001010001Zeck with 9 ones
27036 = 101001010101001010010Zeck with 9 ones
27037 = 101001010101001010100Zeck with 9 ones
27038 = 101001010101001010101Zeck with 10 ones
27039 = 101001010101010000000Zeck with 7 ones
27040 = 101001010101010000001Zeck with 8 ones
27041 = 101001010101010000010Zeck with 8 ones
27042 = 101001010101010000100Zeck with 8 ones
27043 = 101001010101010000101Zeck with 9 ones
27044 = 101001010101010001000Zeck with 8 ones
27045 = 101001010101010001001Zeck with 9 ones

Tuesday, 30 July 2019

The Fibonacci Number Base


In a blog post of Sunday, 15th November 2015, titled Goldbach's Conjecture and Zeckendorf's Theorem, I wrote the following:
I came across Zeckendorf's Theorem when examining the number 24331. It's similar to Goldbach's Conjecture in that it deals with the decomposition of numbers but into Fibonacci numbers, not primes. It states, to quote from Wikipedia again, that: 
Every positive integer can be represented uniquely as the sum of one or more distinct Fibonacci numbers in such a way that the sum does not include any two consecutive Fibonacci numbers. 
Now the first few Fibonacci numbers are: 
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368 
The Wikipedia article goes on to state that the theorem has two parts: 
Existence: every positive integer n has a Zeckendorf representation.Uniqueness: no positive integer n has two different Zeckendorf representations. 
The example is given of the number 100 = 89 + 8 + 3. There are other ways of representing 100 as the sum of Fibonacci numbers: 100 = 89 + 8 + 2 + 1 and 100 = 55 + 34 + 8 + 3 but these are not Zeckendorf representations because 1 and 2 are consecutive Fibonacci numbers, as are 34 and 55.
This is the first time I've revisited the topic. I found a site that will calculate the relevant Fibonacci numbers that add to a given number. Figure 1 shows the calculation for today's number of 25684:

Figure 1: source

The result as can be seen is {1,21,55,144,987,6765,17711}. I've also developed an algorithm in SageMath that does this also but I'm still refining it. The Zeckendorf system uses the set with the fewest Fibonacci numbers in it. The same site has a calculator that will express a given number in terms of a Fibonnaci number base using the digits 0 and 1. The idea is that a number like 25684 would be represented as 101000100010101000001 where the rightmost 1 stands for the largest Fibonacci number and the leftmost 1 or 0 stands for the smallest Fibonacci number (which is 1 in this system). If a particular number does not form part of the same then its position is occupied by a 0. The calculator is shown in Figure 2:

Figure 2: source

My SageMath algorithm clumps all the 0's and 1's together and I'm still trying to work out what the problem is. For numbers in the vicinity of my current age (in days), seven or eight numbers seem to be generally required:
  • \(25684 = 101000100010101000001_{Zeck}\) with 7 ones 
  • \(25685 = 101000100010101000010_{Zeck}\) with 7 ones
  • \(25686 = 101000100010101000100_{Zeck}\) with 7 ones
  • \(25687 = 101000100010101000101_{Zeck}\) with 8 ones
  • \(25688 = 101000100010101001000_{Zeck}\) with 7 ones
  • \(25689 = 101000100010101001001_{Zeck}\) with 8 ones
As a number base, it's hardly compact but a simple way to compress it would be to use the same system that it used in data compression: representing consecutive runs of 0's by the binary digit and an associated superscript that expresses the length of the run. There can't be runs of 1's in this representation. In this way, the numbers above become:
  • \(25684 = 1010^310^3101010^51_{Zeck}\) 
  • \(25685 =1010^310^3101010^410_{Zeck}\)
  • \(25686 =1010^310^3101010^310^2_{Zeck}\)
  • \(25687 = 1010^310^3101010^3101_{Zeck}\)
  • \(25688 = 1010^310^3101010^210^3_{Zeck}\)
  • \(25689 = 1010^310^3101010^210^21_{Zeck}\)
It's interesting to note, using the calculator in Figure 1, how many possible sets of Fibonacci numbers there are that add to a given number. Here are the results for the previous numbers:
  • 66 sets with a sum of 25684
  • 66 sets with a sum of 25685
  • 103 sets with a sum of 25686
  • 37 sets with a sum of 25687
  • 74 sets with a sum of 25688
  • 74 sets with a sum of 25689
The minimal set of numbers is being used to determine the Zeckendorf representation but others configurations are possible. As the site says:
The Zeckendorf system uses the set with the fewest Fibonacci numbers in it. What about choosing that set with the most Fibonacci numbers with a sum of n, each Fibonacci number being used at most once? This is called the maximal Fibonacci bit representation. "Bit" means that the only digits in the representations are 0 and 1. Zeckendorf's is therefore the minimal Fibonacci bit representation.
For 25684, the maximal set is 

{1, 3, 5, 13, 21, 34, 55, 89, 144, 233, 610, 987, 1597, 4181, 6765, 10946}

This consists of 16 numbers and can be found using the calculator in Figure 1. Compare this with the full set of Fibonacci numbers:

{1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946}

This number would thus become \(11101110111111111101\) or \(1^301^301^{10}01\) used my superscript system described earlier. As can be seen, only three numbers are missing and thus there are only three 0's. In order to avoid confusion, the subscript MaxFib or the like should be e.g. \(25684 = 11101110111111111101_{MaxFib}\) or \(1^301^301^{10}01_{MaxFib}\). Here's some historical background:
This system is also called the Zeckendorf representation of a number after Edouard Zeckendorf who wrote about it (in French) in 1972. He proved that each representation of a number n as a sum of distinct Fibonacci numbers, but where no two consecutive Fibonacci numbers are used (and there is only one column headed "1"), is unique. However, earlier, Lekkerkerker had written about this representation in 1952 in Dutch showing that there is only one way to write a number in this system but, unfortunately for him, the system is now generally called Zeckendorf's.
In formal mathematical terms, the Zeckendorf representation can be defined as follows:

A number written as a sum of nonconsecutive Fibonacci numbers, such that$$n=\sum_{k=0}^L \epsilon_k \,F_k$$where \(\epsilon_k\) are 0 or 1 and \( \epsilon_k \times \epsilon_{k+1}=0\). Every positive integer can be written uniquely in such a form (which is in itself a particular example of a Ostrowski numeration).

Here is a link to a PDF file of an academic paper with the following abstract:
Three contrasting polyphonic musical compositions based on Zeckendorf representations in the style of music characterised by Fibonacci numbers and the golden ratio are presented and analysed.