Wednesday, May 2, 2018

Pentagonal Number Theorem (1)

I was reading again recently that marvellous little book by Davis Wells “The Penguin Dictionary of Curious and Interesting Numbers” when my attention was drawn to the section on pentagonal numbers.

Now the pentagonal numbers are generally listed as,

1, 5, 12, 22, 35, 51, 70, …, with the nth pentagonal number given as n(3n – 1)/2 for n = 1, 2, 3, …

However when we allow n to also take on values for n = – 1, – 2, – 3, … we get the generalised pentagonal numbers, which arranged in ascending order are,

1, 2, 5, 7, 12, 15, 22, 26, 35, 40, 51, 57, 70, 77, 92, 100, …

Euler discovered an important and somewhat surprising relationship entailing the generalised pentagonal numbers.  

In multiplying out the infinite series

(1 – x)(1 – x2)(1 – x3)(1 – x4) … he discovered that the first few terms were,

1 – x1 – x2  + x5 + x7 – x12 – x15 + …

So the powers of the x terms naturally unfolding in this manner were seemingly the (generalised) pentagonal numbers.

Euler was then able to prove from this finding - now known as The Pentagonal Number Theorem - two remarkable results.

Firstly he showed that if σ(n) is the sum of the divisors of n then,

σ(n) = σ(n – 1) + σ(n – 2) – σ(n – 5) – σ(n – 7) + σ(n – 12) + σ(n – 15) – σ(n – 22) – …

So if n = 12, then

σ(12) = σ(11) + σ(10) – σ(7) – σ(5) + σ(0)

The divisors of 11 are 1, 11; the divisors of 10 are 1, 2, 5, 10; the divisors of 7 are 1, 7; the divisors of 5 are 1, 5; then when n = 0 the value is given as n, which in this case = 12.

Therefore σ(12) = 12 + 18 – 8   6  + 12  = 28.

And when we manually check, the divisors of 12 are 1 + 2 + 3 + 4 + 6 + 12  = 28.


Secondly he was able to relate his theorem to partitions.
Now p(n) represents the number of partitions of a number i.e. the number of distinct ways of expressing a number.

For example 4 has 5 partitions. So if 4 represented a group of pebbles, we could place all the pebbles in a group (as one possible partition). We could equally place 2 pebbles in one group and 2 in another (representing a second partition). We could also have 3 pebbles in one group and just one in another (representing a third partition).
We could then have 2 pebbles in one group and 1 each in two other groups (as a fourth partition). Finally, we could place the 4 items in four separate groups (as the fifth and final partition).

Therefore 4 has 5 possible partitions.

Thus if we wanted now to find p(n) where for example n = 5, we can use Euler’s formula, i.e.

p(n) = p(n – 1) + p(n – 2) – p(n – 5) – p(n – 7) + p(n – 12) + p(n – 15)  ...

Thus p(5) = p(4) + p(3) – p(0). In this case where n = 0, p(0) = 1.

So, p(5)  = 5 + 3 – 1 = 7.


However it is another feature of the pentagonal theorem that I wish to concentrate on in this entry.

In other related work, Euler came up with the following formula,

(1 – x)(1 – x2)(1 – x3)(1 – x4) …  

= 1 – x/{(1 – x)} + x3/{(1 – x)(1 – x2)}  – x6/{(1 – x)(1 – x2)( 1 – x3)} + …

So we can see here how the powers x in the numerator terms follow the pattern of the triangular numbers, i.e.

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, …


In fact there are many fascinating connections as between the pentagonal and triangular numbers.

For example, when a pentagonal number is multiplied by 3, a triangular number results.

So 12 (the 5th generalised pentagonal number) * 3 = 36 (the 8th triangular number).

Also when one combines the powers of x in the pentagonal number theorem in couplets (as they naturally occur with two positive terms alternating with the two negative terms), and then divide by 3, then the absolute value represents a triangular number.
So  – 1 – 2 = – 3 and 3/3 = 1   (the 1st triangular number)

– 1 – 2 + 5 + 7 = 9 and 9/3 = 3 (the 2nd triangular number)

– 1 – 2 + 5 + 7 – 12 – 15 = – 18 and 18/3 = 6 (the 3rd triangular number)

