Square on a Three String

222 A.D. was the year in which the Emperor Heliogabalus was assassinated by his own soldiers. Exactly 1666 years later, the Anglo-Dutch classicist Sir Lawrence Alma-Tadema exhibited his painting The Roses of Heliogabalus (1888). I suggested in “Roses Are Golden” that Alma-Tadema must have chosen the year as deliberately as he chose the dimensions of his canvas, which, at 52″ x 84 1/8“, is an excellent approximation to the golden ratio.

But did Alma-Tadema know that lines at 0º and 222º divide a circle in the golden ratio? He could easily have done, just as he could easily have known that 222 precedes the 48th prime, 223. But it is highly unlikely that he knew that 223 yields a magic square whose columns, rows and diagonals all sum to 222. To create the square, simply list the 222 multiples of the reciprocal 1/223 in base 3, or ternary. The digits of the reciprocal repeat after exactly 222 digits and its multiples begin and end like this:

001/223 = 0.00001002102101021212111012022211122022... in base 3
002/223 = 0.00002011211202120201222101122200021121...
003/223 = 0.00010021021010212121110120222111220221...
004/223 = 0.00011100200112011110221210022100120020...
005/223 = 0.00012110002220110100102222122012012120...

[...]

218/223 = 0.22210112220002112122120000100210210102... in base 3
219/223 = 0.22211122022110211112001012200122102202...
220/223 = 0.22212201201212010101112102000111002001...
221/223 = 0.22220211011020102021000121100022201101...
222/223 = 0.22221220120121201010111210200011100200...

Each column, row and diagonal of ternary digits sums to 222. Here is the full n/223 square represented with 0s in grey, 1s in white and 2s in red:

(Click for larger)


It isn’t difficult to see that the white squares are mirror-symmetrical on a horizontal axis. Here is the symmetrical pattern rotated by 90º:

(Click for larger)


But why should the 1s be symmetrical? This isn’t something special to 1/223, because it happens with prime reciprocals like 1/7 too:

1/7 = 0.010212... in base 3
2/7 = 0.021201...
3/7 = 0.102120...
4/7 = 0.120102...
5/7 = 0.201021...
6/7 = 0.212010...

And you can notice something else: 0s mirror 2s and 2s mirror 0s. A related pattern appears in base 10:

1/7 = 0.142857...
2/7 = 0.285714...
3/7 = 0.428571...
4/7 = 0.571428...
5/7 = 0.714285...
6/7 = 0.857142...

The digit 1 in the decimal digits of n/7 corresponds to the digit 8 in the decimal digits of (7-n)/7; 4 corresponds to 5; 2 corresponds to 7; 8 corresponds to 1; 5 corresponds to 4; and 7 corresponds to 2. In short, if you’re given the digits d1 of n/7, you know the digits d2 of (n-7)/7 by the rule d2 = 9-d1.

Why does that happen? Examine these sums:

 1/7 = 0.142857142857142857142857142857142857142857...
+6/7 = 0.857142857142857142857142857142857142857142...
 7/7 = 0.999999999999999999999999999999999999999999... = 1.0

 2/7 = 0.285714285714285714285714285714285714285714...
+5/7 = 0.714285714285714285714285714285714285714285...
 7/7 = 0.999999999999999999999999999999999999999999... = 1.0

 3/7 = 0.428571428571428571428571428571428571428571...
+4/7 = 0.571428571428571428571428571428571428571428...
 7/7 = 0.999999999999999999999999999999999999999999... = 1.0

And here are the same sums in ternary (where the first seven integers are 1, 2, 10, 11, 12, 20, 21):

  1/21 = 0.010212010212010212010212010212010212010212...
+20/21 = 0.212010212010212010212010212010212010212010...
 21/21 = 0.222222222222222222222222222222222222222222... = 1.0

  2/21 = 0.021201021201021201021201021201021201021201...
+12/21 = 0.201021201021201021201021201021201021201021...
 21/21 = 0.222222222222222222222222222222222222222222... = 1.0

 10/21 = 0.102120102120102120102120102120102120102120...
+11/21 = 0.120102120102120102120102120102120102120102...
 21/21 = 0.222222222222222222222222222222222222222222... = 1.0

Accordingly, in base b with the prime p, the digits d1 of n/p correspond to the digits (p-n)/p by the rule d2 = (b-1)-d1. This explains why the 1s mirror themselves in ternary: 1 = 2-1 = (3-1)-1. In base 5, the 2s mirror themselves by the rule 2 = 4-2 = (5-1) – 2. In all odd bases, some digit will mirror itself; in all even bases, no digit will. The mirror-digit will be equal to (b-1)/2, which is always an integer when b is odd, but never an integer when b is even.

Here are some more examples of the symmetrical patterns found in odd bases:

Patterns of 1s in 1/19 in base 3


Patterns of 6s in 1/19 in base 13


Patterns of 7s in 1/19 in base 15


Elsewhere other-posted:

Roses Are Golden — more on The Roses of Heliogabalus (1888)
Three Is The Key — more on the 1/223 square

