Blog Archives

Narcissus prime

This morning Futility Closet posted the following. Repeat the string 1808010808 1560 times, and tack on a 1 the end. The resulting 15601-digit number is prime, and because it’s a palindrome made up of the digits 1, 8, and 0,

Tagged with: ,
Posted in Math

Words that are primes base 36

This morning on Twitter, Alexander Bogomolny posted a link to his article that gives examples of words that are prime numbers when interpreted as numbers in base 36. Some examples are “Brooklyn”, “paleontologist”, and “deodorant.” (Numbers in base 36 are

Tagged with: , ,
Posted in Math

Sonnet primes

The previous post showed how to list all limerick primes. This post shows how to list all sonnet primes. These are primes of the form ababcdcdefefgg, the rhyme scheme of an English (Shakespearean) sonnet, where the letters a through g

Tagged with: ,
Posted in Math

Rosenbrock’s banana function

Rosenbrock’s banana function is a famous test case for optimization software. It’s called the banana function because of its curved contours. The definition of the function is The function has a global minimum at (1, 1). If an optimization method

Tagged with: , ,
Posted in Math

Replacing Mathematica with Python

Everything I do regularly in Mathematica can be done in Python. Even though Mathematica has a mind-boggling amount of functionality, I only use a tiny proportion of it. I skimmed through some of my Mathematica files to see what functions

Tagged with: , ,
Posted in Python

Regular expressions in Mathematica

Regular expressions are fairly portable. There are two main flavors of regular expressions — POSIX and Perl — and more languages these days use the Perl flavor. There are some minor differences in what it means to be “like Perl”

Tagged with: ,
Posted in Uncategorized

Distributions in Mathematica and R/S-PLUS

I posted some notes this evening on working with probability distributions in Mathematica and R/S-PLUS. I much prefer Mathematica’s syntax. The first time I had to read some R code I ran across a statement something like runif(1, 3, 4).

Tagged with: , ,
Posted in Computing

Languages that are easy to pick back up

Some programming languages are much easier to come back to than others. In my previous post I mentioned that Mathematica is easy to come back to, put Perl is not. I found it easy to come back LaTeX after not

Tagged with: , , , ,
Posted in Python, Software development

Mathematica turns 20

Mathematica was first released June 23, 1988. I started using Mathematica not long after it came out and used it for a few years. Then for several years after that I didn’t touch it. When I began using Mathematica again

Tagged with:
Posted in Computing