BoUoW: Bash on Ubuntu on Windows

bash_tuxsay_uobow_sysinfo
Tux is telling you the most current Ubuntu running for Windows for BoUoW.

I am not proud of possibly inventing the ugly acronym “BOUOW”, but “BASH on Ubuntu on Windows” appears to compel it. Maybe we can pronounce it “bow-wow” — not sure if that’s complementary. Just did a Google search, and, no, as predicted I couldn’t have invented it: It is variously acronymed: B.O.U.O.W., or BoUoW. It has been around since at least March of 2016, giving end users, computer geeks, and developers plenty of time to come up with something of a nickname or acronym.

But I actually mean to praise BoUoW, and to give it considerably high praise. This is a brave move on Microsoft’s part, and a long time coming. MS has made *NIX access available in its kernel for some time now, thus making *NIX conventions possible on the command line like certain commands in the Power Shell. The user has to enable the capability in the Windows 10 settings (“Windows Subsystem for Linux” (WSL)), and as Admin, the kernel has to be set to “Developer mode”, and follow the instructions on the MSDN website to download binaries and to enable a bash shell on either the command line or PowerShell.

BoUoW takes advantage of the WSL to do impressive things like use the same network stack as Windows 10 itself. This is because with WSL enabled, a UNIX command such as SSH can now make calls directly to the Windows 10 kernel to access the network stack.

This is, by Microsoft’s admission, a work in progress. It would worry me if they would not have said that. But lots of things do work. vi works and is symlinked (or somehow aliased) to vim. The bash shell comes with some other common aliases like “ll” for “ls -l”, for instance, and apparently, as part of the installation, you actually have a miniature version of Ubuntu, complete with a C compiler, and an image of Ruby, Perl, Python, and if it isn’t installed, you can always use “apt-get” to install it.

One of the security features has the disadvantage of conducting an install of BoUoW separately for each user. If a user types “bash” in a cmd window, and if BoUoW is not installed for that user, the install happens all over again, and the image goes under each user’s AppData directory requesting a BoUoW install. If you are using an SSD for C: drive like me, then you might find that limiting due to a shortage of space.

There are many things not recommended yet. If you are a serious web developer, for example, you would find many of the things you want, such as mySQL, are not currently working the right way. If you are a systems programmer, then you’ll find that ps and top only work for unix-like commands, so I wouldn’t use BoUoW for any serious process management. That being said, it does contain the old standbys: grep, sed, and awk.

gcc_output_uobow
The compiling and output of my “Hello, world!” program, also showing the source code.

gcc had to be installed separately. The binary it created for my “Hello, world!” program lacks the Microsoft .exe extension. And as it is for Unix binaries, it lacks any default extension. It is using gcc version 4.8.4. The current version is 6.3. This older gcc usually won’t pose a problem for most users.

The current stable Ubuntu is 16.04. BoUoW uses the previous stable version, 14.04, and thus has slightly older versions of Perl (5.18), Python (2.7.6), bash (4.3.11), Ruby (1.8) (available using apt-get), vim (7.4), and other software. Vim, however, appears to be the “large” version, which is expandable, using plugins like Vundle, which is good news. I don’t suspect that these slightly older versions would cause anyone problems, except possibly for Python, which has gone all the way up to version 3.5.2 since. You are warned also that it is possible that under Python or Perl, you might run into problems due to not all of their libraries running correctly under BoUoW. Not surprising, since Python has hundreds of installable libraries and Perl has thousands of them. Could take a while.

 

Another crack at 6×6 magic squares

Even-ordered magic squares are not difficult just because they are even, in my opinion. They are difficult to design because their order is composite. My experience has shown that by far the easiest to design are magic squares whose order is a prime number like 5, 7, 11, or 13. I have run into similar problems with 9×9, 15×15, as well as 6×6 and 8×8. The 6×6 seems to have the reputation for being the most difficult to make magic, although I have stumbled on one system that produced them, and wrote about it a few years ago, about how I applied that method to a spreadsheet. That method, however, led only to 64 possibilities.

