Saturday, August 13, 2022

The new backyard residents


The area of our backyard shown in the above has become a focus of activity of late, first by Bodie wading into the growth sniffing out something-or-other, then by the scurrying of some smallish animals (that I took to be mice) into the crevasses of the railway tie that is there (on the right), as well as the corners of the shed (on the far left) which sported some previously undisclosed openings into its underpinnings.

It more than likely was mice. However, unperturbed by my presence, this afternoon I spotted this somewhat-larger intruder, lazily munching away at some item in the (left) grassy area:


I am wondering now if the opossum that I thought I saw back in June was misidentified.

Tuesday, August 02, 2022

Wikipedia (reprise)

It has been more than a decade since I last made a Wikipedia edit. Just now I tried again. I changed Michelle Josef's birth year from 1954 to 1953. I have a December 1998 Globe & Mail article describing Josef as "a 45-year-old". And if that isn't substantive enough, I have a 15 March 2012 tweet from Michelle Josef herself saying: "I have been alive 21549 days."

Assuming that Michelle made the tweet on her 59th birthday (i.e., birthday anniversary), this would have her being born on 15 March 1953. How did Michelle arrive at the day count? 59*365 = 21535. Add 15 days for the leap years 1956 to 2012 and we have 21550 days. Why did Michelle calculate one day less? Perhaps she knew that century years (ending in 00) were not leap years and therefore did not count the year 2000 as one. Unfortunately, century years divisible by 400 are exceptions to the century-years rule and 2000 was a leap year. There are of course other possibilities. For example, (2012-1956)/4 = 14, or Michelle tweeted the day before her birthday, or some other scenario.

Monday, August 01, 2022

Sum & erase (integer version)

One of the drawbacks of Éric Angelini's sum-and-erase is that we are dealing with number strings, not integers. This is because we allow leading zeros. There's an easy and obvious fix: Don't allow leading zeros! Everything else is the same but, if the erasure of all instances of a digit (1-9) that is contained in the sum-of-digits moves one or more zeros to the leading (left) edge then those zeros are erased as well. Now the only number that is allowed to start with zero is zero itself. And 0 by itself disappears because it is the left-most digit of 0 and the sum-of-digits is 0. And although total erasure (the empty string "" in Éric's version) happens here as well, we can define it to be zero so as to keep our sequencing in the integer realm. Conveniently in Mathematica, FromDigits[{}] == FromDigits[{0}] == 0.

 0 => "" = 0
 1 =>
 "" = 0
 2 =>
 "" = 0
 3 =>
 "" = 0
 4 =>
 "" = 0
 5 =>
 "" = 0
 6 =>
 "" = 0
 7 =>
 "" = 0
 8 =>
 "" = 0
 9 =>
 "" = 0
100..00 => 0
 => "" = 0

Summarizing the procedure:

0. Start with a base-ten nonnegative integer.
1. Total the number's digits and concatenate this sum to the right of the number.
2. If the first digit in our number is one of the digits in our sum, delete every instance of it.
3. If (after deletion) there now appear leading zeros in our number, delete these as well.
4. If all digits or even all non-zero digits have been deleted, the subsequent term is zero.
5. Otherwise, the subsequent term is the concatenation of the remaining digits.
6. To generate a sequence of terms, iterate. Most starts eventually end up at zero.

In Éric's procedure, I had found (in addition to the fixed-point c0) six cycles. In this integer version, I have [index.  name = c&start-string  (cycle length)  {smallest precursor}]:

0.  c0  (1)  {0}

1.  c86  (80858)  {16}

2.  c30323322046333587  (1634)  {5916}

3.  c48822444886224973  (29)  {23675}:

 0 48822444886224973
 1 4882244488622497385
 2 488224448862249738598
 3 488224448862249738598115
 4 488224448862249738598115122
 5 488224448862249738598115122127
 6 488224448862249738598115122127137
 7 882288622973859811512212713718
 8 882288622973859811512212713718137
 9 2262297359115122127137113714
10 226229735911512212713711371497
11 226229735911512212713711371497113
12 226229735911512212713711371497113118
13 6973591151171371137149711311818
14 6973591151171371137149711311818123
15 6973591151171371137149711311818123129
16 6973591151171371137149711311818123129141
17 6973591151171371137149711311818123129141147
18 6973591151171371137149711311818123129141147159
19 6973591151171371137149711311818123129141147159174
20 97359115117137113714971131181812312914114715917418
21 73511511713711371471131181812312141147151741818
22 73511511713711371471131181812312141147151741818153
23 73511511713711371471131181812312141147151741818153162
24 351151113113141131181812312141141514181815316211
25 351151113113141131181812312141141514181815316211124
26 51151111114111181812121411415141818151621112411
27 111111114111181812121411411418181162111241111
28 11111111411118181212141141141818116211124111197
29 48822444886224973

4.  c77078088077807837313303137333430853003033013  (43)  {83123}

5.  c886054637  (140)  {256311}

6.  c5869099118496111114109711  (85)  {346715}

Also six cycles (so far), in order of smallest precursor. I am working on a distance-to-cycle sequence for the OEIS. For positive terms it is the number of steps needed to get to zero. Negative terms are for starts that will reach some other cycle. Terms that are 0 are for integers that are part of a cycle.