Advertisements

Get Your Ox Off

Boustrophedon (pronounced “bough-stra-FEE-dun” or “boo-stra-FEE-dun”) is an ancient Greek word literally meaning “as the ox turns (in ploughing)”, that is, moving left-right, right-left, and so on. The word is used of writing that runs down the page in the same way. To see what that means, examine two versions of the first paragraph of Clark Ashton Smith’s story “The Demon of the Flower” (1933). The first is written in the usual way, the second is written boustrophedon:

Not as the plants and flowers of Earth, growing peacefully beneath a simple sun, were the blossoms of the planet Lophai. Coiling and uncoiling in double dawns; tossing tumultuously under vast suns of jade green and balas-ruby orange; swaying and weltering in rich twilights, in aurora-curtained nights, they resembled fields of rooted servants that dance eternally to an other-worldly music.


Not as the plants and flowers of Earth, growing peacefully
.iahpoL tenalp eht fo smossolb eht erew ,nus elpmis a htaeneb
Coiling and uncoiling in double dawns; tossing tumultuously
;egnaro ybur-salab dna neerg edaj fo snus tsav rednu
swaying and weltering in rich twilights, in aurora-curtained
ecnad taht stnavres detoor fo sdleif delbmeser yeht ,sthgin
eternally to an other-worldly music.


Boustrophedon writing was once common and sometimes the left-right lines would also be mirror-reversed, like this:
CAS_text1


You could also use the term “boustrophedon” to describe the way this table of numbers is filled:

primes_table


The table begins with “1” in the top left-hand corner, then moves right for “2”, then down for “3”, then right-and-up for “4”, “5” and “6”, then right for “7”, then left-and-down for “8”, “9” and “10”, and so on. You could also say that the numbers snake through the table. I’ve marked the primes among them, because I was interested in the patterns made by the primes when the numbers were represented as blocks on a grid, like this:

primes_large


Primes are in solid white (compare the Ulam spiral). Here’s the boustrophedon prime-grid on a finer scale:

primes

(click for full image)


And what about other number-tests? Here are the even numbers marked on the grid (i.e. n mod 2 = 0):

mod2

n mod 2 = 0


And here are some more examples of a modulus test:

mod3

n mod 3 = 0


mod5

n mod 5 = 0


mod9

n mod 9 = 0


mod15

n mod 15 = 0


mod_various

n mod various = 0 (animated gif)


Next I looked at reciprocals (numbers divided into 1) marked on the grid, with the digits of a reciprocal marking the number of blank squares before a square is filled in (if the digit is “0”, the square is filled immediately). For example, in base ten 1/7 = 0.142857142857142857…, where the block “142857” repeats for ever. When represented on the grid, 1/7 has 1 blank square, then a filled square, then 4 blank squares, then a filled square, then 2 blank squares, then a filled square, and so on:

recip7_base10

1/7 in base 10


And here are some more reciprocals (click for full images):

recip9_base2

1/9 in base 2


recip13_base10

1/13 in base 10


recip27_base10

1/27 in base 10


recip41_base10

1/41 in base 10


recip63_base10

1/63 in base 10


recip82_base10

1/82 in base 10


recip101_base10

1/101 in base 10


recip104_base10

1/104 in base 10


recip124_base10

1/124 in base 10


recip143_base10

1/143 in base 10


recip175_base10

1/175 in base 10


recip604_base8

1/604 in base 8


recip_various

1/n in various bases (animated gif)


Talcum Power

If primes are like diamonds, powers of 2 are like talc. Primes don’t crumble under division, because they can’t be divided by any number but themselves and one. Powers of 2 crumble more than any other numbers. The contrast is particularly strong when the primes are Mersenne primes, or equal to a power of 2 minus 1:

3 = 4-1 = 2^2 – 1.
4, 2, 1.

7 = 8-1 = 2^3 – 1.
8, 4, 2, 1.

31 = 32-1 = 2^5 – 1.
32, 16, 8, 4, 2, 1.

127 = 2^7 – 1.
128, 64, 32, 16, 8, 4, 2, 1.

8191 = 2^13 – 1.
8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1.

131071 = 2^17 – 1.
131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1.

524287 = 2^19 – 1.
524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1.

2147483647 = 2^31 – 1.
2147483648, 1073741824, 536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1.

Are Mersenne primes infinite? If they are, then there will be just as many Mersenne primes as powers of 2, even though very few powers of 2 create a Mersenne prime. That’s one of the paradoxes of infinity: an infinite part is equal to an infinite whole.

But are they infinite? No-one knows, though some of the greatest mathematicians in history have tried to find a proof or disproof of the conjecture. A simpler question about powers of 2 is this: Does every integer appear as part of a power of 2? I can’t find one that doesn’t:

0 is in 1024 = 2^10.
1 is in 16 = 2^4.
2 is in 32 = 2^5.
3 is in 32 = 2^5.
4 = 2^2.
5 is in 256 = 2^8.
6 is in 16 = 2^4.
7 is in 32768 = 2^15.
8 = 2^3.
9 is in 4096 = 2^12.
10 is in 1024 = 2^10.
11 is in 1099511627776 = 2^40.
12 is in 128 = 2^7.
13 is in 131072 = 2^17.
14 is in 262144 = 2^18.
15 is in 2097152 = 2^21.
16 = 2^4.
17 is in 134217728 = 2^27.
18 is in 1073741824 = 2^30.
19 is in 8192 = 2^13.
20 is in 2048 = 2^11.

666 is in 182687704666362864775460604089535377456991567872 = 2^157.
1066 is in 43556142965880123323311949751266331066368 = 2^135.
1492 is in 356811923176489970264571492362373784095686656 = 2^148.
2014 is in 3705346855594118253554271520278013051304639509300498049262642688253220148477952 = 2^261.

I’ve tested much higher than that, but testing is no good: where’s a proof? I don’t have one, though I conjecture that all integers do appear as part or whole of a power of 2. Nor do I have a proof for another conjecture: that all integers appear infinitely often as part or whole of powers of 2. Or indeed, of powers of 3, 4, 5 or any other number except powers of 10.

I conjecture that this would apply in all bases too: In any base b all n appear infinitely often as part or whole of powers of any number except those equal to a power of b.

1 is in 11 = 2^2 in base 3.
2 is in 22 = 2^3 in base 3.
10 is in 1012 = 2^5 in base 3.
11 = 2^2 in base 3.
12 is in 121 = 2^4 in base 3.
20 is in 11202 = 2^7 in base 3.
21 is in 121 = 2^4 in base 3.
22 = 2^3 in base 3.
100 is in 100111 = 2^8 in base 3.
101 is in 1012 = 2^5 in base 3.
102 is in 2210212 = 2^11 in base 3.
110 is in 1101221 = 2^10 in base 3.
111 is in 100111 = 2^8 in base 3.
112 is in 11202 = 2^7 in base 3.
120 is in 11202 = 2^7 in base 3.
121 = 2^4 in base 3.
122 is in 1101221 = 2^10 in base 3.
200 is in 200222 = 2^9 in base 3.
201 is in 12121201 = 2^12 in base 3.
202 is in 11202 = 2^7 in base 3.

1 is in 13 = 2^3 in base 5.
2 is in 112 = 2^5 in base 5.
3 is in 13 = 2^3 in base 5.
4 = 2^2 in base 5.
10 is in 1003 = 2^7 in base 5.
11 is in 112 = 2^5 in base 5.
12 is in 112 = 2^5 in base 5.
13 = 2^3 in base 5.
14 is in 31143 = 2^11 in base 5.
20 is in 2011 = 2^8 in base 5.
21 is in 4044121 = 2^16 in base 5.
22 is in 224 = 2^6 in base 5.
23 is in 112341 = 2^12 in base 5.
24 is in 224 = 2^6 in base 5.
30 is in 13044 = 2^10 in base 5.
31 = 2^4 in base 5.
32 is in 230232 = 2^13 in base 5.
33 is in 2022033 = 2^15 in base 5.
34 is in 112341 = 2^12 in base 5.
40 is in 4022 = 2^9 in base 5.

1 is in 12 = 2^3 in base 6.
2 is in 12 = 2^3 in base 6.
3 is in 332 = 2^7 in base 6.
4 = 2^2 in base 6.
5 is in 52 = 2^5 in base 6.
10 is in 1104 = 2^8 in base 6.
11 is in 1104 = 2^8 in base 6.
12 = 2^3 in base 6.
13 is in 13252 = 2^11 in base 6.
14 is in 144 = 2^6 in base 6.
15 is in 101532 = 2^13 in base 6.
20 is in 203504 = 2^14 in base 6.
21 is in 2212 = 2^9 in base 6.
22 is in 2212 = 2^9 in base 6.
23 is in 1223224 = 2^16 in base 6.
24 = 2^4 in base 6.
25 is in 13252 = 2^11 in base 6.
30 is in 30544 = 2^12 in base 6.
31 is in 15123132 = 2^19 in base 6.
32 is in 332 = 2^7 in base 6.

1 is in 11 = 2^3 in base 7.
2 is in 22 = 2^4 in base 7.
3 is in 1331 = 2^9 in base 7.
4 = 2^2 in base 7.
5 is in 514 = 2^8 in base 7.
6 is in 2662 = 2^10 in base 7.
10 is in 1054064 = 2^17 in base 7.
11 = 2^3 in base 7.
12 is in 121 = 2^6 in base 7.
13 is in 1331 = 2^9 in base 7.
14 is in 514 = 2^8 in base 7.
15 is in 35415440431 = 2^30 in base 7.
16 is in 164351 = 2^15 in base 7.
20 is in 362032 = 2^16 in base 7.
21 is in 121 = 2^6 in base 7.
22 = 2^4 in base 7.
23 is in 4312352 = 2^19 in base 7.
24 is in 242 = 2^7 in base 7.
25 is in 11625034 = 2^20 in base 7.
26 is in 2662 = 2^10 in base 7.