Spreadsheets are a great way of checking your progress as you are building such squares, especially when you are trying to build a square using, say, a method you made up on your own, such as applying a Knight’s tour (which works OK with an order-8 square) to an order-6 square. This would require some facility with using spreadsheet formulae and other features which improve efficiency. Using your own method is very much based on trial and error, and you have to make a rule as to whether you will be wrapping the Knight’s moves (if you decide to use a Knight’s tour) to the opposite side of the board, or will you be keeping your moves within the board limits, changing direction of the “L’s” in your movements (this seems to lead to dead ends as you find you have no destinations left which follow an “L”, and consequently, squares which are not really magic). At any rate, the best squares follow some kind of rule which you need to stick to once you make it.

The best ones I have been able to make with a knights tour are: 1) when your L’s are all in the same “direction”‘ 2) when you sum up two squares. The problem is, all of the ones I have made with these methods so far either end up with weak magic (rows add up but not the columns) but the numbers 1-36 are all there; or all rows and columns make the magic number of 111, yet not all of the numbers are present and there are several duplicated (and even triplicated) numbers.

1 9 17 24 28 32 111
26 36 4 7 15 23 111
17 19 27 32 6 10 111
34 2 12 17 19 27 111
21 29 31 4 8 18 111
12 16 20 27 35 1 111
132 111 111 111 111 111 111 90

The above table shows the totals for the rows and columns for one attempt I made for a semi-magic square. Rows and columns work out to the correct total, but not the diagonals, as shown by the yellowed numbers. There are also duplicate entries, as well as missing entries. 1, 4, 12, 19, and 32 have duplicates, while there are three of 17 and of 27. Numbers missing are 3, 5, 11, 14, 22, 25, 30, and 33. That being said, the rows and columns add perfectly to 111, but not the diagonals. However, the average of the diagonals is the magic number 111 (this does not always work out). The sum of the missing numbers is 156, while the sum of the “excess” numbers (the sum of the numbers that occur twice plus double the sum of the numbers occurring thrice) is also 156 (could be a coincidence).

The above semi-magic square results from the sum of two squares where a knight’s tour is performed with the second square where the numbers 1 to 6 go in random order going down from top to botton. If I am too close to the bottom edge of a column, the knight’s tour wraps back to the top of the square. Beginning on the third column, I shift the next entry one extra square downward. The result is 6 of each number, each of these unique to its own row and column.

The first square are the multiples of 6 from 0 to 30 in random order going from left to right, also in a knight’s tour, wrapping from right to left and continuing. The third row is shifted by 1 to the right.

0 6 12 18 24 30
24 30 0 6 12 18
12 18 24 30 0 6
30 0 6 12 18 24
18 24 30 0 6 12
6 12 18 24 30 0
+
1 3 5 6 4 2
2 6 4 1 3 5
5 1 3 2 6 4
4 2 6 5 1 3
3 5 1 4 2 6
6 4 2 3 5 1

Note that the first square wasn’t really randomized.  When I tried to randomize it, the result was still semi-magic, similar to what was described. In the case I attempted, the average of the diagonals was not 111. The two are added, this time using actual matrix addition built into Excel. There is a “name box” above and at the far left of the application below the ribbon but above the spreadsheet itself. This is where you can give a cell range a name. I highlighted the first square with my mouse, and in the name box I gave a unique name like “m1x” (no quotes). The second was similarly selected and called “m2x”. I prefer letter-number-letter names so that the spreadsheet does not confuse it with a cell address (which it will). Then I selected a 6×6 range of empty cells on the spreadsheet and in the formula bar (not in a cell) above the spreadsheet (next to the name box), I entered =m1x+m2x, then I pressed CTRL+ENTER. The range of empty cells I selected is now full with the sum of the squares m1x and m2x, which is the first semi-magic square shown in this article.

Cygwin has come a long way … A story in animated GIFs

cygwin_setup
Search is handy for adding new packages to your installation.

First of all, let me say that there is some currency to what the title and pictures imply.

Cygwin/X really has come a long way.  10 years ago, the only viable way to run Cygwin was through a DOS-style UNIX shell. The windows system Cygwin/X provided, such as it was, was  mostly TWM, a primitive window manager which  I used to use, which ran the core programs in the X-Windows distribution. Most  of what came with Cygwin,  such as Gnome or KDE, never worked for me, making me an FVWM2 fan for a long time. Along the way, I appreciated  that while FVWM2 was very stripped-down, it made up for it in flexibility and configurability. Even now, FVWM2 is quite liveable.

