Outgoing Israeli foreign minister Avigdor Lieberman dismissed the report. “This report is not true. Obviously Israel has security interests to defend and we have our own intelligence. But we do not spy on the United States. There are enough participants in these negotiations, including Iranians,” he said in Israel. “We got our intelligence from other sources, not from the United States. The instruction has been clear for decades now: you don’t spy on the United States, directly or indirectly.” — Israel spied on US over Iran nuclear talks, The Guardian, 24/iii/2015.
Monthly Archives: March 2015
Magistra Rules the Waves
One of my favourite integer sequences has the simple formula n(i) = n(i-1) + digitsum(n(i-1)). If it’s seeded with 1, its first few terms go like this:
n(1) = 1
n(2) = n(1) + digitsum(n(1)) = 1 + digitsum(1) = 2
n(3) = 2 + digitsum(2) = 4
n(4) = 4 + digitsum(4) = 8
n(5) = 8 + digitsum(8) = 16
n(6) = 16 + digitsum(16) = 16 + 1+6 = 16 + 7 = 23
n(7) = 23 + digitsum(23) = 23 + 2+3 = 23 + 5 = 28
n(8) = 28 + digitsum(28) = 28 + 2+8 = 28 + 10 = 38
As a sequence, it looks like this:
1, 2, 4, 8, 16, 23, 28, 38, 49, 62, 70, 77, 91, 101, 103, 107, 115, 122, 127, 137, 148, 161, 169, 185, 199, 218, 229, 242, 250, 257, 271, 281, 292, 305, 313, 320, 325, 335, 346, 359, 376, 392, 406, 416, 427, 440, 448, 464, 478, 497, 517, 530, 538, 554, 568, 587, 607, 620, 628, 644, 658, 677, 697, 719, 736, 752, 766, 785, 805, 818, 835, 851, 865, 884, 904, 917, 934, 950, 964, 983, 1003…
Given a number at random, is there a quick way to say whether it appears in the sequence seeded with 1? Not that I know, with one exception. If the number is divisible by 3, it doesn’t appear, at least in base 10. In base 2, that rule doesn’t apply:
n(1) = 1
n(2) = 1 + digitsum(1) = 10 = 1 + 1 = 2
n(3) = 10 + digitsum(10) = 10 + 1 = 11 = 2 + 1 = 3
n(4) = 11 + digitsum(11) = 11 + 1+1 = 101 = 3 + 2 = 5
n(5) = 101 + digitsum(101) = 101 + 1+0+1 = 111 = 5 + 2 = 7
n(6) = 111 + digitsum(111) = 111 + 11 = 1010 = 7 + 3 = 10
n(7) = 1010 + digitsum(1010) = 1010 + 10 = 1100 = 10 + 2 = 12
n(8) = 1100 + digitsum(1100) = 1100 + 10 = 1110 = 12 + 2 = 14
1, 2, 3, 5, 7, 10, 12, 14, 17, 19, 22, 25, 28, 31, 36, 38, 41, 44, 47, 52, 55, 60, 64, 65, 67, 70, 73, 76, 79, 84, 87, 92, 96, 98, 101, 105, 109, 114, 118, 123, 129, 131, 134, 137, 140, 143, 148, 151, 156, 160, 162, 165, 169, 173, 178, 182, 187, 193, 196, 199, 204, 208, 211, 216, 220, 225, 229, 234, 239, 246, 252, 258, 260, 262, 265, 268, 271, 276, 279, 284, 288, 290, 293, 297, 301, 306, 310, 315, 321, 324, 327, 332, 336, 339, 344, 348, 353, 357, 362, 367, 374…
What patterns are there in these sequences? It’s easier to check when they’re represented graphically, so I converted them into patterns à la the Ulam spiral, where n is represented as a dot on a spiral of integers. This is the spiral for base 10:
And these are the spirals for bases 2 and 3:
Base 2
Base 3
These sequences look fairly random to me: there are no obvious patterns in the jumps from n(i) to n(i+1), i.e. in the values for digitsum(n(i)). Now try the spirals for bases 9 and 33:
Base 9
Base 33
Patterns have appeared: there is some regularity in the jumps. You can see these regularities more clearly if you represent digitsum(n(i)) as a graph, with n(i) on the x axis and digitsum(n(i)) on the y axis. If the graph starts with n(i) = 1 on the lower left and proceeds left-right, left-right up the screen, it looks like this in base 10:
Base 10 (click to enlarge)
Here are bases 2 and 3:
Base 2
Base 3
The jumps seem fairly random. Now try bases 9, 13, 16, 17, 25, 33 and 49:
Base 9
Base 13
Base 16
Base 17
Base 25
Base 33
Base 49
In some bases, the formula n(i) = n(i-1) + digitsum(n(i-1)) generates mild randomness. In others, it generates strong regularity, like waves rolling ashore under a steady wind. I don’t understand why, but regularity seems to occur in bases that are one more than a power of 2 and also in some bases that are primes or squares.
Elsewhere other-posted:
Magistra Mysteriorum*

