Reciprocal Recipes

Here’s a sequence. What’s the next number?

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...

Here’s another sequence. What’s the next number?

0, 1, 1, 2, 3, 5, 8, 13, 21, 34...

Those aren’t trick questions, so the answers are 1 and 55, respectively. The second sequence is the famous Fibonacci sequence, where each number after [0,1] is the sum of the previous two numbers.

Now try dividing each of those sequences by powers of 2 and summing the results, like this:

1/2 + 1/4 + 1/8 + 1/16 + 1/32 + 1/64 + 1/128 + 1/256 + 1/512 + 1/1024 + 1/2048 + 1/4096 + 1/8192 + 1/16384 + 1/32768 + 1/65536 + 1/131072 + 1/262144 + 1/524288 + 1/1048576 +... = ?

0/2 + 1/4 + 1/8 + 2/16 + 3/32 + 5/64 + 8/128 + 13/256 + 21/512 + 34/1024 + 55/2048 + 89/4096 + 144/8192 + 233/16384 + 377/32768 + 610/65536 + 987/131072 + 1597/262144 + 2584/524288 + 4181/1048576 +... = ?

What are the sums? I was surprised to learn that they’re identical:

1/2 + 1/4 + 1/8 + 1/16 + 1/32 + 1/64 + 1/128 + 1/256 + 1/512 + 1/1024 + 1/2048 + 1/4096 + 1/8192 + 1/16384 + 1/32768 + 1/65536 + 1/131072 + 1/262144 + 1/524288 + 1/1048576 +... = 1

0/2 + 1/4 + 1/8 + 2/16 + 3/32 + 5/64 + 8/128 + 13/256 + 21/512 + 34/1024 + 55/2048 + 89/4096 + 144/8192 + 233/16384 + 377/32768 + 610/65536 + 987/131072 + 1597/262144 + 2584/524288 + 4181/1048576 +... = 1

I discovered this when I was playing with an old scientific calculator and calculated these sums:

5^2 + 2^2 = 29
5^2 + 4^2 = 41
5^2 + 6^2 = 61
5^2 + 8^2 = 89

The sums are all prime numbers. Then I idly calculated the reciprocal of 1/89:

1/89 = 0·011235955056179775...

The digits 011235… are the start of the Fibonacci sequence. It seems to go awry after that, but I remembered what David Wells had said in his wonderful Penguin Dictionary of Curious and Interesting Numbers (1986): “89 is the 11th Fibonacci number, and the period of its reciprocal is generated by the Fibonacci sequence: 1/89 = 0·11235…” He means that the Fibonacci sequence generates the digits of 1/89 like this, when you sum the columns and move carries left as necessary:

0
1
↓↓1
↓↓↓2
↓↓↓↓3
↓↓↓↓↓5
↓↓↓↓↓↓8
↓↓↓↓↓↓13
↓↓↓↓↓↓↓21
↓↓↓↓↓↓↓↓34
↓↓↓↓↓↓↓↓↓55
↓↓↓↓↓↓↓↓↓↓89...
↓↓↓↓↓↓↓↓↓↓
0112359550...

I tried this method of summing the Fibonacci sequence in other bases. Although it was old, the scientific calculator was crudely programmable. And it helpfully converted the sum into a final fraction once there were enough decimal digits:

0/3 + 1/32 + 1/33 + 2/34 + 3/35 + 5/36 + 8/37 + 13/38 + 21/39 + 34/310 + 55/311 + 89/312 + 144/313 + 233/314 + 377/315 + 610/316 + 987/317 + 1597/318 + 2584/319 + 4181/320 +... = 1/5 = 0·012101210121012101210 in b3


0/4 + 1/42 + 1/43 + 2/44 + 3/45 + 5/46 + 8/47 + 13/48 + 21/49 + 34/410 + 55/411 + 89/412 + 144/413 + 233/414 + 377/415 + 610/416 + 987/417 + 1597/418 + 2584/419 + 4181/420 +... = 1/11 = 0·011310113101131011310 in b4


0/5 + 1/52 + 1/53 + 2/54 + 3/55 + 5/56 + 8/57 + 13/58 + 21/59 + 34/510 + 55/511 + 89/512 + 144/513 + 233/514 + 377/515 + 610/516 + 987/517 + 1597/518 + 2584/519 + 4181/520 +... = 1/19 = 0·011242141011242141011 in b5