– 1 – 2 + 5 + 7 – 12 – 15 + 22 + 26 = 30 and 30/3 = 10 (the 4th triangular number).
                                            
And the full sequence of triangular numbers can be generated in this fashion.


In a reverse manner, if we take the triangular numbers in groups of 3, a direct connection with the pentagonal numbers can be shown.

So 1 + 3 + 6 = 10. Then dividing by 9 (and ignoring the remainder of 1) we get 1 (the 1st of the regular pentagonal sequence).

Then for the next group of 3 triangular numbers 10 + 15 + 21 = 46, and dividing by 9 (while ignoring remainder of 1) we get 5 (the 2nd of the pentagonal numbers).

For the next group 28 + 36 + 45 = 109. Again dividing by 9 (and ignoring  the remainder of 1) we get 12 (the 3rd pentagonal number)

Finally to illustrate for the next group 55 + 66 + 78 = 198. And dividing by 9 (and ignoring remainder of 1) we get 22 (the 4th pentagonal number).

So the regular pentagonal number series 1, 5, 12, 22, … can be generated in this manner.


The “shadow” pentagonal sequence (that is generated when n takes on negative values)
can also be generated from successive groupings of 3 triangular numbers.

Here we start with the 2nd triangular number with the 3 numbers in sequence 3, 6 and 10 respectively.
So the sum = 19 which when divided by 9 (again ignoring the remainder of 1) = 2.
The next 3 triangular numbers in sequence gives 15 + 21 + 28 = 64. Then dividing by 9 (and ignoring remainder) we obtain 7.

Again finally to illustrate the next grouping of 3 triangular numbers = 36 + 45 + 55 = 136. Then dividing by 9 (and ignoring remainder) we get 15.

So we have now generated the first 3 members of the “shadow” pentagonal series 2, 7, 15, …
Then the generalised pentagonal sequence combines the regular sequence with its shadow in ascending order of magnitude.    

Again with respect to the powers of x in the pentagonal number theorem, another fascinating observation can be made.

This time we successively take each natural couplet (of positive and negative terms) and divide by 3 concentrating on the absolute value of the result.

So the first two negative powers are 1 and 2 and 1 + 2 = 3 with 3/3 = 1. So this is the 1st term of our new series.

The next couplet of positive powers is 5 and 7 and 5 + 7 = 12 with 12/3 = 4. So this is the 2nd term of the series.

Then the next two negative powers are 12 and 15 and 12 + 15 = 27 with 27/3 = 9. So 9 is the 3rd term of the series.

Finally to illustrate the next two positive powers are 22 and 26 and 22 + 26 = 48 with 48/3 = 16. So 16 is the 4th terms of our series.

So the new series that can be successively generated in this manner is 1, 4, 9, 16, … (i.e. the squares of the natural numbers).

Thursday, March 22, 2018

Fascinating Palindrome Connection (2)

The approach in the last entry can be generalised for all self-generating numbers, where in the appropriate number bases, the original starting number * k (where k = 2, 3, 4, 5, …) = its reverse number.

When n = 4, a unique repeating 2-digit sequence applies to 1/n in bases 2n – 1, 3n – 1, 4n – 1, …, so
that the original starting number (using these 2 digits) * 3 = its reverse number.

And just as the kth term in the previous case “Fascinating Palindrome Connection 1”, where n = 3, is given by 3n2 – 2n, the kth term (where n = 4) is given by 4n2 – 2n, resulting in the series,

2, 12, 30, 56, 90, …

So the relevant number bases, where this form of self-generating behaviour applies is in the number bases 7, 11, 15, … (Once again we omit the number base where n – 1 = 3, applying to the 1st term of the series i.e. 2, as this results in a redundant 1st digit of 0 in the original starting number).

However the 2nd term, applying to base 7 is fully valid.

And 12 in base 7 = 15.

Therefore, 15 * 3 = 51 (in base 7).

However this can equally be expressed as 2 * (2n – 2) = 2 * 6 = 12 (in base 10), i.e. 15 in base 7.

So the subsequent 2-digit starting terms are given by 3 * 10 (= 28 in base 11), 4 * 14 (= 3B in base 15), 5 * 18 (= 4E in base 19) and so on.