cygwin_wait
Postinstall scripts can be a bit of a wait.

I decided yesterday to upgrade Cygwin on one of my older computers,  and after working past some glitches in installation, found that:

  1. If you have your guard down, you may still install packages you hadn’t intended, particularly the TeX language packs for languages and alphabet systems that you know you will never use. Minutes can turn to hours with postinstall scripts running trying to configure these redundant packages.
  2. hacking_keys
    I had this idea of moving my old Cygwin installation to another drive; and it was then I discovered a thicket of permission problems that I had to untangle. This took a lot of work.

    Mate is recent addition to Cygwin, and actually works on my slow system in 2016. In fact, I am using the Midori web browser to edit this blog under Mate in Cygwin/X.

  3. GIMP was once a graphics program you had to compile; now it is intallable for Cygwin as its own package.
  4. When moving my old
    vim_install_github
    Github is the place for a lot of things to round out Cygwin. I was using it to clone source code remotely, then compile and install.

    distribution to another drive, I found a ton of permision problems which were caused by compiling the source for various downloaded code  as another user – not the owner of the directory.

  5. I now have a good system, with much more functionality than ever before. Cygwin has gone from a system that was “mostly broken” to “mostly working” in the space of 10 or so years.green_ninja

Junk science: The 5-second rule

flowchart-floorfood
The 5-second rule is not mentioned here, but still shows that going against Mother Nature leads to convoluted and wishful thinking. Found here.

You remember this. It’s where a child says that if you drop food on the floor and pick it up in less than five seconds, you can safely eat it again. Many adults believe it too. It is hard to know where these ideas come from.

There was a V-Sauce video on the 5-second rule made back in Noveber of 2012, that debunks it with everyday science. V-Sauce mentions, however, that your immune system protects you from a good deal of the bacteria that are sure to come from the floor. There is a MythBusters episode on TV that debunked the 5-second rule also. But away from popular science, there is also a 2007 article in The Journal of Applied Microbiology that not only do microbes adhere to food pretty much on contact, but further that, on an otherwise clean, dry tile floor, Salmonella typhimurium can survive for over a month in large enough numbers to pose a human health problem (40 days, according to the journal). S. typhimurium is a bacteria known to cause typhoid fever in humans.

In scientific terms, “clean” is taken to mean “free of dirt and debris”. Only “sterile” can mean “free of all bacteria and other single-celled organisms”. The floor in this case would be clean but not sterile, just like a floor would be in any average well-kept home.

Well, that was back in 2007, and there has since been another journal article released two days ago by researchers at Rutgers University (who published in the journal Applied and Environmental Microbiology), with what appears to be bigger samples with more surfaces and more measurements than ever before. The lesson, however, is still the same: if food falls on the floor, the safest way to deal with the food is to just throw it out.

Sterility is too lofty a goal for an average home, requiring the inside of the home to be sealed off and air-tight, and for the people entering the home to cover their clothes with a sterile outer suit (since they are contaminated from being outside), and to put on shoe and hair coverings before entering the house.

Eating in a sterile environment

Eating and getting rid of bodily wastes would require, as the easiest solution, to do all that outside the house. Once food is brought into the home, any hope of sterility is gone. Growing food in the home does not absolve you from microbes, since most plants and animals need bacteria to grow. And you don’t just need the individual microbes, you need the whole ecosystem they belong in. Past attempts at building artificial ecosystems isolated from the rest of the world had all ended in failure. To get rid of bodily wastes, you would need to build an outhouse — one with running water, if you like to be fancy. None of these are the most comfortable solution to everyday needs which we take for granted.

Wait! What? Chomsky is wrong about something?

chomsky
Noam Chomsky

I am a Chomsky enthusiast, admittedly. I have read several of his articles and books, and have viewed countless videos. I am no expert in Linguistics, but would sit through a video of his lectures on it.

So, when Tom Wolfe wrote in Harper’s magazine, an article entitled The Origins of Speech, I learned about the fallability of one of the “most important intellectuals alive”. Not that this is tragic. After all, who cares if an intellectual makes a mistake or not? It would be beyond naive to think that Chomsky’s pronouncements on any topic are flawless, and I am sure that Chomsky would subscribe to that admission, although much has been made on the part of others about his legendary rhetorical skills, which had served him well in live public debates and his countless speeches.