0/6 + 1/62 + 1/63 + 2/64 + 3/65 + 5/66 + 8/67 + 13/68 + 21/69 + 34/610 + 55/611 + 89/612 + 144/613 + 233/614 + 377/615 + 610/616 + 987/617 + 1597/618 + 2584/619 + 4181/620 +... = 1/29 = 0·011240454431510112404 in b6


0/7 + 1/72 + 1/73 + 2/74 + 3/75 + 5/76 + 8/77 + 13/78 + 21/79 + 34/710 + 55/711 + 89/712 + 144/713 + 233/714 + 377/715 + 610/716 + 987/717 + 1597/718 + 2584/719 + 4181/720 +... = 1/41 = 0·011236326213520225056 in b7

It was interesting to see that all the reciprocals so far were of primes. I carried on:

0/8 + 1/82 + 1/83 + 2/84 + 3/85 + 5/86 + 8/87 + 13/88 + 21/89 + 34/810 + 55/811 + 89/812 + 144/813 + 233/814 + 377/815 + 610/816 + 987/817 + 1597/818 + 2584/819 + 4181/820 +... = 1/55 = 0·011236202247440451710 in b8

Not a prime reciprocal, but a reciprocal of a Fibonacci number. Here are some more sums:

0/9 + 1/92 + 1/93 + 2/94 + 3/95 + 5/96 + 8/97 + 13/98 + 21/99 + 34/910 + 55/911 + 89/912 + 144/913 + 233/914 + 377/915 + 610/916 + 987/917 + 1597/918 + 2584/919 + 4181/920 +... = 1/71 (another prime) = 0·011236067540450563033 in b9


0/10 + 1/102 + 1/103 + 2/104 + 3/105 + 5/106 + 8/107 + 13/108 + 21/109 + 34/1010 + 55/1011 + 89/1012 + 144/1013 + 233/1014 + 377/1015 + 610/1016 + 987/1017 + 1597/1018 + 2584/1019 + 4181/1020 +... = 1/89 (and another) = 0·011235955056179775280 in b10


0/11 + 1/112 + 1/113 + 2/114 + 3/115 + 5/116 + 8/117 + 13/118 + 21/119 + 34/1110 + 55/1111 + 89/1112 + 144/1113 + 233/1114 + 377/1115 + 610/1116 + 987/1117 + 1597/1118 + 2584/1119 + 4181/1120 +... = 1/109 (and another) = 0·011235942695392022470 in b11


0/12 + 1/122 + 1/123 + 2/124 + 3/125 + 5/126 + 8/127 + 13/128 + 21/129 + 34/1210 + 55/1211 + 89/1212 + 144/1213 + 233/1214 + 377/1215 + 610/1216 + 987/1217 + 1597/1218 + 2584/1219 + 4181/1220 +... = 1/131 (and another) = 0·011235930336A53909A87 in b12


0/13 + 1/132 + 1/133 + 2/134 + 3/135 + 5/136 + 8/137 + 13/138 + 21/139 + 34/1310 + 55/1311 + 89/1312 + 144/1313 + 233/1314 + 377/1315 + 610/1316 + 987/1317 + 1597/1318 + 2584/1319 + 4181/1320 +... = 1/155 (not a prime or a Fibonacci number) = 0·01123591ACAA861794044 in b13

The reciprocals go like this:

1/1, 1/5, 1/11, 1/19, 1/29, 1/41, 1/55, 1/71, 1/89, 1/109, 1/131, 1/155...

And it should be easy to see the rule that generates them:

5 = 1 + 4
11 = 5 + 6
19 = 11 + 8
29 = 19 + 10
41 = 29 + 12
55 = 41 + 14
71 = 55 + 16
89 = 17 + 18
109 = 89 + 20
131 = 109 + 22
155 = 131 + 24
[...]

But I don’t understand why the rule applies, let alone why the Fibonacci sequence generates these reciprocals in the first place.

Triangular Squares

The numbers that are both square and triangular are beautifully related to the best approximations to √2:

Number

Square Root

Factors of root

1 1 1
36 6 2 * 3
1225 35 5 * 7
41616 204 12 * 17