Thus  28 * 3 = 82 (in base 11)
         3B * 3 = B3 (in base 15)
         4E * 3 = E4 (in base 19)
                 

Then one 3-digit term in each case is obtained from 22 * 6 in base 7, 33 * 10 (in base 11), 44 * 14 (in base 15), 55 * 18 (in base 19) and so on.

And as we saw in Fascinating Palindrome Connection 1” one can then use the formulas k/2(k/2 + 1), where k is odd and k/2 * k/2 where k is even, to calculate the total number of self-generating numbers (of a particular type) up to (and including) k digits.

So for example the total collection of self-generating numbers (where the original starting number * 3 = its reverse) -up to an including 4 digits - in each relevant number base, is    
4/2 * 4/2 = 4.
And in base 7, these are 15, 165, 1515 and 1665 respectively.

Tuesday, March 20, 2018

Fascinating Palindrome Connection (1)

I wish to correct a recent assertion regarding the frequency of self generating numbers in different number bases.

What I mean in this context is a number that when multiplied by a positive integer (> 1) = its reverse.

So for example in base 8, 25 (original starting number) * 2 = 52 (i.e. its reverse number).

Now I claimed that where such a 2-digit number exists (in an appropriate base), that one example will then occur for every higher digit number (in the same number base).

However I have since discovered, through an interesting number connection, that this is not in fact strictly true.

Once again when we start with a positive integer n (> 1), then the reciprocal of n will result in a unique repeating 2-digit decimal sequence in the corresponding number bases
2n – 1, 3n – 1, 4n – 1, …    

So again for example when n = 3, then 1/n results in this unique 2-digit sequence in base 5, 8, 11, …

And then when we take these 2 digits as the original starting number and subtract it from its reverse, the same starting number will result.

Alternatively, when we multiply the starting number by 2, we obtain its reverse in these number bases.

Thus in base 5, 13 * 2 = 31; in base 8, 25 * 2 = 52; in base 11, 37 * 3 = 73, and so on.

However there is another revealing perspective with respect to these numbers.
Thus when we divide each of these numbers by the number that is one less than the number base in question i.e. 2n – 2, 3n – 2, 4n – 2, … respectively we obtain 2, 3, 4, …

Now once again we are excluding the 2-digit number in base 2 i.e. 01, as the first digit as a 0 is strictly redundant.

So 2 * 4 = 13 (in base 5); 3 * 7 = 25 (in base 8); 4 * 10 = 37 (in base 11) and so on.

Now a corresponding higher digit numbers (where starting number * 2 = its reverse number) can now be created with respect to the original starting number provided that its palindrome nature is preserved and where the inclusion of one or more zeros is allowed (between first and last digits).

So when the palindrome has 2 digits, then only one possibility arises.

Thus in base 5, 22 * 4 = 143 and 143 (starting number) * 2 = 341 (its reverse number).
In like manner, in base 8,  33 * 7 = 275 and 275 (starting number) * 2 = 572 (its reverse number).

And in base 11, 44 * 10 = 3A7 and 3A7 (starting number) * 2 = 7A3 (its reverse number).

Thus there is indeed only one example of a self-generating number (of this type) with respect to all 3-digit numbers in bases 5, 8, 11, …

However when the palindrome now has 3 digits, two possibilities exist

So with respect for example to base 8, we can have 333 or 303.

Thus in base 8, we have as our possible starting numbers 333 * 7 = 2775 and 2775 (starting number) * 2 = 5772 (its reverse number).

However, we also have 303 * 7 = 2525 and 2525 (starting number) * 2 = 5252 (its reverse number).

Thus for 4-digit numbers in bases 5, 8, 11, …, we have 2 examples of such self-generating numbers (i.e. where the starting number * 2 = its reverse number).

Now when the initial palindrome has 4 digits, again illustrating with respect to base 8, we have just two possibilities i.e. 3333 or 3003.

And in base 8, 3333 * 7 = 27775 and 27775 (starting number) * 2 = 57772 (its reverse).

However, we also have 3003 * 7 = 25025 and 25025 (starting number) * 2 = 52052 (its reverse).

