Monday, December 19, 2022

Binary complement sequences

On Friday, Joshua Searle posted to the Sequence Fanatics Discussion list a neat procedure: take the binary complement of an integer multiplied by 3. Iterate. For example, starting with 3 we get the binary of 9 (1001), the complement of which (0110) is 6. Continuing, from 6 we get the binary of 18 (10010), the complement of which (01101) is 13. Arriving at zero, we stop.

 0 3
 1 6
 2 13
 3 24
 4 55
 5 90
 6 241
 7 300
 8 123
 9 142
10 85
11 0

Eleven steps to get to zero. The largest integer reached is 300 at step 7. We can shorthand the sequence data for 3 with (11,7,300) [steps to reach zero, steps to reach a maximum, the maximum]. Here are the statistics for integer starts up to 28:

 0 (0,0,0)
 1 (1,0,1)
 2 (2,0,2)
 3 (11,7,300)
 4 (12,8,300)
 5 (1,0,5)
 6 (10,6,300)
 7 (3,1,10)
 8 (4,2,10)
 9 (13,9,300)
10 (2,0,10)
11 (19,15,300)
12 (80,28,328536)
13 (9,5,300)
14 (2,1,21)
15 (15,11,300)
16 (16,12,300)
17 (81,29,328536)
18 (14,10,300)
19 (11,7,300)
20 (12,8,300)
21 (1,0,21)
22 (6,2,72)
23 (83,31,328536)
24 (8,4,300)
25 (73,21,328536)
26 (22,5,661)
27 (79,27,328536)
28 (7572,2962,123130640068522377168864228132316865867184046004226894)

Note the large number of steps and maximum in the last one. Somewhat more surprising are subsequent records. Do all integer starts eventually reach zero? Tom Duff has provided a list of the progressive record number of steps to get to zero:

1: 1
2: 2
3: 11
4: 12
9: 13
11: 19
12: 80
17: 81
23: 83
28: 7572
33: 7573
74: 7574
86: 7578
180: 7580
227: 664475
350: 664882
821: 3180929
3822: 3180930
4187: 3180931
5561: 3181981
6380: 3181988
6398: 3182002
22174: 3182226
22246: 120796790
26494: 556068798
34859: 556068799
49827: 556068871
70772: 556068872
103721: 572086553
104282: 572086610
204953: 1246707529
213884: 1246707552
225095: 1246707555
407354: 1246707602
425720: 87037147316

Update: Tim Peters has been working on extending the outcome of start numbers up to ten million. Here are a few results from his effort:

1671887:   128018188027
6264400:   918217008016
6524469: >2000000000000
7404616:  3306609997544

Saturday, December 10, 2022

Mobile upgrade

iPhone 6 on warp drive

Catherine's almost-seven-year-old iPhone 6 was dying/dead so I ordered a replacement.


Starting it up went well enough although I did spend some fifteen minutes prior looking for a paper clip. Only later did I discover the iPhone 13's accompanying SIM-tray ejector tool:

Thursday, December 08, 2022

Products with embedded indices

Éric Angelini did a "smallest multiplication" bit yesterday that I felt was worth extending.

     0 0 = 0 * 1
     1 10 = 2 * 5
     2 12 = 3 * 4
     3 132 = 6 * 22
     4 84 = 7 * 12
     5 152 = 8 * 19
     6 126 = 9 * 14
     7 170 = 10 * 17
     8 198 = 11 * 18
     9 195 = 13 * 15
    10 1008 = 16 * 63
    11 1100 = 20 * 55
    12 1218 = 21 * 58
    13 713 = 23 * 31
    14 1416 = 24 * 59
    15 1150 = 25 * 46
    16 1612 = 26 * 62
    17 1728 = 27 * 64
    18 1820 = 28 * 65
    19 1914 = 29 * 66
    20 1020 = 30 * 34
    21 1216 = 32 * 38
    22 1221 = 33 * 37
    23 2345 = 35 * 67
    24 2448 = 36 * 68
    25 2925 = 39 * 75
    26 12600 = 40 * 315
    27 1927 = 41 * 47
    28 2898 = 42 * 69
   ...

The column of indices on the far left is shown embedded (in bold) in their adjacent products. The constraint on the multiplier and multiplicand is that they must be distinct nonnegative integers with the multiplier the smallest such not yet used and the multiplicand the smallest such that yields the embedded index. A chart extending the products is here.

Friday, November 18, 2022

Coyote sighting


Spotted early this morning walking west down our street, just as Bodie and I were leaving for our walk. Already too distant to be distinct by the time I managed the photo, I have added a helpful arrow. At the bottom of the shot are some of the two dozen bags of leaves where our driveway meets the road, ready for today's yard-waste pickup. Resourceful squirrels will tear the paper off the bottom of the bags in order to steal the mostly dry leaves. I've had to re-bag one of them because it was beyond repair.

Wednesday, November 16, 2022

Paper delivery


Looking east up Denison Rd. W., at the spot where it curves south, I believe I recognize the newspaper delivery driver's tire-tracks in this morning's freshly fallen snow.

Saturday, November 05, 2022

Tuva

I've been watching VagaBond for a while now. His videos provide welcome counterpoint to the tragic criminality of Russia's invasion of Ukraine, and this one, in Tuva, is better than the usual freighthopping fare.

Friday, November 04, 2022

Twin concatenations

Éric Angelini came up with this idea of listing products (one per line) where the multipliers introducing the line are the positive integers and the smallest possible multiplicands (after the initial line) are deduced from the products, given that the concatenations of the products (to the right of the equal signs) must be the same as the concatenations of the multipliers and multiplicands (in order, to the left of the equal signs), from the beginning, as far as it will go.

On the MathFun mail list, Éric shared Gilles Esposito-Farese's version that makes the multipliers the nonnegative integers (up to 50), instead of the positive-integers versions shown on Éric's blog:

 0 * 0 = 0
 1 * 0 = 0
 2 * 5 = 10
 4 * 63659 = 254636
 5 * 119 = 595
...

For some reason Gilles skipped 3. Which makes his output for lines 4 to 50 incorrect. Ouch!

Here is my correction:

 0 * 0 = 0
 1 * 0 = 0
 2 * 5 = 10
 3 * 846 = 2538
 4 * 1 = 4
 5 * 1283 = 6415
 6 * 2 = 12
 7 * 1194673 = 8362711
 8 * 118342264792783 = 946738118342264
 9 * 88 = 792
10 * 7839881 = 78398810
11 * 7127164651933786 = 78398811171271646
12 * 432781551 = 5193378612
13 * 332908885487176222196 = 4327815511333290888548
14 * 512587299724651848 = 7176222196145125872
15 * 664831 = 9972465
16 * 11550979 = 184815664
...

Here is my listing up to 1000. Please let me know if you see an error!

Friday, October 14, 2022

Non sequitur

I don't watch a lot of Netflix, likely because after wading through a bunch of popular/trending items I don't find anything palatable. Yesterday I tried a different approach. I looked through the critically acclaimed films and (eventually) came across The House:


Although the movie left me slightly discombobulated, I thought it generally worthwhile. For some reason, about half-way through, Harry Mathews' The Sinking of the Odradek Stadium came to mind. I once owned a copy of it. In the early 1980s (I think), I lent it to Brad (I think), a workplace acquaintance. I lost track of Brad at some point. I never got the book back!