and so on.

In each case the factors of the root are the numerator and denominator of the next approximation to √2. — David Wells, The Penguin Dictionary of Curious and Interesting Mathematics (1986), entry for “36”.


Elsewhere other-accessible

A001110 — Square triangular numbers: numbers that are both triangular and square

Period Panes

In The Penguin Dictionary of Curious and Interesting Numbers (1987), David Wells remarks that 142857 is “a number beloved of all recreational mathematicians”. He then explains that it’s “the decimal period of 1/7: 1/7 = 0·142857142857142…” and “the first decimal reciprocal to have maximum period, that is, the length of its period is only one less than the number itself.”

Why does this happen? Because when you’re calculating 1/n, the remainders can only be less than n. In the case of 1/7, you get remainders for all integers less than 7, i.e. there are 6 distinct remainders and 6 = 7-1:

(1*10) / 7 = 1 remainder 3, therefore 1/7 = 0·1...
(3*10) / 7 = 4 remainder 2, therefore 1/7 = 0·14...
(2*10) / 7 = 2 remainder 6, therefore 1/7 = 0·142...
(6*10) / 7 = 8 remainder 4, therefore 1/7 = 0·1428...
(4*10) / 7 = 5 remainder 5, therefore 1/7 = 0·14285...
(5*10) / 7 = 7 remainder 1, therefore 1/7 = 0·142857...
(1*10) / 7 = 1 remainder 3, therefore 1/7 = 0·1428571...
(3*10) / 7 = 4 remainder 2, therefore 1/7 = 0·14285714...
(2*10) / 7 = 2 remainder 6, therefore 1/7 = 0·142857142...

Mathematicians know that reciprocals with maximum period can only be prime reciprocals and with a little effort you can work out whether a prime will yield a maximum period in a particular base. For example, 1/7 has maximum period in bases 3, 5, 10, 12 and 17:

1/21 = 0·010212010212010212... in base 3
1/12 = 0·032412032412032412... in base 5
1/7 =  0·142857142857142857... in base 10
1/7 =  0·186A35186A35186A35... in base 12
1/7 =  0·274E9C274E9C274E9C... in base 17

To see where else 1/7 has maximum period, have a look at this graph:

Period pane for primes 3..251 and bases 2..39


I call it a “period pane”, because it’s a kind of window into the behavior of prime reciprocals. But what is it, exactly? It’s a graph where the x-axis represents primes from 3 upward and the y-axis represents bases from 2 upward. The red squares along the bottom aren’t part of the graph proper, but indicate primes that first occur after a power of two: 5 after 4=2^2; 11 after 8=2^3; 17 after 16=2^4; 37 after 32=2^5; 67 after 64=2^6; and so on.

If a prime reciprocal has maximum period in a particular base, the graph has a solid colored square. Accordingly, the purple square at the bottom left represents 1/7 in base 10. And as though to signal the approval of the goddess of mathematics, the graph contains a lower-case b-for-base, which I’ve marked in green. Here are more period panes in higher resolution (open the images in a new window to see them more clearly):

Period pane for primes 3..587 and bases 2..77


Period pane for primes 3..1303 and bases 2..152


An interesting pattern has begun to appear: note the empty lanes, free of reciprocals with maximum period, that stretch horizontally across the period panes. These lanes are empty because there are no prime reciprocals with maximum period in square bases, that is, bases like 4, 9, 25 and 36, where 4 = 2*2, 9 = 3*3, 25 = 5*5 and 36 = 6*6. I don’t know why square bases don’t have max-period prime reciprocals, but it’s probably obvious to anyone with more mathematical nous than me.

Period pane for primes 3..2939 and bases 2..302


Period pane for primes 3..6553 and bases 2..602


Like the Ulam spiral, other and more mysterious patterns appear in the period panes, hinting at the hidden regularities in the primes.

WhirlpUlam

Stanislaw Ulam (pronounced OO-lam) was an American mathematician who was doodling one day in 1963 and created what is now called the Ulam spiral. It’s a spiral of integers on a square grid with the prime squares filled in and the composite squares left empty. At the beginning it looks like this (the blue square is the integer 1, with 2 to the east, 3 to the north-east, 4 to the north, 5 to the north-west, 6 to the west, and so on):

