Fascinating. Surprising. Inspiring. Baffling. Frustrating. Disappointing. Those are the things recreational maths has been to me down the decades. But sinister? Disturbing? Frightening?
No, rec-math had never been that to me. Not until a few days ago, when I was looking at the patterns created by the function digmul(n), which multiplies the digits of an integer. For example, if you ignore zeros, digmul(237) = 2*3*7 = digsum(7203) = digsum(611170) = 42. Here’s an un-sinister graph for digmul(n) of the integers 1 to 1353 (in each line, the digmul(n) is adjusted to fit into the same height, ht_mx, by finding the biggest digmul(n), mul_mx, on that line, then using ht = ht_mx * digmul(n)/mul_mx):
Graph of digmul(n) for n = 1..1353 (click for larger)
That’s not sinister, although the patterns are vaguely reminiscent of shark-fins. But then I looked at digmul(n) for the multiples of 2,3,4,5… Here are the graphs for multiples of 3, 5 and 8:
digmul(3n) for n = 3..4056
digmul(5n) for n = 5..6760
digmul(8n) for n = 8..10816
Again, nothing sinister. Then I pressed a key and the graph for digmul(9n), the digmul of the multiples of 9, appeared on the screen:
digmul(9n) for n = 9..12168
Gravestones! That’s what the patterns now reminded me of. Gravestones rising from or sinking into the soft earth of an ancient graveyard. And I must admit I felt unease and even fear for a second or two. Even now I don’t like the patterns when I think of them as gravestones, even though the curves are attractive. It hasn’t helped that I came across a piece of sinister recmath for the first time shortly before Halloween.

Old Mortlake Burial Ground, Richmond-upon-Thames, London (Wikipedia)
But what’s going on to produce those mathematical stelomorphs? (As you could call shapes that look like gravestones, using Greek στήλη, stēlē, a funerary monument.) Well, I don’t understand things enough, but it’s not a coincidence that 9 = 10-1 and the graph of digmul(9n) was for base 10. This are graphs for digmul((base-1)n) in bases 8, 20 and 29:
digmul(7n) in base 8 for n = 7..9464
digmul(19n) in base 20 for n = 19..25688
digmul(28n) in base 29 for n = 28..37856
The gravestones get wider as the base gets higher (the maximum width in base b is b-1). Let’s return to base 10 and have a look at the gravestone marked with a red dot in a detail from the graph for digmul(9n):
digmul(9n) in base 10
The marked gravestone represents these multiples of 9 (with the 9n for the much lower patches of earth directly to its left and right):
0128 = digmul(8820)
1152 = digmul(8829)
1536 = digmul(8838)
1792 = digmul(8847)
1920 = digmul(8856)
1920 = digmul(8865)
1792 = digmul(8874)
1536 = digmul(8883)
1152 = digmul(8892)
0072 = digmul(8901)
As you can see, there’s symmetry in the digmul(9n), because in base 10 some runs of consecutive 9n contain numbers whose digits are permutations of higher or lower 9n in that run. For example, digmul(8829) = digmul(8892) = 1152 because 8829 and 8892 have the same digits slightly rearranged. Similar runs must occur in other bases, b, for digmul((b-1)n).