So for 4 and 5-digit numbers, we have two examples in each case of such self-generating numbers.

Then when we go to 6 and 7-digit numbers, we have three examples in each case, with 8 and 9-digit numbers 4 examples, with 10 and 11-digit numbers five examples and so on.

Thus when k is an even integer we have k/2 examples of such numbers in the relevant number bases.
And when k is an odd integer, we have (k – 1)/2 examples.

And the cumulative number of such numbers up to and including k digits is k/2(k/2 + 1), where k is odd and k/2 * k/2 where k is even.

Therefore, for example the total number of such self generating numbers up to and including 6 digits (i.e. where the reverse is twice the original starting number), in the appropriate number bases  5, 8, 11, ..., = 3 * 3 = 9.

Tuesday, March 13, 2018

Calculating Frequency of Palindromes

In this entry, I will attempt to provide formulas for the calculation of the number of palindromes (in any number base).

If we start with our customary base 10 system, through perhaps somewhat trivial, all of the single-digit numbers from 1 - 9 (inclusive) can be viewed as palindromes.

The number 9 for example in clearly the same whether digit(s) are read from left to right (or alternatively right to left).

Then with respect to 2-digit numbers from 11 – 99 (inclusive) again we have 9 examples (where the digits from 1 - 9 repeat).

Then with respect to 3-digit palindromes, the 1st and last digits must be the same (as one of the 9 digits from 1 - 9). Then the middle digits can be any one of the 10 digits (from 0 to 9 inclusive).

Thus with respect to 3-digit numbers, we have an additional 90 examples.
Then it is just the same with respect to 4 digit numbers where the two middle digits must be the same leaving again 10 options from 00 to 99.

Then with 5-digit numbers we will have 900 additional examples and another 900 with 6 digit numbers.

So we have  9 + 9 + 90 + 90 + 900 + 900 + …

= 18 + 180 + 1800 + …

= 2 * 9(1 + 10 + 102 + …)

Thus if we let x = base number (which in this case = 10), then we have

2 (x – 1)(1 + x + x2 + …) = – 2(1 – x)( 1 + x + x2  + …)

Therfore from 1-digit to n-digit numbers (where n is even), the total no. of palindromes is

2(xn/2 – 1).

So where n = 6, we have

2(x3 – 1) which when x = 10, gives 2 * 999 = 1998 (i.e. 9 + 9 + 90 + 90 + 900 + 900).

When n is odd we get,

2{x(n + 1)/2} – {x – 1}x(n 1)/2

So with n = 5 we get 2(x3 – 1) – {x – 1}x2.

So again with x = 10 (as number base) we obtain

1998 – 900 = 1098 (i.e. 9 + 9 + 90 + 90 + 900).

Again this expresses the frequency of all palindromes for numbers up to 5 digits i.e. from 1 - 99999 (inclusive).


The 2nd part of the formula {x – 1}x(n  1)/2 expresses the narrower notion of the number of n digit palindromes (where n is odd).

Then {x – 1}x(n  2)/2 expresses the corresponding notion of the number of n digit palindromes (where n is even).

Thus when n = 6, the no. of palindromes (in base 10) = 9 * 10= 900.

Monday, March 12, 2018

Extending Relationships (3)

This process of self-similarity in a complementary fashion, whereby a number when multiplied by another whole number is equal to its reverse is very rare indeed with respect to our customary denary system.

In fact there are only two types of situation where it occurs.

The first is the somewhat trivial case where the whole number multiple = 1. This in fact entails that the number is a palindrome, which could be alternatively stated by saying that a zero result results from subtracting the number from its reverse.

So when a number is a palindrome e.g. 343, when this number is multiplied by 1, the reverse number is obtained (which is identical to the starting number). So 343 * 1 = 343.

The other case, which again is somewhat trivial, results when a number - starting in 0 and with other digits forming a palindrome, is multiplied by 10 (i.e. the base number).

Here when the staring number is multiplied by 10, the reverse number is obtained.

So  for example 099 * 10 = 990.

However, if we exclude the validity of the starting digits (or digits) of the original number being equal to 0, then no examples of this latter form of behaviour exist in our customary number base.