Ulam spiral


And here’s an Ulam spiral with more integers:

Ulam spiral at higher resolution


The primes aren’t scattered at random over the spiral: they often fall into lines that are related to what are called polynomial functions, such as n2 + n + 1. To understand polynomial functions better, let’s look at how the Ulam spiral is made. Here is a text version with the primes underlined:


Here’s an animated version:


Here’s the true spiral again with 1 marked as a blue square:

Ulam spiral centred on 1


What happens when you try other numbers at the centre? Here’s 2 at the centre as a purple square, because it’s prime:

Ulam spiral centred on 2


And 3 at the centre, also purple because it’s also prime:

Ulam spiral centred on 3


And 4 at the centre, blue again because 4 = 2^2:

Ulam spiral centred on 4


And 5 at the centre, prime and purple:

Ulam spiral centred on 5


Each time the central number changes, the spiral shifts fractionally. Here’s an animation of the central number shifting from 1 to 41. If you watch, you’ll see patterns remaining stable, then breaking up as the numbers shift towards the center and disappear (the central number is purple if prime, blue if composite):

Ulam whirlpool, or WhirlpUlam


I think the animation looks like a whirlpool or whirlpUlam (prounced whirlpool-am), as numbers spiral towards the centre and disappear. You can see the whirlpUlam more clearly here:

An animated Ulam Spiral pausing at n=11, 17, 41


WhirlpUlam again


Note that something interesting happens when the central number is 41. The spiral is bisected by a long line of prime squares, like this:

Ulam spiral centred on 41


The line is actually a visual representation of something David Wells wrote about in The Penguin Dictionary of Curious and Interesting Numbers (1986):

Euler discovered the excellent and famous formula x2 + x + 41, which gives prime values for x = 0 to 39.

Here are the primes generated by the formula:

41, 43, 47, 53, 61, 71, 83, 97, 113, 131, 151, 173, 197, 223, 251, 281, 313, 347, 383, 421, 461, 503, 547, 593, 641, 691, 743, 797, 853, 911, 971, 1033, 1097, 1163, 1231, 1301, 1373, 1447, 1523, 1601

You’ll see other lines appear and disappear as the whirlpUlam whirls:

Ulam spiral centred on 17


Primes in line: 17, 19, 23, 29, 37, 47, 59, 73, 89, 107, 127, 149, 173, 199, 227, 257 (n=0..15)


Ulam spiral centred on 59


Primes in line: 59, 67, 83, 107, 139, 179, 227, 283, 347, 419, 499, 587, 683, 787 (n=0..13)


Ulam spiral centred on 163


Primes in line: 163, 167, 179, 199, 227, 263, 307, 359, 419, 487, 563, 647, 739, 839, 947, 1063, 1187, 1319, 1459, 1607 (n=0..19)


Ulam spiral centred on 233


