Math factoid of the day: 61

Friday 16 June 2023

A figurate number is one that can be represented as a filled polygon of that number of dots. A centered figurate number includes a dot at the center. 61 is the only number (other than the trivial 1) that is a centered square number, a centered hexagonal number, and a centered decagonal number:

  • Square: 1, 5, 13, 25, 41, 61, 85, 113, 145, 181, ...
  • Hexagonal: 1, 7, 19, 37, 61, 91, 127, 169, 217, 271, ...
  • Decagonal: 1, 11, 31, 61, 101, 151, 211, 281, 361, ...

Here are diagrams of 61 dots, arranged as centered square, hexagonal and decagonal numbers:

Diagram of centered square number: 61
Square
Diagram of centered hexagonal number: 61
Hexagonal
Diagram of centered decagonal number: 61
Decagonal

I’m sure there’s a math way to prove that 61 is the only number in all three sequences, but I don’t know it. Instead, I wrote a small program to test it empirically:

import itertools

def intersect_monotonic_sequences(*seqs):
    """Find numbers that appear in all sequences.

    `seqs` must be monotonic integer sequences.
    """
    # A list of lists.  First element is the latest number
    # from the sequence, third element is the sequence.
    # Second element is a tie-breaker so we don't try to
    # compare the sequences themselves when sorting.
    work = [[next(seq), i, seq] for i, seq in enumerate(seqs)]
    work.sort()
    # v0 is the smallest value we've gotten from any sequence.
    v0 = work[0][0]
    while True:
        # If all of the sequences produced the same number,
        # we found what we're looking for.
        if all(item[0] == v0 for item in work):
            print(f"{v0:,}")
        # Sort the work so we look at the smallest number next.
        work.sort()
        v0 = work[0][0] = next(work[0][2])


# Centered number formulas

def centered_4(n):
    return n**2 + (n - 1)**2

def centered_6(n):
    return n**3 - (n - 1)**3

def centered_10(n):
    return 5 * n**2 - 5 * n + 1

intersect_monotonic_sequences(
    map(centered_4, itertools.count(1)),
    map(centered_6, itertools.count(1)),
    map(centered_10, itertools.count(1)),
)

The program keeps a list of all of the sequences and their latest result. At each iteration, it chooses the smallest result so far, and moves that sequence ahead one step. If all of the current results are equal, we’ve found a number that occurs in all of the sequences. This code was the first version of the program. The final program was more elaborate, with progress reports and restartability.

This program confirmed that 1 and 61 are the only numbers less than 1022 in all three sequences.

To make sure the program was working, I used it to confirm that these numbers are both centered square and centered hexagonal: 1, 61, 5941, 582121, 57041881, 5589522181, 547716131821, 53670591396241, 5259170240699761.

Another fun part of this exploration was drawing the figures. I wrote a PostScript program (figurate.ps), and rendered it with my Stilted, my janky PostScript knock-off from last summer.

Comments

[gravatar]

You could replace intersect_monotonic_sequences with heapq.merge and itertools.groupby

[gravatar]

Great article! Found the co prime natural of 1 and 61 in the set from 1 to 10^22 interesting. I would take it three steps further.

  1. Importance to spintronics. Very similar to a few quantum mediums at room temp.
  2. Crypto. How could this be used for lattice encryption, cyclic patterns, etc.
  3. Pattern composition. This one is similar to minecraft unit patterns of work. This has some applicability in quantum channels as well.

Those three extensions can be separate articles, but mention of something like that wouldve been useful.

Have a great day!

[gravatar]

61 is can also be centered in a 20-sided polygon - making it icosagonal … also a 60-sided polygon, but that one is kinda lame.

The formula here is that the integer x can be centered in a p-sided polygon if
x-1 = \frac{p}{2}(k)(k+1)
for some positive integer k. Now 61 becomes a 4, 6, 10, 20, and 60-sided number because
60 = 2(5)(6)
60 = 3(4)(5)
60 = 5(3)(4)
60 = 10(2)(3)
60 = 30(1)(2)

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.