Therefore, bearing this exclusion in mind,  the only case in base 10, where starting number * k = reverse (where k is a whole number) is where k = 1 (such that the number is a palindrome).

However such similarity is much more prevalent in other number bases.


Now, we have already seen that in number bases, 2, 5, 8, ... that the most striking form of such self-similarity arises where the whole number multiple (k) = 2. This implies that

reverse – original (starting) number = original number.

This coincides with the octagonal sequence

1, 8, 21, 40, ... (with kth term =  3n2 – 2n, where k = 1, 2, 3, ...).

However in base 2, this could be deemed as a somewhat trivial result that should be excluded.


We have already dealt with this issue in base 10 whereby a number (starting in one or more 0's), when multiplied by 10 can result in the reverse number being generated.

This can equally be associated with any number base. Therefore in base 2 when in the simplest case, we multiply 01 (the 1st number of the sequence) by 2 we obtain 10 (i.e. the reverse).

However if we exclude original numbers that start with one or more zeros in base 10, then we should equally exclude then in base 2.
 
Therefore, from this perspective, the first non-trivial case arises in base 5, whereby we have already seen (in the simple 2-digit case) that 8 (in denary terms) = 13 (in base 5), so that  13 * 2 = 31 (with 31 13 = 13)  .

Then in base 8, 21 (in denary terms) = 25 (in base 8) so that 25 * 2 = 52 (with 52 – 25 = 25) and in base 11, 40 (in denary terms) = 37 (in base 11) so that 37 * 2  = 73 (i.e. 73 – 37 = 37) and so on.

So in all these bases (2, 5, 8, 11, ...) just one example of such self similarity exists.

This equally applies then by extension to 3-digit, 4-digit, 5-digit, ...    numbers with just one valid example in each case.

Thus in base 5, in the 3-digit case, 143 * 2 = 341 (so that 341 143 = 143). This number is obtained by inserting the number that is 1 less than the base number in question (i.e. 5) between first and last digits.

Then again in base 5, in the 4-digit case, 1443 * 2 = 3441 (so that 3441 – 1443 = 1443). So here an additional 4 is placed anywhere between first and last digits.

And to illustrate further for the 5-digit case, 14443 * 2 = 34441 (so that 34441 14443 = 14443) with again an additional 4 placed between first and last digits.


Then when the whole number multiple, k = 3 so that original (starting) number * 3 = reverse, we found that this will exist in number bases 3, 7, 11, 15, ...  

This is associated with the number sequence  

2, 12, 30, 56, ...  (with kth term =  4n2 – 2n, where k = 1, 2, 3, ...).


Now again (as always the case), the initial base leads to a somewhat trivial result, where for example in the 2-digit case, where we express the 1st term of the sequence in base 3, 02 * 3 = 20.

Thus, excluding this case, the first non-trivial example occurs in base 7, where 12 (in denary terms) = 15 (in base 7) and 51 = 15 * 3.  

Then in base 11, 30 (in denary terms) = 28 (in base 11) and 82 = 28 * 3.

And in base 15, 56 in denary terms) = 3B (in base 15) and B3 = 3B * 3.

So in each of these bases, again just one 2-digit case arises with respect to this form of self-similarity.

However once again, the 2-digit-case can be extended to 3-digit, 4-digit, 5-digit, ... numbers by the continual inclusion between the first and last digits of the digit that is 1 less than the number base in question.

Thus the sole 3-digit example in base 7 of this form of self-similarity, (where reverse = original number * 3) is 165 so that 561 = 165 * 3.

And the sole 4-digit example in base 7 is 1665 so that 5661 = 1665 * 3.

And finally to illustrate the sole 5-digit example is 16665 so that 56661 = 16665 * 3.

Friday, March 9, 2018

Extending Relationships (2)

When I had completed yesterday’s entry, I realised that the results could be generalised further in a remarkable way.

Thus the starting sequence (where n = 2) is,

0, 4, 12, 24, …,  = 4(0, 1, 3, 6, …).

In other words the nth term of the starting sequence = 4 * nth term of the triangular sequence, where n = 0, 1, 2, 3, …

Now the nth term of the triangular sequence = n(n – 1)/2