Primes in line: 233, 241, 257, 281, 313, 353, 401, 457, 521, 593, 673, 761, 857 ((n=0..12)


Ulam spiral centred on 653


Primes in line: 653, 661, 677, 701, 733, 773, 821, 877, 941, 1013, 1093, 1181, 1277, 1381, 1493, 1613, 1741, 1877 (n=0..17)


Ulam spiral centred on 409,333


Primes in line: 409,333, 409337, 409349, 409369, 409397, 409433, 409477, 409529, 409589, 409657, 409733, 409817, 409909, 410009, 410117, 410233 (n=0..15)


Some bisect the centre, some don’t, because you could say that the Ulam spiral has six diagonals, two that bisect the centre (top-left-to-bottom-right and bottom-left-to-top-right) and four that don’t. You could also call them spokes:


If you look at the integers in the spokes, you can see that they’re generated by polynomial functions in which c stands for the central number:

North-west spoke: 1, 5, 17, 37, 65, 101, 145, 197, 257, 325, 401, 485, 577, 677, 785, 901, 1025, 1157, 1297, 1445, 1601, 1765, 1937, 2117, 2305, 2501, 2705, 2917... = c + (2n)^2


South-east spoke: 1, 9, 25, 49, 81, 121, 169, 225, 289, 361, 441, 529, 625, 729, 841, 961, 1089, 1225, 1369, 1521, 1681, 1849, 2025, 2209, 2401, 2601, 2809, 3025, 3249, 3481, 3721, 3969, 4225, 4489, 4761, 5041, 5329, 5625... = c+(2n+1)^2-1


NW-SE diagonal: 1, 5, 9, 17, 25, 37, 49, 65, 81, 101, 121, 145, 169, 197, 225, 257, 289, 325, 361, 401, 441, 485, 529, 577, 625, 677, 729, 785, 841, 901, 961, 1025, 1089, 1157, 1225, 1297, 1369, 1445, 1521, 1601, 1681 = c + n^2 + 1 - (n mod 2)


North-east spoke: 1, 3, 13, 31, 57, 91, 133, 183, 241, 307, 381, 463, 553, 651, 757, 871, 993, 1123, 1261, 1407, 1561, 1723, 1893, 2071... = c + (n+1)^2 - n - 1


South-west spoke: 1, 7, 21, 43, 73, 111, 157, 211, 273, 343, 421, 507, 601, 703, 813, 931, 1057, 1191, 1333, 1483, 1641, 1807, 1981, 2163... = c + (2n)^2 + 2n


SW-NE diagonal: 1, 3, 7, 13, 21, 31, 43, 57, 73, 91, 111, 133, 157, 183, 211, 241, 273, 307, 343, 381, 421, 463, 507, 553, 601, 651, 703, 757, 813, 871, 931, 993, 1057, 1123, 1191, 1261, 1333, 1407, 1483, 1561, 1641... = c + n^2 + n



Elsewhere other-engageable:

All posts interrogating issues around the Ulam spiral

Prime Time #2

“2n2 + 29 is prime for all values of n for 1 to 28.” — The Penguin Dictionary of Curious and Interesting Numbers, David Wells (1986).

• 31, 37, 47, 61, 79, 101, 127, 157, 191, 229, 271, 317, 367, 421, 479, 541, 607, 677, 751, 829, 911, 997, 1087, 1181, 1279, 1381, 1487, 1597.


Elsewhere other-posted:

Prime Time #1
Poulet’s Propellor — Musings on Math and Mathculinity
La Spirale è Mobile

Performativizing Papyrocentricity #14

Papyrocentric Performativity Presents:

Scheming DemonThe Screwtape Letters, C.S. Lewis (1942)

Ai Wei to HellHow to Read Contemporary Art, Michael Wilson (Thames & Hudson, 2013)

Toxic TwosomeDoll, Peter Sotos and James Havoc (TransVisceral Books, 2013)

Know Your LimaçonsThe Penguin Dictionary of Curious and Interesting Geometry, David Wells (1991) (posted @ Overlord of the Über-Feral)

Pestilent, Pustulent and Pox-Pocked – various books by Dr Miriam B. Stimbers (@ O.o.t.Ü.-F.)


Or Read a Review at Random: RaRaR

Know Your Limaçons

Front cover of The Penguin Dictionary of Curious and Interesting Geometry by David WellsThe Penguin Dictionary of Curious and Interesting Geometry, David Wells (1991)

Mathematics is an ocean in which a child can paddle and an elephant can swim. Or a whale, indeed. This book, a sequel to Wells’ excellent Penguin Dictionary of Curious and Interesting Mathematics, is suitable for both paddlers and plungers. Plumbers, even, because you can dive into some very deep mathematics here.

Far too deep for me, I have to admit, but I can wade a little way into the shallows and enjoy looking further out at what I don’t understand, because the advantage of geometry over number theory is that it can appeal to the eye even when it baffles the brain. If this book is more expensive than its prequel, that’s because it needs to be. It’s a paperback, but a large one, to accommodate the illustrations.

Fortunately, plenty of them appeal to the eye without baffling the brain, like the absurdly simple yet mindstretching Koch snowflake. Take a triangle and divide each side into thirds. Erect another triangle on each middle third. Take each new line of the shape and do the same: divide into thirds, erect another triangle on the middle third. Then repeat. And repeat. For ever.

A Koch snowflake (from Wikipedia)

A Koch snowflake (from Wikipedia)

The result is a shape with a finite area enclosed by an infinite perimeter, and it is in fact a very early example of a fractal. Early in this case means it was invented in 1907, but many of the other beautiful shapes and theorems in this book stretch back much further: through Étienne Pascal and his oddly organic limaçon (which looks like a kidney) to the ancient Greeks and beyond. Some, on the other hand, are very modern, and this book was out-of-date on the day it was printed. Despite the thousands of years devoted by mathematicians to shapes and the relationship between them, new discoveries are being made all the time. Knots have probably been tied by human beings for as long as human beings have existed, but we’ve only now started to classify them properly and even find new uses for them in biology and physics.

Which is not to say knots are not included here, because they are. But even the older geometry Wells looks at would be enough to keep amateur and recreational mathematicians happy for years, proving, re-creating, and generalizing as they work their way through variations on all manner of trigonomic, topological, and tessellatory themes.


Previously pre-posted (please peruse):

Poulet’s Propeller — discussion of Wells’ Penguin Dictionary of Curious and Interesting Numbers (1986)

Poulet’s Propeller

The Penguin Dictionary of Curious and Interesting Numbers (1986) is one of my favourite books. It’s a fascinating mixture of math, mathecdote and math-joke:

2·618 0333…

The square of φ, the golden ratio, and the only positive number such that √n = n-1. (pg. 45)


6

Kepler discussed the 6-fold symmetry of snowflakes, and attempted to explain it by considering the close packing of spheres in a hexagonal array. (pg. 69)


39

This appears to be the first uninteresting number, which of course makes it an especially interesting number, because it is the smallest number to have the property of being uninteresting.

It is therefore also the first number to be simultaneously interesting and uninteresting. (pg. 120)

David Wells, who wrote the Dictionary, “had the rare distinction of being a Cambridge scholar in mathematics and failing his degree”. He must be the mathematical equivalent of the astronomer Patrick Moore: a popularizer responsible for opening many minds and inspiring many careers. He’s also written books on geometry and mathematical puzzles. But not everyone appreciates his efforts. This is a sideswipe in a review of William Hartston’s The Book of Numbers:

Thankfully, this book is more concerned with facts than mathematics. Anyone wanting to learn more about [π] or the Fibonacci sequence should turn to the Penguin Dictionary of Curious and Interesting Numbers, a volume which none but propeller-heads will find either curious or interesting. (Review in The Independent, 18th December 1997)


Continue reading: Poulet’s Propeller

He Say, He Sigh, He Sow #14

39: This appears to be the first uninteresting number, which of course makes it an especially interesting number, because it is the smallest number to have the property of being uninteresting. It is therefore also the first number to be simultaneously interesting and uninteresting.” — David Wells, The Penguin Dictionary of Curious and Interesting Numbers (1986), entry for “39”, pg. 120

Three Is The Key

If The Roses of Heliogabalus (1888) is any guide, Sir Lawrence Alma-Tadema (1836-1912) thought that 222 is a special number. But his painting doesn’t exhaust its secrets. To get to another curiosity of 222, start with 142857. As David Wells puts it in his Penguin Dictionary of Curious and Interesting Numbers (1986), 142857 is a “number beloved of all recreational mathematicians”. He then describes some of its properties, including this:

142857 x 1 = 142857
142857 x 2 = 285714
142857 x 3 = 428571
142857 x 4 = 571428
142857 x 5 = 714285
142857 x 6 = 857142

The multiples are cyclic permutations: the order of the six numbers doesn’t change, only their starting point. Because each row contains the same numbers, it sums to the same total: 1 + 4 + 2 + 8 + 5 + 7 = 27. And because each row begins with a different number, each column contains the same six numbers and also sums to 27, like this:

1 4 2 8 5 7
+ + + + + +
2 8 5 7 1 4
+ + + + + +
4 2 8 5 7 1
+ + + + + +
5 7 1 4 2 8
+ + + + + +
7 1 4 2 8 5
+ + + + + +
8 5 7 1 4 2

= = = = = =

2 2 2 2 2 2
7 7 7 7 7 7

If the diagonals of the square also summed to the same total, the multiples of 142857 would create a full magic square. But the diagonals don’t have the same total: the left-right diagonal sums to 31 and the right-left to 23 (note that 31 + 23 = 54 = 27 x 2).

But where does 142857 come from? It’s actually the first six digits of the reciprocal of 7, i.e. 1/7 = 0·142857… Those six numbers repeat for ever, because 1/7 is a prime reciprocal with maximum period: when you calculate 1/7, all integers below 7 are represented in the remainders. The square of multiples above is simply another way of representing this:

1/7 = 0·142857…
2/7 = 0·285714…
3/7 = 0·428571…
4/7 = 0·571428…
5/7 = 0·714285…
6/7 = 0·857142…
7/7 = 0·999999…

The prime reciprocals 1/17 and 1/19 also have maximum period, so the squares created by their multiples have the same property: each row and each column sums to the same total, 72 and 81, respectively. But the 1/19 square has an additional property: both diagonals sum to 81, so it is fully magic:

01/19 = 0·0 5 2 6 3 1 5 7 8 9 4 7 3 6 8 4 2 1
02/19 = 0·1 0 5 2 6 3 1 5 7 8 9 4 7 3 6 8 4 2…
03/19 = 0·1 5 7 8 9 4 7 3 6 8 4 2 1 0 5 2 6 3…
04/19 = 0·2 1 0 5 2 6 3 1 5 7 8 9 4 7 3 6 8 4…
05/19 = 0·2 6 3 1 5 7 8 9 4 7 3 6 8 4 2 1 0 5…
06/19 = 0·3 1 5 7 8 9 4 7 3 6 8 4 2 1 0 5 2 6…
07/19 = 0·3 6 8 4 2 1 0 5 2 6 3 1 5 7 8 9 4 7…
08/19 = 0·4 2 1 0 5 2 6 3 1 5 7 8 9 4 7 3 6 8…
09/19 = 0·4 7 3 6 8 4 2 1 0 5 2 6 3 1 5 7 8 9…
10/19 = 0·5 2 6 3 1 5 7 8 9 4 7 3 6 8 4 2 1 0…
11/19 = 0·5 7 8 9 4 7 3 6 8 4 2 1 0 5 2 6 3 1…
12/19 = 0·6 3 1 5 7 8 9 4 7 3 6 8 4 2 1 0 5 2…
13/19 = 0·6 8 4 2 1 0 5 2 6 3 1 5 7 8 9 4 7 3…
14/19 = 0·7 3 6 8 4 2 1 0 5 2 6 3 1 5 7 8 9 4…
15/19 = 0·7 8 9 4 7 3 6 8 4 2 1 0 5 2 6 3 1 5…
16/19 = 0·8 4 2 1 0 5 2 6 3 1 5 7 8 9 4 7 3 6…
17/19 = 0·8 9 4 7 3 6 8 4 2 1 0 5 2 6 3 1 5 7…
18/19 = 0·9 4 7 3 6 8 4 2 1 0 5 2 6 3 1 5 7 8

First line = 0 + 5 + 2 + 6 + 3 + 1 + 5 + 7 + 8 + 9 + 4 + 7 + 3 + 6 + 8 + 4 + 2 + 1 = 81

Left-right diagonal = 0 + 0 + 7 + 5 + 5 + 9 + 0 + 3 + 0 + 4 + 2 + 8 + 7 + 5 + 6 + 7 + 5 + 8 = 81

Right-left diagonal = 9 + 9 + 2 + 4 + 4 + 0 + 9 + 6 + 9 + 5 + 7 + 1 + 2 + 4 + 3 + 2 + 4 + 1 = 81

In base 10, this doesn’t happen again until the 1/383 square, whose magic total is 1719 (= 383-1 x 10-1 / 2). But recreational maths isn’t restricted to base 10 and lots more magic squares are created by lots more primes in lots more bases. The prime 223 in base 3 is one of them. Here the first line is

1/223 = 1/220213 = 0·

0000100210210102121211101202221112202
2110211112001012200122102202002122220
2110110201020210001211000222011010010
2222122012012120101011121020001110020
0112011110221210022100120020220100002
0112112021202012221011222000211212212…

The digits sum to 222, so 222 is the magic total for all rows and columns of the 1/223 square. It is also the total for both diagonals, so the square is fully magic. I doubt that Alma-Tadema knew this, because he lived before computers made calculations like that fast and easy. But he was probably a Freemason and, if so, would have been pleased to learn that 222 had a link with squares.