demo
Democritus

Tom Wolfe mentioned Chomsky’s insistence that Linguistics be seen as a science. As a science, it is unique, as Wolfe states, in that it requires zero field study. Linguistics is the only “science” that does this. Rather than be seen as, say, another Linus Pauling or Frederick Banting, it would be better to see him as an ancient Greek philosopher like Democritus. Democritus asked the question about the essential nature of matter and came up with “atoms” without all the bother of needing to observe samples under a scanning tunnelling microscope, for which he would have had to wait 2500 years for such a microscope to be invented.

toddler-blocksSimilarly, Chomsky asked the question about the essential nature of language acquisition as a philosopher. He asked the question of how children first acquire language from truly degenerate and imperfect samples found in the environment around him. The child is a toddler, perhaps age 2, so there is no way for the child to look up words somewhere on Google; no way to get perfect grammar samples; no way to know the parts of speech. The child’s cognitive skills are not up to a sufficient level, nor his motor skills, nor his reasoning skills. In addition, toddlers acquire language in very adverse situations, where the parent’s education and vocabulary are not great, and the growing environment is not the best. So, Chomsky reasoned, acquisition of language must be innate to our species. We chat up a storm just as surely as beavers build dams and birds build nests. Therefore, language acquisition must be tied to neurological processes more than it is tied to processes outside of the language learner. So, maybe there is a “language centre” in the brain, and maybe a universal grammar … ?

That’s a lot of reasoning, and a true scientist would demand “real-world” evidence, such as those obtained from field study, but as Wolfe points out, Chomsky himself downplayed that. That still doesn’t fault Chomsky, since that could still be for others to do, and I am sure a great deal of this has been done over the past 60 years that Chomskyan Linguistics has been around, if only by detractors of Chomsky’s theories and would try to knock it down somehow.

Peter_Norvig
Peter Norvig

There has, and any linguistics based on samples and statistics have been treated as a separate paradigm of thought. While these would be dismissed by Chomsky and his followers, it did give us Google Translate. Google Translate, invented by Google research director Peter Norvig, is a unique beast. Google Translate knows nothing about any language, relying only on statistical occurrences of actual use of specific words and phrases in documents on the Internet. It uses what linguists call “corpus” linguistics: the study of language as it is actually used and observed to be used by people in the real world. And it does it with a significant degree of success. I have used it extensively, and can attest to its usefulness. Corpus linguistics would be dismissed by Chomsky as one dismisses a paradigm that is outside of one’s own.

Chomsky and those invested in his paradigm would have not been able to create Google Translate from universal grammar (UG) theory. UG is touted to exist, but such a UG is not fully realized, at least not to the point where a translating engine could auto-detect your language and translate it to another one for you the way Google Translate does. Corpus Linguistics appears to do the real work manifest in our techhnologies and education systems, while UG is that shiny new theory, 60 years old but largely still on the drawing board, attractive but too new to be applied to existing technologies right now. UG is like the wave mechanical model in physics, where you are better off with high school physics most of the time. Einstein may have been right and Newton may have been wrong, but you can still build bridges and skyscrapers with Newtonian physics.

Wolfe does not go into any of this stuff about paradigmatic differences, by the way. While there is effectively a schism between modern linguists, Wolfe chose to attack Chomsky in ways that border on ad hominem. Wolfe has been criticized for misinterpreting actions of Chomsky to fill out a particular narrative. He was painted, for example, as a kind of defensive person, unresponsive to criticism. This is laughable, since he is famous for responding to email from just about anybody. I had even corresponded with him in the past, and to this day I have never met him in person. His correspondence with me had always been thoughtful and helpful, and far from defensive or unresponsive.

The flap about flossing

There has been barrels of ink, moles of electrons, and weeks of nighttime talk shows used up over notion that over the past 30 to 40 years, we were all duped. Flossing does nothing for your teeth. All that guilt about not doing it, wasted over nothing. But let’s be precise here. The FDA is citing “lack of strong evidence”, not that it had no effect.

Journalists, with a BS in something that is not a Bachelor of Science, take it to mean that there was some kind of propaganda conspiracy to get us to floss un-necessarily. It is amazing that journalists think we are that stupid. I get stuff in my teeth that I can’t get with my toothbrush, and journalists are leading me to believe that the FDA is telling me that it’s OK to leave it there?

