Thursday, 15 November 2018

Smith Brothers

2542825429

On Thursday, the 21st April 2106, I posted about Repunits and Smith Numbers. The day was 24490 and the number turned out to be a member of OEIS A104167, a sequence whose members have the property that, when multiplied by any repunit prime, the result is a Smith number. Just to recapitulate from that post:
A repunit is defined by Wikipedia as a number like 11, 111, or 1111 that contains only the digit 1 — a more specific type of repdigit. The term stands for repeated unit and was coined in 1966 by Albert H. Beiler in his book "Recreations in the Theory of Numbers". A repunit prime is a repunit that is also a prime number. 
A Smith number is defined by Wikipedia as a composite number for which, in a given base (in base 10 by default), the sum of its digits is equal to the sum of the digits in its prime factorisation. For example, 378 = 2 × 3 × 3 × 3 × 7 is a Smith number since 3 + 7 + 8 = 2 + 3 + 3 + 3 + 7. In this definition the factors are treated as digits: for example, 22 factors to 2 × 11 and yields three digits: 2, 1, 1. Therefore 22 is a Smith number because 2 + 2 = 2 + 1 + 1. 
Today, I turned 25428 days old and this number is a Smith number with the property that the next consecutive number (25429) is also a Smith number. Such pairs of numbers are termed Smith brothers. They are not that common. OEIS A050219 lists the smaller of the members of each pair. Here is the list as shown on the OEIS website:
728, 2964, 3864, 4959, 5935, 6187, 9386, 9633, 11695, 13764, 16536, 16591, 20784, 25428, 28808, 29623, 32696, 33632, 35805, 39585, 43736, 44733, 49027, 55344, 56336, 57663, 58305, 62634, 65912, 65974, 66650, 67067, 67728, 69279, 69835
Here is a SageMathCell with the code that I wrote to generate this sequence (up to 25428). Note that print F must be changed to print(F) because SageMath is now using Python 3 and the old Python 2 code for print no longer works:


It works but I'm sure there are more elegant ways to generate the same result. Here is a Numberphile YouTube video that explains a little more about Smith Numbers:

No comments:

Post a Comment