Saturday, 22 November 2025
The Secret Language of Numbers
Monday, 17 November 2025
Testing AI
I thought I might challenge AI to guess the next number in a given sequence. This was my query:
Can you propose what the next number in this sequence of numbers might be and explain your reasoning$$1, 3, 7, 13, 7, 31, 43, 19, 73, 13, 37, \dots$$First up I asked Grok and got a rather curious response:
Uh-oh, too much information for me to digest all at once. You know, sometimes less is more!
That wasn't much help so I turned to Gemini and ChatGPT. They both accepted the challenge and tried their best but neither came up with anything convincing. Finally I gave the latter the following clue:
I'll give a clue. The numbers are generated by a simple quadratic function (using the integers 0, 1, 2, 3 , ... progressively as input) that collapses composite numbers when they appear according to a simple division rule.
Nice clue — that nails it.
The quadratic is \(f(n)=n^2+n+1\) for integer inputs \(n=0,1,2,\dots \).
The collapse rule: whenever \(f(n) \) is composite, divide it by its smallest prime factor (and repeat if necessary) until the result is prime.
Checking the given terms (I'll show \(n\) \( \rightarrow \) raw \(f(n)\) \( \rightarrow \) collapsed result):
\(n=0: f=0^2+0+1=1 \rightarrow 1\)
\(n=1: f=1^2+1+1=3 \rightarrow 3\)
\(n=2: f=4+2+1=7 \rightarrow 7 \)
\(n=3: f=9+3+1=13 \rightarrow13 \)
\(n=4: f=16+4+1=21 \rightarrow 21/3=7 \)
\(n=5: f=25+5+1=31 \rightarrow 31\)
\(n=6: f=36+6+1=43 \rightarrow 43 \)
\(n=7: f=49+7+1=57 \rightarrow 57/3=19 \)
\(n=8: f=64+8+1=73 \rightarrow 73\)
\(n=9: f=81+9+1=91 \rightarrow 91/7=13 \)
\(n=10: f=100+10+1=111 \rightarrow 111/3=37\)
All match your sequence.
Now the next input:$$n=11: f(11)=121+11+1=133 \rightarrow 133/7 = 19$$ So the next number in the sequence is 19.
So a little clue and ChatGPT, as it said, nailed it. This was just a little experiment to see what how AI would handle a problem that is actually quite challenging. The sequence is NOT listed in the OEIS by the way.
I challenged ChatGPT to come with a similar challenge and this is what it generated:
Could you propose a similar but different challenge. You should try to be creative and innovative but adhering to the general algorithm, namely generate a sequence of numbers according to a definite rule but modify certain numbers according to another definite rule whenever they satisfy a certain preestablished criterion. Go for it.
Nice — here’s a fresh puzzle in the same spirit as yours: a definite generating rule (a simple quadratic) plus a deterministic “collapse” rule that kicks in whenever the raw value meets a criterion.
I had to take a screenshot of the puzzle as copying and pasting introduces tedious formatting challenges.
Sunday, 16 November 2025
The Universe of Catalan Numbers
- Catalan Numbers from the 30th September 2015
- Motzkin Numbers from the 23rd March 2023
This video was generated by NotebookLM based on two posts from my mathematical blog, namely Catalan Numbers and Motzkin Numbers. These two posts are my own and AI was not used in their creation. The video doesn't quite get everything right. For example, it says at the outset that \(24285\) is a Catalan number. In fact \(24285\) is NOT a Catalan number but rather the residue after we divide the 15th Catalan number \(9694845\) by \(2^{15}\) as I explain my blog post. Apart from this, the video does a reasonable job of summarising the content of the two blog posts.
This is now the second video I've created from my blog posts and I'll sure I'll continue to generate more.
Thursday, 13 November 2025
Claude to the Rescue
- \(3 + 5 = 8 =2^3\)
- \(3 + 47 = 50 = 2 \times 5^2\)
- \(3 + 239 = 242 = 2 \times 11^2 \)
- \(3 + 3023 = 3026 = 2 \times 17 \times 89 \)
- \(3+27983 = 27986 = 2 \times 7 \times 1999\)
- nextprime(\(n\)): Returns the next prime number greater than \(n\)
- primeomega(\(n\)): Returns the total number of prime factors of \(n\) (counting multiplicity). For example, primeomega(12) = 3 because 12 = 2² × 3 (two 2's and one 3)
- ps[-1] accesses the last element of the list
- Initially, this gives nextprime(3) = 5
- This is our candidate prime to add to the sequence
- For every number \(x\) already in our list ps
- The sum \(x + p\) must have exactly 3 prime factors (counting multiplicity)
- If this condition fails for any \(x\), we move to the next prime candidate
- This continues until we find a prime where all sums have exactly 3 prime factors
- \(3+7=10=2 \times 5\)
- \(3+19=22=2 \times 11\)
- \(3+139=142=2 \times 71\)
- \(3+859=862=2 \times 431\)
- \(3+8179=8182=2 \times 4091\)
- \(3+173059=173062=2 \times 86531\)
- \(3+13=16=2^4\)
- \(3+137=140=2^2 \times 5 \times 7\)
- \(3+1193=1196=2^2 \times 13 \times 23\)
- \(3+4373=4376=2^3 \times 547\)
- \(3+26017=26020=2^2 \times 5 \times 1301\)
- \(3+33889=33892=2^2 \times 37 \times 229\)
- \(3+495433=495436=2^2 \times 29 \times 4271\)
Tuesday, 11 November 2025
From Blog Post To YouTube Video
The idea occurred to me to save one of my blog posts as a PDF and then upload it to NotebookLM. I then generated a video overview which looked surprisingly good I thought. The blog post in question was Free Free Fibonacci Sequences from July 18th 2021. Here is the video:
Thursday, 6 November 2025
Passcodes and Repeated Digits
The content in this post is taken from this video on the YouTube channel MindYourDecisions. Figure 1 shows if the digits of a four digit code are known, there are 24 possibilites of the code contains four distinct digits but 36 possibilities if the code contains only three digits (with one digit repeated).
![]() |
Figure 1 |
If no digits are repeated, then there are:$$4! = 4 \times 3 \times 2 \times 1 =24 \text{ possibilities}$$However if one digit is repeated then we have:$$ \frac{4!}{2!} \times 3 = 36 \text{ possibilities}$$What happens with a six digit passcode when we know the digits but not the order. If six digits are used, then we have:$$6! = 6 \times 5 \times 4 \times 3 \times 2 \times 1 = 720 \text{ possibilities}$$However, if one digit is repeated then we have:$$ \frac{6!}{2!} \times 5 =1800 \text{ possibilities: see Figure 2}$$
![]() |
Figure 2 |
The formulae in general for distinct digits versus one repeated digit are:$$ n! \leftarrow \text{ versus } \rightarrow \frac{(n-1) \times n!}{2}$$Once we have \(n \geq 4\) then \( (n-1)/2 \) is greater than 1 and so the single repeated digit passcode will always yield more possibilities than the distinct digits. What about repeating more than one digit?
![]() |
Figure 3 |
![]() |
Figure 4 |
Sunday, 2 November 2025
Palindromic Day 27972
number factorisation divisors1 1 12 2 24 2^2 36 2 * 3 444 2^2 * 11 666 2 * 3 * 11 8252 2^2 * 3^2 * 7 182112 2^6 * 3 * 11 282772 2^2 * 3^2 * 7 * 11 366336 2^6 * 3^2 * 11 4227972 2^2 * 3^3 * 7 * 37 4848384 2^8 * 3^3 * 7 72
count n multiple1 1 12 2 13 3 14 4 15 5 16 6 17 7 18 8 19 9 110 0 011 11 112 252 2113 494 3814 252 1815 525 3516 272 1717 272 1618 252 1419 171 920 0 021 252 1222 22 123 161 724 696 2925 525 2126 494 1927 999 3728 252 929 232 830 0 031 434 1432 2112 6633 33 134 272 835 525 1536 252 737 111 338 494 1339 585 1540 0 041 656 1642 252 643 989 2344 44 145 585 1346 414 947 141 348 2112 4449 343 750 0 051 969 1952 676 1353 212 454 27972 51855 55 156 616 1157 171 358 232 459 767 1360 0 061 26962 442
27972 requires 13 steps to reach the palindrome 4964444694 under the Reverse and Add algorithm.
27972 is a decagonal or ten-sided number and is the 84th decagonal number and the second non-trivial palindromic decagonal number after 232. See Figure 1 where 232 is shown but not 27972.
![]() |
Figure 1: source |
27972 is a member of OEIS A356854: palindromes that can be written in more than one way as the sum of two distinct palindromic primes. In the case of 27972 we have:
10501 + 17471 = 2797211311 + 16661 = 2797211411 + 16561 = 2797212421 + 15551 = 27972