“No evidence” was cited, since, according to the FDA, no one did a serious study. It could have been that the FDA thought that the benefits are self-evident. Do people really need evidence that getting stuff out from between their teeth is better for their oral health than leaving the food stuck in there? The FDA probably thought, rightly, that tax money could be better spent elsewhere.

Programmatic Mathematica XVI: Patterns in Highly Composite Numbers

This article was inspired by a vlog from Numberphile, on the discussion of “5040: an anti-prime number”, or some title like that.

A contributor to the OEIS named Jean-François Alcover came up with a short bit of Mathematica code that I modified slightly:

Reap[
   For[
      record = 0; n = 1, n <= 110880, n = If[n < 60, n + 1, n + 60], tau = DivisorSigma[0, n]; 
      If[tau > record, record = tau; Print[n, "\t\t", tau];
      Sow[tau]]]][[2, 1]]

This generates a list of a set of numbers with an unusually high amount of factors called “highly composite numbers” up to 110,880. The second column of the output are the number of factors.

1      1
2       2
4       3
6       4
12      6
24      8
36      9
48      10
60      12
120     16
180     18
240     20
360     24
720     30
840     32
1260        36
1680        40
2520        48
5040        60
7560        64
10080       72
15120       80
20160       84
25200       90
27720       96
45360       100
50400       108
55440       120
83160       128
110880      144

For a number like 110,880, there is no number before it that has more than 144 factors.

Highly composite numbers (HCNs) are loosely defined as a natural number which has more factors than any others that came before it. 12 is such a number, with 6 factors, as is 6 itself with 4. The number 5040 has 60 factors, and is also considered highly composite.

5040=24×32×5×7
This works out to 60, because with 24, for example, we get the factors 2, 4, 8, and 16. With 24×32, we get 2, 3, 4, 6, 8, 9, 16, 18, 36, 72, and 144, all which evenly divide 5040. The total number of factors including 1 and 5040 itself can be had from adding 1 to each exponent and multiplying: (4+1)(2+1)(1+1)(1+1)=5×3×2×2=60.

Initially, facotorization of HCNs was done in Maple using the “ifactor()” command. But there is a publication circulating the Internet referring to a table created by Ramanujan that has these factors. A partial list of these are summarized in a table below. The top row headers are the prime numbers that can be the prime factors, from 2 to 17. The first column is the number to factorize. The numbers in the same columns below these prime numbers are the exponents on the primes, such as: 10,080=25×32×51×71. The last column are the total number of factors on these HCNs. So, by adding 1 to each exponent in the row and multiplying, we find that 10,080 has 6×3×2×2=72 factors.

NUMBER PATTERNS OBSERVED