Therefore the nth term of our starting sequence = 2n(n – 1) = 2n2 – 2n.

Now each further sequence for n = 3, 4, 5, … is obtained by successively adding n2 (i.e. the nth term of the sum of squares) to the previous result.

So for example the nth term of the octagonal sequence, where n = 3, is 3n2 – 2n, and the nth term of the sequence, where n = 4, is 4n2 – 2n, the nth term of the sequence where n = 5, is 5n2 – 2n and so on.

This means for example when n = 11, the nth term of the corresponding sequence = 11n2 – 2n.

Therefore the corresponding sequence is

9, 40, 93, 168, …

The reason for choosing this sequence is that the starting base is therefore 10 with subsequent relevant number bases increasing by 11.

So clearly 9 in base 10 (using 2 digits = 09) and the reverse = 90

And 90 (reverse) = 09 (original number) * 10.

However whereas this is clearly true, the result is not unique in this base as any other digit (from 1 – 8 inclusive) can be used with 0 so that the reverse = original number * 10.

Indeed this non-exclusivity applies to all number bases > 2.

When n = 3 and the starting base = 2. Then 01 is the  2-digit original number that can arise in this base with 10 its reverse so that 10 – 01 = 01. However even here the 0 in 01 is strictly redundant.  

And 10 reverse = 01 (original number) * 2.

Then when we keep inserting 1 (in base 2) between first and last digits the self generating pattern is preserved for higher digit numbers.

So 110 – 011 = 011; 1110 – 0111 = 0111 and so on.

However where n > 3 (and consequent number base > 2) a non-exclusive basis attaches to the original number generated in the starting base.

So again where n = 11 (and starting base = 10) any digit from 1 to 9 can be associated with 0 in the 2-digit case and again any digit from 1 to 9 can be continually inserted as between first and last digits to generate higher digit numbers (where the reverse – original number * 10).

However once we proceed on to the next relevant number base, a unique relationship exists (where 0 is not a starting digit).

For example 40 in base 21 is 1S (where S denotes the number 19).

The reverse S1 = (21*19) + 1 = 400

And 400 (reverse)  = 10 * 40 (original number) in denary terms .

So S1 (reverse) = 10 * 1S (original number) in base 21.

This is then unique as the only 2-digit example with this number property in base 21.

However we can then continually extend this property uniquely to 3-digit, 4-digits, 5-digit, … numbers in base 21 by inserting T (representing units measured in 20’s) as between 1st and last digits.

So the corresponding 3-digit original number (in base 21) = 1TS = 19 + 20 * 21 + 21* 21 = 880 (in denary terms).

And the reverse ST1 = 1 + 20 * 21 + 19 * 21 * 21 = 8800.

So again as we see in base 21,

ST1 (8800 in denary terms) = 10 * 1TS (880 in denary terms).


We saw when dealing with the octagonal sequence (which offers the most unique self similarity features of number), that it also has a well-defined “shadow” sequence that arises when the nth term of the octagonal i.e. 3n2 – 2n is defined for n = 0, – 1, – 2, – 3…

Alternatively this sequence i.e.

0, 5, 16, 33, 56, …,

can be defined, where the nth term = 3n2 + 2n for n = 0, 1, 2, 3, …

Now the nth term of the sequences that we have so far addressed can be defined in general terms as kn2 – 2n where k = 2, 3, 4, ….

And the nth term of the corresponding “shadow” sequences can be defined in general terms as kn2 + 2n, where k = 2, 3, 4, …

Therefore the “shadow” sequence to the starting sequence that we have already considered i.e. 0, 4, 12, 24, … has as its nth term 2n2 + 2n , for n = 0, 1, 2, 3, … i.e.

0, 4, 12, 24, 40, …,

which gives us the same starting sequence. Again in the “shadow” case we start with negative base 1, with subsequent bases increasing in negative terms by 2.

Thus 4 in negative base 3 = – 22 i.e. –{(2 * – 3) + 2}

And the reverse is also – 22

Thus – 22 = – 22 * 1

So reverse = original number * 1.

And to give one more example,
12 in negative base 5 = – 33 i.e. –{(3 * – 5) + 3}

And – 33 = – 33 * 1