1 is in 17 = 2^4 in base 9.
2 is in 152 = 2^7 in base 9.
3 is in 35 = 2^5 in base 9.
4 = 2^2 in base 9.
5 is in 35 = 2^5 in base 9.
6 is in 628 = 2^9 in base 9.
7 is in 17 = 2^4 in base 9.
8 = 2^3 in base 9.
10 is in 108807 = 2^16 in base 9.
11 is in 34511011 = 2^24 in base 9.
12 is in 12212 = 2^13 in base 9.
13 is in 1357 = 2^10 in base 9.
14 is in 314 = 2^8 in base 9.
15 is in 152 = 2^7 in base 9.
16 is in 878162 = 2^19 in base 9.
17 = 2^4 in base 9.
18 is in 218715 = 2^17 in base 9.
20 is in 70122022 = 2^25 in base 9.
21 is in 12212 = 2^13 in base 9.
22 is in 12212 = 2^13 in base 9.

Prime Climb Time

The third prime is equal to the sum of the first and second primes: 2 + 3 = 5. After that, for obvious reasons, the prime-sum climbs much more rapidly than the primes themselves:

2, 3, 05, 07, 11, 13, 17, 19, 023, 029...
2, 5, 10, 17, 28, 41, 58, 77, 100, 129...

But what if you use digit-sum(p1..pn), i.e., the sum of the digits of the primes from the first to the nth? For example, the digit-sum(p1..p5) = 2 + 3 + 5 + 7 + 1+1 = 19, whereas the sum(p1..p5) = 2 + 3 + 5 + 7 + 11 = 28. Using the digit-sums of the primes, the comparison now looks like this:

2, 3, 05, 07, 11, 13, 17, 19, 23, 29...
2, 5, 10, 17, 19, 23, 31, 41, 46, 57...

The sum climbs more slowly, but still too fast. So what about a different base? In base-2, the digit-sum(p1..p3) = (1+0) + (1+1) + (1+0+1) = 1 + 2 + 2 = 5. The comparison looks like this:

2, 3, 05, 07, 11, 13, 17, 19, 23, 29...
1, 3, 05, 08, 11, 14, 16, 19, 23, 27...

For primes 3, 5, 11, 19, and 23, p = digit-sum(primes <= p) in base-2. But the cumulative digit-sum soon begins to climb too slowly:

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271...

1, 3, 5, 8, 11, 14, 16, 19, 23, 27, 32, 35, 38, 42, 47, 51, 56, 61, 64, 68, 71, 76, 80, 84, 87, 091, 096, 101, 106, 110, 117, 120, 123, 127, 131, 136, 141, 145, 150, 155, 160, 165, 172, 175, 179, 184, 189, 196, 201, 206, 211, 218, 223, 230, 232, 236, 240, 245...

So what about base-3?

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59...
2, 3, 6, 9, 12, 15, 20, 23, 28, 31, 34, 37, 42, 47, 52, 59, 64...

In base-3, for p = 2, 3 and 37, p = digit-sum(primes <= p), while for p = 23, 31, 47 and 59, p = digit-sum(primes < p), like this:

2 = 2.
3 = 2 + (1+0).
37 = 2 + (1+0) + (1+2) + (2+1) + (1+0+2) + (1+1+1) + (1+2+2) + (2+0+1) + (2+1+2) + (1+0+0+2) + (1+0+1+1) + (1+1+0+1) = 2 + 1 + 3 + 3 + 3 + 3 + 5 + 3 + 5 + 3 + 3 + 3.

23 = 2 + (1+0) + (1+2) + (2+1) + (1+0+2) + (1+1+1) + (1+2+2) + (2+0+1) = 2 + 1 + 3 + 3 + 3 + 3 + 5 + 3.
31 = 2 + (1+0) + (1+2) + (2+1) + (1+0+2) + (1+1+1) + (1+2+2) + (2+0+1) + (2+1+2) + (1+0+0+2) = 2 + 1 + 3 + 3 + 3 + 3 + 5 + 3 + 5 + 3.
47 = 2 + (1+0) + (1+2) + (2+1) + (1+0+2) + (1+1+1) + (1+2+2) + (2+0+1) + (2+1+2) + (1+0+0+2) + (1+0+1+1) + (1+1+0+1) + (1+1+1+2) + (1+1+2+1) = 2 + 1 + 3 + 3 + 3 + 3 + 5 + 3 + 5 + 3 + 3 + 3 + 5 + 5.
59 = 2 + (1+0) + (1+2) + (2+1) + (1+0+2) + (1+1+1) + (1+2+2) + (2+0+1) + (2+1+2) + (1+0+0+2) + (1+0+1+1) + (1+1+0+1) + (1+1+1+2) + (1+1+2+1) + (1+2+0+2) + (1+2+2+2) = 2 + 1 + 3 + 3 + 3 + 3 + 5 + 3 + 5 + 3 + 3 + 3 + 5 + 5 + 5 + 7.

This carries on for a long time. For these primes, p = digit-sum(primes < p):