As a number of factors (underneath the “# facotrs” column), We get overlapping patterns starting from 60. One of them would be the sequence: 120, 240, 360, 480, 600, and 720. But the lack of an 840 breaks that pattern. But then we get 960, then 1080 is skipped, but then we get 1200.

For numbers of factors that are powers of 2, it seems to go right off the end of the table and beyond: 64, 128, 256, 512, 1024, 2048, 4096, 8192, … . Before 5040, the pattern is completed, since 2 has 2 factors, 6 has 4 factors, 24 has 8 factors, 120 has 16 factors, and 840 has 32 factors. The HCN with 8192 factors is 3,212,537,328,000. We have to go beyond that to see if there is a number with 16,384 factors.

Multiples of 12 make their appearance as numbers of factors: 12, 24, 36, 48, 60 (which are the numbers of factors of 5040), 72, 84, 96, 108, 120, but a lack of a 132 breaks that pattern. But then we see: 144, 288, 432, 576, 720, 864, 1008, 1152, and the pattern ends with the lack of a 1296.

We also observe short runs of numbers of factors in the sequence 100, 200, 400, 800, until we reach the end of this table. But the pattern continues with the number 2,095,133,040, which has 1600 factors. Then, 3200 is skipped.

There are also multiples of 200: 200, 400, 600, 800, but the lack of a 1000 breaks that pattern. But when seen as multiples of 400, we get: 400, 800, 1200, 1600, but then 2000 is skipped.

There are also peculiarities in the HCNs themselves. Going from 5040 to as high as 41,902,660,800, only 4 of the 60 HCNs were not multiples of 5040. The rest had the remainder 2520, which is one-half of 5040.

Also beginning from the HCN 720,720, we observe a run of numbers containing 3-digit repeats: 1081080, 1441440, 2162160, 2882880, 3603600, 4324320, 6486480, 7207200, 8648640, 10810800, and 14414400.

Number 2   3   5   7   11  13  17  # of
                                factors
-----------------------------------------------------------------------
5040    4   2   1   1               60  
7560    3   3   1   1               64  
10080   5   2   1   1               72  
15120   4   3   1   1               80  
20160   6   2   1   1               84  
25200   4   2   2   1               90  
27720   3   2   1   1   1           96  
45360   4   4   1   1               100 
50400   5   2   2   1               108 
55440   4   2   1   1   1           120 
83160   3   3   1   1   1           128 
110880  5   2   1   1   1           144 
166320  4   3   1   1   1           160 
221760  6   2   1   1   1           168 
332640  5   3   1   1   1           192 
498960  4   4   1   1   1           200 
554400  5   2   2   1   1           216 
665280  6   3   1   1   1           224 
720720  4   2   1   1   1   1       240 
1081080 3   3   1   1   1   1       256 
1441440 5   2   1   1   1   1       288 
2162160 4   3   1   1   1   1       320 
2882880 6   2   1   1   1   1       336 
3603600 4   2   2   1   1   1       360 
4324320 5   3   1   1   1   1       384 
6486480 4   4   1   1   1   1       400 
7207200 5   2   2   1   1   1       432 
8648640 6   3   1   1   1   1       448 
10810800    4   3   2   1   1   1       480 
14414400    6   2   2   1   1   1       504 
17297280    7   3   1   1   1   1       512 
21621600    5   3   2   1   1   1       576 
32432400    4   4   2   1   1   1       600 
61261200    4   2   2   1   1   1   1   720 
73513440    5   3   1   1   1   1   1   768 
110270160   4   4   1   1   1   1   1   800 
122522400   5   2   2   1   1   1   1   864 
147026880   6   3   1   1   1   1   1   896 
183783600   4   3   2   1   1   1   1   960 
245044800   6   2   2   1   1   1   1   1008    
294053760   7   3   1   1   1   1   1   1024    
367567200   5   3   2   1   1   1   1   1152    
551350800   4   4   2   1   1   1   1   1200    

After that run, we see a 4-digit overlapping repeat. The digits of the HCN 17297280 could be thought of as an overlap of 1728 and 1728 to make 1729728 as part of that number. The 3-digit run continues with: 21621600, 32432400, 61261200, and after that the pattern is broken.

Programmatic Mathematica XV: Lucas Numbers

The Lucas sequence follows the same rules for its generation as the Fibonacci sequence, except that the Lucas sequence begins with t1 = 2 and t2 =1.

Lucas numbers are found in the petal counts of flowing plants and pinecone spirals much the same as the Fibonnaci numbers. Also, like the Fibonacci numbers, successive pairs of Lucas numbers can be divided to make the Golden Ratio, \phi. The Mathematica version (10) which I am using has a way of  highlighting certain numbers that meet certain conditions. One of them is the Framed[] function, which draws a box around numbers. Framed[] can be placed into If[] statements so that an array of numbers can be fed into it (using a Table[] command).

For example, let’s frame all Lucas numbers that are prime:

In[1]:= If[PrimeQ[#], Framed[#], #] & /@ Table[L[n], {n, 0, 30}]

The If[] statement is best described as:

If[Condition[#], do_if_true[#], do_if_false[#]]

The crosshatch # is a positional parameter upon which some condition is placed by some function we are calling Condition[]. This boolean function returns True or False. In the statement we are using above, the function PrimeQ will return true if the number in the positional parameter is prime; false if 1 or composite.

The positional parameters require a source of numbers by which to make computations, so for this source, we shall look to a sequence of Lucas numbers generated by the Table command. The function which generates the numbers is a user-defined function L[n_]:

In[2]:= L[0] := 2
In[3]:= L[1] := 1
In[4]:= L[n_] := L[n-2] + L[n-1]

With that, I can generate an array with the Table[] command to get the first 31 Lucas numbers:

In[5]:= Table[L[n], {n, 0, 30}]
{2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, \
2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, \
271443, 439204, 710647, 1149851, 1860498}

This list (or “table”) of numbers is passed through the If[] statement thusly:

In[6]:= If[PrimeQ[#], Framed[#], #] & /@ Table[L[n], {n, 0, 30}]

to produce the following output:

In[7]:=Array_Frame_Lucas_Prime

Note that this one was an actual screenshot, to get the effect of the boxes. So, these are the first 31 Lucas numbers, with boxes around the prime numbers. The Table[] command appears to feed the Lucas numbers into the positional parameters represented by #.

There was a sequence I created. Maybe it’s already famous; I have no idea. On the other hand, maybe no one cares. But I wanted to show that with any made-up sequence that is recursive in the same way Fibonacci and Lucas numbers were, that I could show, for example, that as the numbers grow, neighbouring numbers can get closer to the Golden Ratio. The Golden Ratio is \phi = \frac{1 + \sqrt{5}}{2}. I want to show that this is not really anything special that would be attributed to Fibonacci or François Lucas. It can be shown that, for any recursive sequence involving the next term being the sum of the previous two terms, sooner or later, you will always approach the Golden Ratio in the same way. It doesn’t matter what your starting numbers are. In Lucas’s sequence, the numbers don’t even have to begin in order. So let’s say I have:

K[0] := 2
K[1] := 5

K[n_] := K[n-2] + K[n-1]

So, just for kicks, I’ll show the first 31 terms:

Table[K[n], {n, 0, 30}]
{2, 5, 7, 12, 19, 31, 50, 81, 131, 212, 343, 555, 898, 1453, 2351, \
3804, 6155, 9959, 16114, 26073, 42187, 68260, 110447, 178707, 289154, \
467861, 757015, 1224876, 1981891, 3206767, 5188658}

Now, let’s output the Golden Ratio to 15 decimals as a reference:

N[GoldenRatio, 15]
1.61803398874989

Now, let’s take the ratio of the last two numbers in my 31-member sequence:

N[K[30]/K[29], 15]
1.61803398874942

You may say that the last two digits are off, but trying against the Fibonacci sequence, the ratio of the 30th and 31st numbers yields merely: 1.61803398874820, off by 3 digits.

For Lucas: 1.61803398875159, off by 4 digits — even worse.

So, my made-up sequence is more accurate for \phi than either Lucas or Fibonacci. I have tried other made-up sequences. Some are more, and some are less accurate. If it depends on the starting numbers, I think some combinations work better, and you won’t necessarily get greater accuracy by starting and ending with larger numbers.

More junk science: the 90-day Accu-weather forecast

Weather forecasting is a black art at the best of times. You can look at the existing weather pattern today, then using probability models based on those weather patterns, forecast tomorrow’s weather. We all know that this only works sometimes over a 5-day period. But now there are people who want to sell services for pinpointing weather conditions on  a daily basis for a 90 day period.

A private company known as AccuWeather is offering the waiting public a 90-day weather forecast, selling to consumers the feeling of control over the distant future. There is not much anyone can say about weather in the long term except that “winter is cold” and “summer is hot”. The rest is all the stuff of farmer’s almanacs and crystal ball gazers. AccuWeather is not telling anyone (at least not yet) how they are able to forecast specific weather conditions on specific days over a 90-day period. But this is what they are doing. So apparently, you can know how to pack your suitcase for that trip to New York 60 days from now, since you will know that on that day there will be 1.5 inches of rain.

This is not that new. AccuWeather already has had a 45-day forecast, and so, according to their press release from April 11, 2016, they are providing a 90-day forecast, driven to “greater challenges” such as this by consumer demand. They claim to be able to forecast on this scale with Superior Accuracy™. (Yes, that phrase is trademarked by AccuWeather).

This forecasting is not endorsed by any existing government weather service, college meteorology department, or university professor that knows anything about forecasting the weather. But I am sure that there are enough gullible people that want that feeling of control who find things like “truth” (the truth that weather is chaotic, and too influenced by “the butterfly effect” to be knowable on this scale) to be inconvenient. AccuWeather probably knows that no one will take this seriously except a small group that just wants that feeling of predictability and control in their lives. And that is what AccuWeather is really selling: your feelings.