So again reverse = original number * 1.

Thus we have replicated the same result in the negative bases of the “shadow” sequence as in the original starting sequence for positive bases.

Then when we switch to considering these numbers in corresponding positive bases, the same behaviour occurs.

So 4 in base 3 = 11 with the reverse also 11.

And 12 in base 5 = 22 with the reverse also 22.

So uniquely with the starting sequence, with its shadow is the same sequence, the self replicating feature where the original number = the reverse number (i.e. where both are palindromes) applies to interpretation in  positive and corresponding negative number bases.

Then when we went on to consideration of the “shadow” to the next sequence i.e. octagonal, we found that the same behaviour there ( i.e. where reverse = original number * 2) was replicated in negative number bases 1, 4, 7, …

Thus one interesting feature here is that though the gap between relevant number bases is related to the value of n (= 3 in this case) the starting base for all “shadow” cases starts at 1. This is ultimately due to the fact that we are now defining n with respect to 0, 1, 2, 3, ..., whereas formerly we defined n with respect to 1,2 3, ...  from

Then in the “shadow” case of the octagonal, where we now consider results in positive number bases, palindromes results i.e. where reverse = original number * 1.

And this behaviour universally characterises subsequent sequences.

For example the next “shadow” sequence (where the nth term is 4n2 + 2n) for n = 0, 1, 2, 3, … is

0, 6, 20, 42, … with n = 4 and relevant number bases are 1, 5, 9, 13, …

Thus the 1st non-trivial result applies to 6 in negative base 5, which is – 24. And the reverse is – 42 (i.e. 18 in denary terms).

Thus – 42 (reverse) = – 24 * 3 (original number)

And this replicates behaviour for its complementary sequence (in positive number bases).

And when we interpret base 3 in positive terms 6 = 11 (a palindrome) so that

11 (reverse) = 11 (original number) * 1.  

Thursday, March 8, 2018

Extending Relationships for Octagonal Numbers

We have been looking at the octagonal sequence (and its “shadow” sequence) showing how its terms when expressed in appropriate number bases leads naturally to one important form of self-generating numbers i.e. where the same number results, when subtracted from its reverse.

However this in fact represents but a specific example of a more general number phenomenon.

Now when we return to the octagonal numbers, we may recall that the two digits that occur in the respective number bases 2, 5, 8, … (when converting each term to its appropriate number base) represent the unique 2-digit recurring sequence of the reciprocal of 3 in each of these bases.

So again for example, 8 in base 5 = 13 (with 31 – 13 = 13). 13 then equally represents the unique 2-digit sequence of 1/3 in this base (.131313…)

Thus the number in question here (to which 1st reciprocal relates) is 3.

And the 1st relevant number base (through which the respective terms of the octagonal sequence are expressed) = 2 (i.e. 3 – 1). And then subsequent number bases keep increasing by 3.

So we now can express a more general number phenomenon in these terms.

Let n represent a number. Then when we obtain the unique digit sequence of its reciprocal (1/n) in the respective number bases n – 1, 2n – 1, 3n – 1, …, a unique recurring connection will characterise the relationship between each resulting 2-digit number and its reverse (in its respective number base).

The simplest case occurs when n = 2, Therefore the appropriate number bases here to express the unique digit sequence of  1/2 are 1, 3, 5, …

Now 1/2 expressed in base 1 does not have a meaningful expression. But 1/2 in base 3 is .111… Though there is only one recurring digit in this case, we will preserve the first two digits as 2 unique digits will arise when n> 2.  So the digit sequence here is 11.


And in this case 11 is equal to its reverse. So 11 (reverse) = 11 (original number) * 1. And 11 in base 10 = 4.

And this is equally the case for all subsequent number bases. For example in base 5, the reciprocal of 2 = .222… So 22 (reverse) = 22 (original number) * 1. And 22 in base 10 = 12

So when the number (to which the reciprocal relates) is 2 with relevant number bases 3, 5, 7, …,

reverse = original number * 1

Now  when expressed in base 10, these numbers in the respective number bases leads to a unique sequence i.e. the triangular numbers * 4,

0, 4, 12, 24,  …