23, 31, 47, 59, 695689, 698471, 883517, 992609, 992737, 993037, 1314239, 1324361, 1324571, 1326511, 1327289, 1766291, 3174029

And for these primes, p = digit-sum(primes <= p):

3, 37, 695663, 695881, 1308731, 1308757, 1313153, 1314301, 1326097, 1766227, 3204779, 14328191

Now try the cumulative digit-sum in base-4:

2, 3, 5, 07, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59...
2, 5, 7, 11, 16, 20, 22, 26, 31, 36, 43, 47, 52, 59, 67, 72, 80... 

The sum of digits climbs too fast. Base-3 is the Goldilocks base, climbing neither too slowly, like base-2, nor too fast, like all bases greater than 3.

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

Lat’s That

In a magic square of numbers, all rows, columns and diagonals have the same sum, or magic total. Here is an example:

1*5*9
8*3*4
6*7*2

(mt=15)

Here’s another:

06*07*11*10
15*02*14*03
04*13*01*16
09*12*08*05

(mt=34)

And another:

04*25*20*10*06
01*13*11*21*19
23*09*07*08*18
15*16*03*14*17
22*02*24*12*05

(mt=65)

And another:

35*15*10*18*11*22
05*25*33*12*07*29
34*30*04*14*21*08
02*16*27*17*23*26
03*24*09*19*36*20
32*01*28*31*13*06

(mt=111)

In all those magic squares, the magic total is fixed: the sum of all numbers from 1 to 36 is 666, so any individual line in a 6×6 magic square has to equal 666 / 6 or 111. In other kinds of magic figure, this rule doesn’t apply:

2*7*3
4***8
6*5*1

(mt=12)

6*3*4
2***8
5*7*1

(mt=13)

8*5*1
2***6
4*3*7

(mt=14)

8*1*6
4***2
3*5*7

(mt=15)

Continue reading Lat’s That

Priamonds and Pearls

Interesting patterns emerge when primes are represented as white blocks in a series of n-width left-right lines laid vertically, one atop the other. When the line is five blocks wide, the patterns look like this (the first green block is 1, followed by primes 2, 3 and 5, then 7 in the next line):
5line

(Click for larger version)

Right at the bottom of the first column is an isolated prime diamond, or priamond (marked with a green block). It consists of the four primes 307-311-313-317, where the three latter primes equal 307 + 4 and 6 and 10, or 307 + 5-1, 5+1 and 5×2 (the last prime in the first column is 331 and the first prime in the second is 337). About a third of the way down the first column is a double priamond, consisting of 97, 101, 103, 107, 109 and 113. For a given n, then, a priamond is a set of primes, p1, p2, p3 and p4, such that p2 = p1 + n-1, p3 = p + n+1 and p4 = p1 + 2n.

There are also fragments of pearl-necklace in the columns. One is above the isolated priamond. It consists of four prime-blocks slanting from left to right: 251-257-263-269, or 251 + 6, 12 and 18. A prearl-necklace, then, is a set of primes, p1, p2, p3…, such that p2 = p1 + n+i, p3 = p + 2(n+i)…, where i = +/-1. Now here are the 7-line and 9-line:

7line

Above: 7-line for primes

9line

Above: 9-line for primes

In the 9-line, you can see a prime-ladder marked with a red block. It consists of the primes 43-53-61-71-79-89-97-107, in alternate increments of 10 and 8, or 9+1 and 9-1. A prime-ladder, then, is a set of primes, p1, p2, p3, p4…, such that p2 = p1 + n+1, p3 = p + 2n, p3 = p + 3n+1…

And here is an animated gif of lines 5 through 51:

lines5to51

(Click or open in new window for larger version or if file fails to animate)

Prime Time