Rogier van der Weyden, Portrait of a Lady (1460)
*Mistress of Mysteries.
Performativizing Papyrocentricity #36
Papyrocentric Performativity Presents:
• Tormenting the Tongue – Georgian Dictionary and Phrasebook, Nicholas Awde and Thea Khitarishvili (Hippocrene Books 2011)
• Roc and Rawl – Rise of the Super Furry Animals, Ric Rawlins (The Friday Project 2015)
Or Read a Review at Random: RaRaR
Dig Sum Fib
The Fibonacci sequence is an infinitely rich sequence based on a very simple rule: add the previous two numbers. If the first two numbers are 1 and 1, the sequence begins like this:
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025…
Plainly, the numbers increase for ever. The hundredth Fibonacci number is 354,224,848,179,261,915,075, for example, and the two-hundredth is 280,571,172,992,510,140,037,611,932,413,038,677,189,525. But there are variants on the Fibonacci sequence that don’t increase for ever. The standard rule is n(i) = n(i-2) + n(i-1). What if the rule becomes n(i) = digitsum(n(i-2)) + digitsum(n(i-1))? Now the sequence falls into a loop, like this:
1, 1, 2, 3, 5, 8, 13, 12, 7, 10, 8, 9, 17, 17, 16, 15, 13, 10, 5, 6, 11, 8, 10, 9, 10, 10, 2, 3… (length=28)
But that’s in base 10. Here are the previous bases:
1, 1, 2, 2, 2… (base=2) (length=5)
1, 1, 2, 3, 3, 2, 3… (b=3) (l=7)
1, 1, 2, 3, 5, 5, 4, 3, 4, 4, 2, 3… (b=4) (l=12)
1, 1, 2, 3, 5, 4, 5, 5, 2, 3… (b=5) (l=10)
1, 1, 2, 3, 5, 8, 8, 6, 4, 5, 9, 9, 8, 7, 5, 7, 7, 4, 6, 5, 6, 6, 2, 3… (b=6) (l=24)
1, 1, 2, 3, 5, 8, 7, 3, 4, 7, 5, 6, 11, 11, 10, 9, 7, 4, 5, 9, 8, 5, 7, 6, 7, 7, 2, 3… (b=7) (l=28)
1, 1, 2, 3, 5, 8, 6, 7, 13, 13, 12, 11, 9, 6, 8, 7, 8, 8, 2, 3… (b=8) (l=20)
1, 1, 2, 3, 5, 8, 13, 13, 10, 7, 9, 8, 9, 9, 2, 3… (b=9) (l=16)
Apart from base 2, all the bases repeat with (2, 3), which is set up in each case by (base, base) = (10, 10) in that base, equivalent to (1, 1). All bases > 2 appear to repeat with (2, 3), but I don’t understand why. The length of the sequence varies widely. Here it is in bases 29, 30 and 31:
1, 1, 2, 3, 5, 8, 13, 21, 34, 27, 33, 32, 9, 13, 22, 35, 29, 8, 9, 17, 26, 43, 41, 28, 41, 41, 26, 39, 37, 20, 29, 21, 22, 43, 37, 24, 33, 29, 6, 7, 13, 20, 33, 25, 30, 27, 29, 28, 29, 29, 2, 3… (b=29) (l=52)
1, 1, 2, 3, 5, 8, 13, 21, 34, 26, 31, 28, 30, 29, 30, 30, 2, 3 (b=30) (l=18)
1, 1, 2, 3, 5, 8, 13, 21, 34, 25, 29, 54, 53, 47, 40, 27, 37, 34, 11, 15, 26, 41, 37, 18, 25, 43, 38, 21, 29, 50, 49, 39, 28, 37, 35, 12, 17, 29, 46, 45, 31, 16, 17, 33, 20, 23, 43, 36, 19, 25, 44, 39, 23, 32, 25, 27, 52, 49, 41, 30, 41, 41, 22, 33, 25, 28, 53, 51, 44, 35, 19, 24, 43, 37, 20, 27, 47, 44, 31, 15, 16, 31, 17, 18, 35, 23, 28, 51, 49, 40, 29, 39, 38, 17, 25, 42, 37, 19, 26, 45, 41, 26, 37, 33, 10, 13, 23, 36, 29, 35, 34, 9, 13, 22, 35, 27, 32, 29, 31, 30, 31, 31, 2, 3 (b=31) (l=124)
The sequence for base 77 is short like that for base 30:
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 68, 81, 73, 78, 75, 77, 76, 77, 77, 2, 3 (b=77) (l=22)
But the sequence for base 51 is this:
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 39, 44, 83, 77, 60, 37, 47, 84, 81, 65, 46, 61, 57, 18, 25, 43, 68, 61, 29, 40, 69, 59, 28, 37, 65, 52, 17, 19, 36, 55, 41, 46, 87, 83, 70, 53, 23, 26, 49, 75, 74, 49, 73, 72, 45, 67, 62, 29, 41, 70, 61, 31, 42, 73, 65, 38, 53, 41, 44, 85, 79, 64, 43, 57, 50, 57, 57, 14, 21, 35, 56, 41, 47, 88, 85, 73, 58, 31, 39, 70, 59, 29, 38, 67, 55, 22, 27, 49, 76, 75, 51, 26, 27, 53, 30, 33, 63, 46, 59, 55, 14, 19, 33, 52, 35, 37, 72, 59, 31, 40, 71, 61, 32, 43, 75, 68, 43, 61, 54, 15, 19, 34, 53, 37, 40, 77, 67, 44, 61, 55, 16, 21, 37, 58, 45, 53, 48, 51, 49, 50, 99, 99, 98, 97, 95, 92, 87, 79, 66, 45, 61, 56, 17, 23, 40, 63, 53, 16, 19, 35, 54, 39, 43, 82, 75, 57, 32, 39, 71, 60, 31, 41, 72, 63, 35, 48, 83, 81, 64, 45, 59, 54, 13, 17, 30, 47, 77, 74, 51, 25, 26, 51, 27, 28, 55, 33, 38, 71, 59, 30, 39, 69, 58, 27, 35, 62, 47, 59, 56, 15, 21, 36, 57, 43, 50, 93, 93, 86, 79, 65, 44, 59, 53, 12, 15, 27, 42, 69, 61, 30, 41, 71, 62, 33, 45, 78, 73, 51, 24, 25, 49, 74, 73, 47, 70, 67, 37, 54, 41, 45, 86, 81, 67, 48, 65, 63, 28, 41, 69, 60, 29, 39, 68, 57, 25, 32, 57, 39, 46, 85, 81, 66, 47, 63, 60, 23, 33, 56, 39, 45, 84, 79, 63, 42, 55, 47, 52, 49, 51, 50, 51, 51, 2, 3… (b=51) (l=304)