Then as we have seen in the next case, where 3 is the number to which the reciprocal relates (bases 2, 5, 8, …), a unique 2-digit sequences arise.

And in all these cases (as for example 31 and 13 in base 5),

reverse = original number * 2.

And these numbers in their respective number bases, expressed in base 10, lead to the octagonal sequence of numbers,

1, 8, 21, 40, …

Then when we subtract each term of the original sequence from the octagonal sequence we get

1, 4, 9, 16, ... (i.e. the sum of squares).


And continuing on, in the next case, where 4 is the starting number to which the reciprocal relates, the relevant number bases (for expressing its unique 2-digit sequence) are 3, 7, 11, …

So for example in base 3, 1/4 = .0202…

Thus the unique 2-digit sequence = 02.

Then when we subtract 02 from its reverse we get 20 – 02 = 11

So in denary terms the reverse = 6 and the original number = 2.

Then in base 7,  1/4 = .1515…

Thus the unique 2-digit sequence is 15.

And 51 in denary terms = 36 and 15 = 12

So generalising for all such cases related to starting number 4,

reverse = original number * 3

Once again a unique sequence is associated with each of these original numbers, when expressed in a denary manner i.e.

2, 12, 30, 56, …

In fact we can see a discernible pattern emerging as we move to higher number bases.
Thus the original number in base 3 = 02, in base 7 = 15, in base 11 = 28, base 15 = 3A and so on.

And 2, 12, 30, 56 = 2(1, 6, 15, 28, …)

The terms inside the brackets constitute the hexagonal sequence (which comprises the odd numbered terms of the triangular sequence).

It is fascinating in this context that if now subtract each term of the previous octagonal sequence from each corresponding term of this new sequence, we again obtain

1, 4, 9, 16, … (i.e. the squares of the natural numbers).


So using just one final case for illustration, when the starting number is 5, we consider 1/5 in bases 4, 9, 14, …

1/5 in base 4 = .0303…

Therefore the unique 2-digit sequence = 03 which now constitutes our original number in base 4.

And the 30 = 12 (in denary terms)

So 30 = 03 * 4 (in base 4).

In base 9, 1/5 = .1717…

Therefore the unique 2-digit sequence = 17, which now constitutes our original number in base 9.
And 17 = 16 and 71 (the reverse) = 64 (in denary terms).

So 71 = 17 * 4 (in base 9).

So generalising for all such cases related to starting number 5,

reverse = original number * 4.

Then the corresponding unique associated number sequence (in base 10) is

3, 16, 39, 72, … (A147874 in OEIS)

Once again when we subtract each terms of the previous sequence from the corresponding terms of the new sequence, we obtain,

1, 4, 9, 16,…(the squares of the natural numbers)


Expressed in even more general terms when the starting number (to which the reciprocal 1/n relates in number bases n – 1, 2n – 1, 3n – 1, … then with respect to the original numbers (based on the unique digit sequence of the reciprocal)

reverse = original number * (n – 1)

Thus when the starting number is 6

reverse = original number * 5

We can readily confirm this for 1/6 in base 5 = .0404…

Therefore the unique digit sequence = 04
So the relevant original number (in base 5) = 04 and reverse 40 (i.e. 4 and 20 in denary terms)

Thus 40 = 04 * 5.

Incidentally the sequence (in base 10) associated with these numbers is

4, 20, 48, 88, …  = 4 (1, 5, 12, 22, …)

And the terms inside the brackets comprises the pentagonal sequence.

Once again when we subtract each term of the previous sequence from each corresponding term of the present sequence we obtain

1, 4, 9, 16, … (i.e. the squares of the natural numbers). And this appears to be universally the case.


We can therefore write down immediately the unique digit sequence in the next case(for n = 7) by adding each of these sum of square terms to the respective term in the previous sequence, to obtain

5, 24, 57, 104, …

So 5 in base 6 = 05
And 50 = 05 * 6 (in base 6)
Likewise 24 in base 13  = 1B
And its reverse B1 = 11* 13 + 1 = 144
And 144 (reverse) = 24 (original number * 6).

So starting with the original sequence (where n = 2), we can directly generate all further sequences by simply adding each term of the original sequence to the corresponding term of the sum of squares.system.