In my post on February 10 I predicted that there would be a million cases of coronavirus by March 1. It was a simplistic back-of-the-envelope calculation. On the same day, Donald Trump made the prediction, “Now, the virus that we’re talking about having to do — you know, a lot […]
Maxima
a[0]:0; recaman:set(0); recaman_next(n):=block([x:a[n-1]-n], if (x > 0) and not elementp(x, recaman) then ( a[n]:x, recaman:adjoin(x, recaman)) else ( a[n]:a[n-1]+n, recaman:adjoin(a[n], recaman))); for i:1 thru 30 do (recaman_next(i), print(i,"=",a[i])); 1 = 1 2 = 3 3 = 6 4 = 2 5 = 7 6 = 13 7 = 20 8 […]
A very simple number sequence is n(0)=2, n(1)=23, n(2)=235, n(3)=2357, n(4)=235711, n(5)=23571113 where n(i+1) is the i+1 prime concatenated with n(i). So n(1) = concat(2, n(0)) = 23. This is called by many as the Smarandache sequence. Maxima code for this is, smarandache(n):=block([p:0,l:""], for i:0 thru n step 1 do […]
This is an easy calculation, just integrate the gravitational force to get GMm/r where r is the radius of the earth about 6378 km (or 6378*10^3 meters), M is the mass of the earth 5.9736*10^24 kilograms, G is the gravitational constant 6.67*10^(-11), and let us assume that our weight is […]
I created a text file with “just4root” as the contents of the file to look at what the linux command ‘sha1sum’ digests the file — nicks@grant:~$ cat shatest just4root nicks@grant:~$ sha1sum shatest caa707808838ff4c8ac838d08d4e137878aea3ee shatest With maxima, we can again calculated the hash and verify that it checks ok. (%i5) load(stringproc); […]
There are twelve semitones in a music octave, when frequency doubles. Dividing this doubling into twelve equal parts, yields the twelfth root of two. An interesting Maxima problem is to compute its convergents; These values agree with wikipedia and provide some sort of explanation https://en.wikipedia.org/wiki/Twelfth_root_of_two (%i3) 2^(1/12),numer; (%o3) 1.059463094359295 (%i4) cf(%); […]
maxima is constructed as a double layer. Bottom level is lisp, and upper level is maxima. Building ecl. https://common-lisp.net/project/ecl/ Building maxima. git clone https://git.code.sf.net/p/maxima/code maxima-code
One recent cipher option in openSSH is ed25519. This is an Elliptic curve and is used in many public key cryptographic schemes. These curves are polynomials in two variables — (x,y), and of the second degree in y, and of the third degree in x. One can consider the curve […]
1990 bmw 325i limited slip differential S373 they pinion has 11 teeth and the ring has 41 but the gear ratio should be stamped on the pinion cf(3.73); ratsimp(cfdisrep(%)); 373 (%o20) --- 100 (%i21) ratsimp(cf([3, 1, 2, 1, 2, 2, 1])); (%o21) [3, 1, 2, 1, […]