1/29[b=2] = 0·0000100011010011110111001011… (l=28)
1/29[b=3] = 0·0002210102011122200121202111… (l=28)
1/29[b=5] = 0·00412334403211… (l=14)
1/29[b=7] = 0·0145536… (l=7)
1/29[b=11] = 0·04199534608387[10]69115764[10]2723… (l=28)
1/29[b=13] = 0·05[10]9[11]28[12]7231[10]4… (l=14)
1/29[b=17] = 0·09[16]7… (l=4)
1/29[b=19] = 0·0[12]89[15][13][14]7[16]73[17][13]1[18]6[10]9354[11]2[11][15]15[17]… (l=28)
1/29[b=23] = 0·0[18]5[12][15][19][19]… (l=7)
1/29[b=29] = 0·1 (l=1)
1/29[b=31] = 0·1248[17]36[12][25][20]9[19]7[14][29][28][26][22][13][27][24][18]5[10][21][11][23][16]… (l=28)
1/29[b=37] = 0·1[10]7[24]8[34][16][21][25][19]53[30][22][35][26][29][12][28]2[20][15][11][17][31][33]6[14]… (l=28)
1/29[b=41] = 0·1[16][39][24]… (l=4)
1/29[b=43] = 0·1[20][32][26][29][28]7[17][34]4[19][11][37]2[41][22][10][16][13][14][35][25]8[38][23][31]5[40]… (l=28)
1/29[b=47] = 0·1[29]84[40][24][14][27][25][43][35][30][37][12][45][17][38][42]6[22][32][19][21]3[11][16]9[34]… (l=28)
1/29[b=53] = 0·1[43][45][36][29][12][42]… (l=7)
1/29[b=59] = 0·2… (l=1)
1/29[b=61] = 0·26[18][56][48][23]8[25][14][44][10][31][33][39][58][54][42]4[12][37][52][35][46][16][50][29][27][21]… (l=28)
1/29[b=67] = 0·2[20][53]9[16][11][36][64][46][13][57][50][55][30]… (l=14)
1/29[b=71] = 0·2[31][58][53][61][14][48][68][39][12][17]9[56][22]… (l=14)
1/29[b=73] = 0·2[37][55][27][50][25][12][42][57][65][32][52][62][67][70][35][17][45][22][47][60][30][15]7[40][20][10]5… (l=28)
1/29[b=79] = 0·2[57][16][27][19]5[35][32][54][38][10][70][65][29][76][21][62][51][59][73][43][46][24][40][68]8[13][49]… (l=28)
1/29[b=83] = 0·2[71][45][65][68][57][20]… (l=7)
1/29[b=89] = 0·36[12][24][49]9[18][36][73][58][27][55][21][42][85][82][76][64][39][79][70][52][15][30][61][33][67][46]… (l=28)
1/29[b=97] = 0·3[33][43][46][80][26][73][56][83][60][20]6[66][86][93][63][53][50][16][70][23][40][13][36][76][90][30][10]… (l=28)

More Narcissisum

The number 23 is special, inter alia, because it’s prime, divisible by only itself and 1. It’s also special because its reciprocal has maximum period. That is, the digits of 1/23 come in repeated blocks of 22, like this:

1/23 = 0·0434782608695652173913  0434782608695652173913  0434782608695652173913…

But 1/23 fails to be special in another way: you can’t sum its digits and get 23:

0 + 4 + 3 + 4 + 7 = 18
0 + 4 + 3 + 4 + 7 + 8 = 26
0 + 4 + 3 + 4 + 7 + 8 + 2 + 6 + 0 + 8 + 6 + 9 + 5 + 6 + 5 + 2 + 1 + 7 + 3 + 9 + 1 + 3 = 99

1/7 is different:

1/7 = 0·142857… → 1 + 4 + 2 = 7

This means that 7 is narcissistic: it reflects itself by manipulation of the digits of 1/7. But that’s in base ten. If you try base eight, 23 becomes narcissistic too (note that 23 = 2 x 8 + 7, so 23 in base eight is 27):

1/27 = 0·02620544131… → 0 + 2 + 6 + 2 + 0 + 5 + 4 + 4 = 27 (base=8)

Here are more narcissistic reciprocals in base ten:

1/3 = 0·3… → 3 = 3
1/7 = 0·142857… → 1 + 4 + 2 = 7
1/8 = 0·125 → 1 + 2 + 5 = 8
1/13 = 0·076923… → 0 + 7 + 6 = 13
1/14 = 0·0714285… → 0 + 7 + 1 + 4 + 2 = 14
1/34 = 0·02941176470588235… → 0 + 2 + 9 + 4 + 1 + 1 + 7 + 6 + 4 = 34
1/43 = 0·023255813953488372093… → 0 + 2 + 3 + 2 + 5 + 5 + 8 + 1 + 3 + 9 + 5 = 43
1/49 = 0·020408163265306122448979591836734693877551… → 0 + 2 + 0 + 4 + 0 + 8 + 1 + 6 + 3 + 2 + 6 + 5 + 3 + 0 + 6 + 1 + 2 = 49
1/51 = 0·0196078431372549… → 0 + 1 + 9 + 6 + 0 + 7 + 8 + 4 + 3 + 1 + 3 + 7 + 2 = 51
1/76 = 0·01315789473684210526… → 0 + 1 + 3 + 1 + 5 + 7 + 8 + 9 + 4 + 7 + 3 + 6 + 8 + 4 + 2 + 1 + 0 + 5 + 2 = 76
1/83 = 0·01204819277108433734939759036144578313253… → 0 + 1 + 2 + 0 + 4 + 8 + 1 + 9 + 2 + 7 + 7 + 1 + 0 + 8 + 4 + 3 + 3 + 7 + 3 + 4 + 9 = 83
1/92 = 0·010869565217391304347826… → 0 + 1 + 0 + 8 + 6 + 9 + 5 + 6 + 5 + 2 + 1 + 7 + 3 + 9 + 1 + 3 + 0 + 4 + 3 + 4 + 7 + 8 = 92
1/94 = 0·01063829787234042553191489361702127659574468085… → 0 + 1 + 0 + 6 + 3 + 8 + 2 + 9 + 7 + 8 + 7 + 2 + 3 + 4 + 0 + 4 + 2 + 5 + 5 + 3 + 1 + 9 + 1 + 4 = 94
1/98 = 0·0102040816326530612244897959183673469387755… → 0 + 1 + 0 + 2 + 0 + 4 + 0 + 8 + 1 + 6 + 3 + 2 + 6 + 5 + 3 + 0 + 6 + 1 + 2 + 2 + 4 + 4 + 8 + 9 + 7 + 9 + 5 = 98


