Sunday, August 26

Murder


More than seven hours after a fatal stabbing on Friday morning, 600 meters northwest of my home, police were still documenting the evidence on the road. We've had more than our share: On Wednesday, 1 km southeast of me, a drive-by shooting killed another man!


I did manage to capture the CP24 news team doing their coverage and — a few minutes later — a nice shot of reporter Arda Zakarian reacting to some police compliments:

More ænlic primes

When I presented ænlic primes earlier this month I pointed to the remarkable stability of the number of ænlic primes for a given digit-length. I noted that — except for four near-the-start values — they are always greater than 20 and less than 48. Last week I finished my search to 10^500, netting a total of 16115 ænlic primes thereto. As a result, the "greater than 20" needs to be adjusted to "greater than 17". Still, the overall trend continued and I decided to spend another week angling for the counts of 660- to 670-digit ænlic primes and — at intervals of ten, as a bridge — from 510- to 650-digit counts:


As icing on the cake, I did the 1000-digit ænlic primes. I found 36:

  (10^1000 - 1)/9 + 7*10^463
2*(10^1000 - 1)/9 - 2*10^647 - 1
2*(10^1000 - 1)/9 - 2*10^192 + 7
2*(10^1000 - 1)/9 + 6*10^239 - 1
2*(10^1000 - 1)/9 + 3*10^251 + 5
2*(10^1000 - 1)/9 +   10^344 + 1
2*(10^1000 - 1)/9 + 4*10^641 + 7
2*(10^1000 - 1)/9 + 6*10^969 + 5
3*(10^1000 - 1)/9 - 2*10^150
3*(10^1000 - 1)/9 + 5*10^481
3*(10^1000 - 1)/9 + 2*10^759
4*(10^1000 - 1)/9 - 4*10^777 + 5
4*(10^1000 - 1)/9 -   10^712 - 1
4*(10^1000 - 1)/9 + 5*10^ 64 + 5
4*(10^1000 - 1)/9 + 4*10^192 + 5
4*(10^1000 - 1)/9 + 4*10^516 + 3
4*(10^1000 - 1)/9 +   10^738 + 3
4*(10^1000 - 1)/9 +   10^796 + 5
4*(10^1000 - 1)/9 + 2*10^930 + 5
5*(10^1000 - 1)/9 - 3*10^812 - 4
5*(10^1000 - 1)/9 - 5*10^485 + 2
5*(10^1000 - 1)/9 - 2*10^ 41 + 2
5*(10^1000 - 1)/9 +   10^611 + 4
6*(10^1000 - 1)/9 - 6*10^799 + 1
6*(10^1000 - 1)/9 - 6*10^461 - 5
6*(10^1000 - 1)/9 - 4*10^170 - 3
6*(10^1000 - 1)/9 - 2*10^161 - 3
6*(10^1000 - 1)/9 + 2*10^284 + 3
6*(10^1000 - 1)/9 + 2*10^891 - 3
7*(10^1000 - 1)/9 - 5*10^517
7*(10^1000 - 1)/9 +   10^538
4*(10^1000 - 1)/9 + 4*10^999 - 3
8*(10^1000 - 1)/9 -   10^401 + 1
8*(10^1000 - 1)/9 - 2*10^337 - 7
8*(10^1000 - 1)/9 - 8*10^125 - 1
8*(10^1000 - 1)/9 - 6*10^ 88 - 1

Wednesday, August 22

LCM


Cliff Pickover's tweet from 2015 examples a least common multiple (LCM) of the positive integers to 100. Folk of my generation first learned of LCM in school when adding fractions with differing denominators. Finding the LCM of a range of numbers is fast and easy in Mathematica:

LCM @@ Range[100]
69720375229712477164533808935312303556800

One could look up the answer in OEIS sequence A003418 (its current b-file goes up to 2308). But of course I wanted to know how much further I could take this:

LCM @@ Range[10000]
57933396702876429686922708791662400986348602979985188253931383511489793001457731823088325981761829221665744176794023407056559491402467891577328326763021299466843118474637852656831938521549472347971073068161679301705472685236926463387338495220571064420250677315000599457941340849496227227628926493771018264821842230370349640102573492881424317306189569467101495834601991270039918780924506495405797923762205360790652073159333382795670426041033566699342449050309786673681670483369155689567554239898879039744147333971988258061042090970476729293484513072443614795766878726325795854855394491290821167148355514749149683707585283381546153703014210442470318180511906691108325146494219343498899382918018246586609827667470329166012110874981104800415741527586280026737848182673635645872230905234515169611121042867043956727839314198728626274066655467846183343599194761590368608472578398169740111485924046986870714883894285841394964627408094161019230662749101230783008668676907211199488107523306410531772045452853957706873238466829988649822157557103503283563398281775464911904789159515900987401574678885942493907604740891878907698622679570965569483682456042918236444719794534411171907606336090534029349351300276141892529795448751826394399153216183270385737795748770508612096374765333578237973395907265484337502903901947799663388329849198045756207969590055686607678195206367273600632909417024224754750428711236917913663419215925830944035539848749163178489614227546656090790164108195741048033614368495827231281392190063051315248070192263400801315095608512139510731469732311313898995746040563433121427776071482655904346538281010668476731132415829844984600414136781404774213539507859790229205890271721600309169926806121871750008163738773911610009508609149665332579632767397078877996926581337419351834754370411008686136818501030862345505385357198060894463821342298717851567836562984344806469613768024764967372979655179066074398198246805104576134474823016488842818077041661676098399378809713894284994865370648616800689225595431967181072865363430005250840767890912164530705704936837915584856606960687347372391339254432119085932175541392954343684716695162629271229789289404752104218596977036941910521266321726821940533986384237994403780618301379099347975260122724194454275088825587044488208965690373706904056926509324696308810974331790119456438147168585552011926921912167450509941646104076818762060881903969616431646384985895944231218505620547093874241169759205450145478746112796898626711966320965057212219958567338851356631739947125096250452942497473309299907612330435197454392788637359253116308685007014249605492659524429134513344137517101872279428202285951652856354827230765931502805341696470148698002737700823078904634554776750169178259216255903968865588749827789888950172452455448248833712309835657561369233157977405579365293671943131412034109901944892819245001657496671822581274180596255340507054499934060282320458240722454209933569735940032859109934686878274110864394924463573852015338428881961843292083566034669814619612606638283615766521897504566616272305253931938372830446073384019299355320864342734019517633662346790422915951954822645137091494126100390104510987373366328615363056042137440808225973600809566845718073791616927784260557845021823094999326904373592319407516660896764388092262510369182153559285446074990941863516247226532653142198551840063631989428776799533286215464660644129411503287306838551341184739976807097763115368031748646043780549055143428297230678053738453010234949008253769355207208167999203353157524666017029803679612131824740794652592875662818479980117505768541194835524231818203552256426752730455115752280837099763237606348192867936457993970866446264015812819179994138642295108872381709181937092290392544335464025324661284746003660247161196698209062164637264114930766444473471083408200329662059064201896721165015687487728300854501780810155844837489798144309942999091774466406270065305461848242329380636274754660519867343112275861821293501112101434868225378041813836808745417606289159904294165941408692922250601127804971962342807927743390030395048263275616935165347620718001157478088456439083590834464409622781693790883289597024043982584220069224170235863458745344365684082114430362867446193601075569803650773018026700003812298460527976219100308016537538008597751565631582745643139434508332515569645426771932483266712323523039014220800000

LCM @@ Range[1000000000]
abridged answer

If you want the unabridged answer to the LCM of the positive integers to one billion, it's 440 MB — somewhat unsuitable for web-browser display. If you have a text application that can handle that, I've put a 207 MB .zip compression of it here [clicking on this should download the compressed file]. I discovered an interesting initial-digits convergence when I calculated the number of decimal digits in these to-powers-of-ten LCMs:

Table[Ceiling[Log[10, LCM @@ Range[10^n]]], {n, 9}]
{4,41,433,4349,43452,434115,4342311,43428686,434295176}

The initial 4 is the number of digits in 2520 (LCM to 10) and the next 41 is the number of digits in LCM to 100. The final 434295176 is the number of digits in LCM to one billion.

Sunday, August 12

Size is everything


Harry Allen's tweet yesterday asks about the size comparison of a 2013 Mac Pro to that of a soda can. Of course that Mac Pro looks somewhat like a soda can but it's significantly larger. The volume of the 2013 Mac Pro is roughly 5000 cm^3. The volume of a soda can is typically 400 cm^3. So no, this Mac Pro doesn't qualify as a soda-can-sized computer. Cliff Pickover retweeted the post without comment.

Monday, August 6

Ænlic primes

Last month I showcased a very large term in OEIS sequence A039986. I didn't then have a special name for these numbers but I've given it some thought and finally settled on ænlic primes. Say what? A program-generated pronunciation [loud] for the Old English expression suggests (to my ear) a tad more ah than eh of that initial ae diphthong. The ending is like the word each. But I digress.