Previously pre-posted (please peruse):

Digital Disfunction
The Hill to Power
Narcissarithmetic #1
Narcissarithmetic #2

Digital Disfunction

It’s fun when functions disfunc. The function digit-sum(n^p) takes a number, raises it to the power of p and sums its digits. If p = 1, n is unchanged. So digit-sum(1^1) = 1, digit-sum(11^1) = 2, digit-sum(2013^1) = 6. The following numbers set records for the digit-sum(n^1) from 1 to 1,000,000:

digit-sum(n^1): 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 199, 299, 399, 499, 599, 699, 799, 899, 999, 1999, 2999, 3999, 4999, 5999, 6999, 7999, 8999, 9999, 19999, 29999, 39999, 49999, 59999, 69999, 79999, 89999, 99999, 199999, 299999, 399999, 499999, 599999, 699999, 799999, 899999, 999999.

The pattern is easy to predict. But the function disfuncs when p = 2. Digit-sum(3^2) = 9, which is more than digit-sum(4^2) = 1 + 6 = 7 and digit-sum(5^2) = 2 + 5 = 7. These are the records from 1 to 1,000,000:

digit-sum(n^2): 1, 2, 3, 7, 13, 17, 43, 63, 83, 167, 264, 313, 707, 836, 1667, 2236, 3114, 4472, 6833, 8167, 8937, 16667, 21886, 29614, 32617, 37387, 39417, 42391, 44417, 60663, 63228, 89437, 141063, 221333, 659386, 791833, 976063, 987917.

Higher powers are similarly disfunctional:

digit-sum(n^3): 1, 2, 3, 4, 9, 13, 19, 53, 66, 76, 92, 132, 157, 353, 423, 559, 842, 927, 1192, 1966, 4289, 5826, 8782, 10092, 10192, 10275, 10285, 10593, 11548, 11595, 12383, 15599, 22893, 31679, 31862, 32129, 63927, 306842, 308113.

digit-sum(n^4): 1, 2, 3, 4, 6, 8, 13, 16, 18, 23, 26, 47, 66, 74, 118, 256, 268, 292, 308, 518, 659, 1434, 1558, 1768, 2104, 2868, 5396, 5722, 5759, 6381, 10106, 12406, 14482, 18792, 32536, 32776, 37781, 37842, 47042, 51376, 52536, 84632, 255948, 341156, 362358, 540518, 582477.

digit-sum(n^5): 1, 2, 3, 5, 6, 14, 15, 18, 37, 58, 78, 93, 118, 131, 139, 156, 179, 345, 368, 549, 756, 1355, 1379, 2139, 2759, 2779, 3965, 4119, 4189, 4476, 4956, 7348, 7989, 8769, 9746, 10566, 19199, 19799, 24748, 31696, 33208, 51856, 207198, 235846, 252699, 266989, 549248, 602555, 809097, 814308, 897778.

You can also look for narcissistic numbers with this function, like digit-sum(9^2) = 8 + 1 = 9 and digit-sum(8^3) = 5 + 1 + 2 = 8. 9^2 is the only narcissistic square in base ten, but 8^3 has these companions:

17^3 = 4913 → 4 + 9 + 1 + 3 = 17
18^3 = 5832 → 5 + 8 + 3 + 2 = 18
26^3 = 17576 → 1 + 7 + 5 + 7 + 6 = 26
27^3 = 19683 → 1 + 9 + 6 + 8 + 3 = 27

Twelfth powers are as unproductive as squares:

108^12 = 2518170116818978404827136 → 2 + 5 + 1 + 8 + 1 + 7 + 0 + 1 + 1 + 6 + 8 + 1 + 8 + 9 + 7 + 8 + 4 + 0 + 4 + 8 + 2 + 7 + 1 + 3 + 6 = 108

But thirteenth powers are fertile:

20 = digit-sum(20^13)
40 = digit-sum(40^13)
86 = digit-sum(86^13)
103 = digit-sum(103^13)
104 = digit-sum(104^13)
106 = digit-sum(106^13)
107 = digit-sum(107^13)
126 = digit-sum(126^13)
134 = digit-sum(134^13)
135 = digit-sum(135^13)
146 = digit-sum(146^13)

There are also numbers that are narcissistic with different powers, like 90:

90^19 = 1·350851717672992089 x 10^37 → 1 + 3 + 5 + 0 + 8 + 5 + 1 + 7 + 1 + 7 + 6 + 7 + 2 + 9 + 9 + 2 + 0 + 8 + 9 = 90
90^20 = 1·2157665459056928801 x 10^39 → 1 + 2 + 1 + 5 + 7 + 6 + 6 + 5 + 4 + 5 + 9 + 0 + 5 + 6 + 9 + 2 + 8 + 8 + 0 + 1 = 90
90^21 = 1·09418989131512359209 x 10^41 → 1 + 0 + 9 + 4 + 1 + 8 + 9 + 8 + 9 + 1 + 3 + 1 + 5 + 1 + 2 + 3 + 5 + 9 + 2 + 0 + 9 = 90
90^22 = 9·84770902183611232881 x 10^42 → 9 + 8 + 4 + 7 + 7 + 0 + 9 + 0 + 2 + 1 + 8 + 3 + 6 + 1 + 1 + 2 + 3 + 2 + 8 + 8 + 1 = 90
90^28 = 5·23347633027360537213511521 x 10^54 → 5 + 2 + 3 + 3 + 4 + 7 + 6 + 3 + 3 + 0 + 2 + 7 + 3 + 6 + 0 + 5 + 3 + 7 + 2 + 1 + 3 + 5 + 1 + 1 + 5 + 2 + 1 = 90

One of the world’s most famous numbers is also multi-narcissistic:

666 = digit-sum(666^47)
666 = digit-sum(666^51)

1423 isn’t multi-narcissistic, but I like the way it’s a prime that’s equal to the sum of the digits of its power to 101, which is also a prime:

1423^101 = 2,
976,424,759,070,864,888,448,625,568,610,774,713,351,233,339,
006,775,775,271,720,934,730,013,444,193,709,672,452,482,197,
898,160,621,507,330,824,007,863,598,230,100,270,989,373,401,
979,514,790,363,102,835,678,646,537,123,754,219,728,748,171,
764,802,617,086,504,534,229,621,770,717,299,909,463,416,760,
781,260,028,964,295,036,668,773,707,186,491,056,375,768,526,
306,341,717,666,810,190,220,650,285,746,057,099,312,179,689,
423 →

2 + 9 + 7 + 6 + 4 + 2 + 4 + 7 + 5 + 9 + 0 + 7 + 0 + 8 + 6 + 4 + 8 + 8 + 8 + 4 + 4 + 8 + 6 + 2 + 5 + 5 + 6 + 8 + 6 + 1 + 0 + 7 + 7 + 4 + 7 + 1 + 3 + 3 + 5 + 1 + 2 + 3 + 3 + 3 + 3 + 9 + 0 + 0 + 6 + 7 + 7 + 5 + 7 + 7 + 5 + 2 + 7 + 1 + 7 + 2 + 0 + 9 + 3 + 4 + 7 + 3 + 0 + 0 + 1 + 3 + 4 + 4 + 4 + 1 + 9 + 3 + 7 + 0 + 9 + 6 + 7 + 2 + 4 + 5 + 2 + 4 + 8 + 2 + 1 + 9 + 7 + 8 + 9 + 8 + 1 + 6 + 0 + 6 + 2 + 1 + 5 + 0 + 7 + 3 + 3 + 0 + 8 + 2 + 4 + 0 + 0 + 7 + 8 + 6 + 3 + 5 + 9 + 8 + 2 + 3 + 0 + 1 + 0 + 0 + 2 + 7 + 0 + 9 + 8 + 9 + 3 + 7 + 3 + 4 + 0 + 1 + 9 + 7 + 9 + 5 + 1 + 4 + 7 + 9 + 0 + 3 + 6 + 3 + 1 + 0 + 2 + 8 + 3 + 5 + 6 + 7 + 8 + 6 + 4 + 6 + 5 + 3 + 7 + 1 + 2 + 3 + 7 + 5 + 4 + 2 + 1 + 9 + 7 + 2 + 8 + 7 + 4 + 8 + 1 + 7 + 1 + 7 + 6 + 4 + 8 + 0 + 2 + 6 + 1 + 7 + 0 + 8 + 6 + 5 + 0 + 4 + 5 + 3 + 4 + 2 + 2 + 9 + 6 + 2 + 1 + 7 + 7 + 0 + 7 + 1 + 7 + 2 + 9 + 9 + 9 + 0 + 9 + 4 + 6 + 3 + 4 + 1 + 6 + 7 + 6 + 0 + 7 + 8 + 1 + 2 + 6 + 0 + 0 + 2 + 8 + 9 + 6 + 4 + 2 + 9 + 5 + 0 + 3 + 6 + 6 + 6 + 8 + 7 + 7 + 3 + 7 + 0 + 7 + 1 + 8 + 6 + 4 + 9 + 1 + 0 + 5 + 6 + 3 + 7 + 5 + 7 + 6 + 8 + 5 + 2 + 6 + 3 + 0 + 6 + 3 + 4 + 1 + 7 + 1 + 7 + 6 + 6 + 6 + 8 + 1 + 0 + 1 + 9 + 0 + 2 + 2 + 0 + 6 + 5 + 0 + 2 + 8 + 5 + 7 + 4 + 6 + 0 + 5 + 7 + 0 + 9 + 9 + 3 + 1 + 2 + 1 + 7 + 9 + 6 + 8 + 9 + 4 + 2 + 3 = 1423


Previously pre-posted (please peruse):

The Hill to Power
Narcissarithmetic #1
Narcissarithmetic #2