To recap, a term in A039986 is a prime number where no other permutation of its digits is prime — including permutations with leading zeros. For example, using two zero digits and ten one digits we can create the following 66 distinct permutations:

 1    1111111111 = 11*41*271*9091
 2   10111111111 = 101*421*237791
 3   11011111111 = 7*11*13*11000111
 4   11101111111 = 211*52611901
 5   11110111111 = 11*31*43*191*3967
 6   11111011111 = 41*101*271*9901
 7   11111101111 = 11*17*59417653
 8   11111110111 = 19*53*1667*6619
 9   11111111011 = 7*11*13^2*29*29443
10   11111111101 = 23*101*1931*2477
11   11111111110 = 2*5*11*41*271*9091
12  100111111111 = 11*31*293580971
13  101011111111 = 19*101*52637369
14  101101111111 = 7*11*13*17*281*21143
15  101110111111 = 41*269*271*33829
16  101111011111 = 11^2*2791*299401
17  101111101111 = 101*9901*101111
18  101111110111 = 11*59*155795239
19  101111111011 = 89*823*859*1607
20  101111111101 = 7*11*13*41*271*9091
21  101111111110 = 2*5*101*421*237791
22  110011111111 = 11*10181*982321
23  110101111111 = 101*1090110011
24  110110111111 = 7*11*13^2*293*28879
25  110111011111 = 97*659*1722557
26  110111101111 = 11*10010100101
27  110111110111 = 101*149*739*9901
28  110111111011 = 11*109*6047*15187
29  110111111101 = 110111111101
30  110111111110 = 2*5*7*11*13*11000111
31  111001111111 = 11*53*1097*173561
32  111010111111 = 101*181*6072431
33  111011011111 = 7^2*11*13*15842873
34  111011101111 = 383*289846217
35  111011110111 = 11^2*47*19520153
36  111011111011 = 31*101*3581*9901
37  111011111101 = 11*9013*1119707
38  111011111110 = 2*5*211*52611901
39  111100111111 = 11*19*531579479
40  111101011111 = 61*101*18032951
41  111101101111 = 7*11*13*23*71*67967
42  111101110111 = 1373*80918507
43  111101111011 = 11*10100101001
44  111101111101 = 101*241*461*9901
45  111101111110 = 2*5*11*31*43*191*3967
46  111110011111 = 11*41*271*909091
47  111110101111 = 83*101*2887*4591
48  111110110111 = 7*11*13*683*162517
49  111110111011 = 17*71*2777*33149
50  111110111101 = 11^3*83478671
51  111110111110 = 2*5*41*101*271*9901
52  111111001111 = 11*131*77106871
53  111111010111 = 101*5647*194813
54  111111011011 = 7*11*13*199*557789
55  111111011101 = 41*251*271*39841
56  111111011110 = 2*5*11*17*59417653
57  111111100111 = 11*10101009101
58  111111101011 = 101*1100109911
59  111111101101 = 7*11*13*111000101
60  111111101110 = 2*5*19*53*1667*6619
61  111111110011 = 11*1499*6738499
62  111111110101 = 17^2*101*3806609
63  111111110110 = 2*5*7*11*13^2*29*29443
64  111111111001 = 11*307*32902313
65  111111111010 = 2*5*23*101*1931*2477
66  111111111100 = 2^2*5^2*11*41*271*9091

Only #29 (110111111101) is prime and because this number contains all twelve digits (i.e., both zeros) it is an ænlic prime. [There is, for example, only one prime in the 21 permutations of two zeros and five ones but that prime (101111) is missing a zero so it is not ænlic.] If there were more than one prime in any such permutation list, they would not be ænlic. Using PARI code on the OEIS A039986 webpage, I generated 1141 ænlic primes less than 10^30. The program spent two weeks looking for 31-digit solutions — only to abort with a memory issue!

At that point I decided to write my own Mathematica program. Not a foolproof discovery engine that calculated all terms for a given digit-length — because such searches would take too long — but rather, a brute force effort that started with a given number of repdigits (1-9) and replaced up to two of the digits with something else (0-9, but not the repdigit). I can't be certain that this finds all of the ænlic primes that exist for the digit-length under consideration — but I think it probable.

The program is currently up to 10^350. I've preceded the decimal numbers with compact notation (where warranted: all but 44) and indexed the lot. I should be able to reach 10^500 but it will take another couple of weeks and will further deprive my "long compute" of the four cores on my fastest machine. [August 19: done!]

The number of ænlic primes of a given digit-length (4, 13, 34, 45, 68, 67, 47, 36, 40, 46, 33, 45, 35, 38, 32, 39, ...) is remarkably stable:


In my range — except for four near-the-start values — they are always greater than 20 and less than 48. I wonder if there exists a long-term trend.