You're reading: Travels in a Mathematical World

Prime birthdays via Wolfram|Alpha

Recently on Twitter, Matt Parker (standupmaths) and James Grime (jamesgrime) were having a “nerd slamdown” working out next prime birthdays. This is the next date when the number of days since you were born is a prime. Here’s how to work this out in Wolfram|Alpha.

For the purposes of this example, let’s choose an arbitrary date in the past. Let’s choose 15 April 1707 (Gregorian calendar). No prize but smugness for answering whose birthday that was (if you can’t work it out, you can always ask Wolfram|Alpha “who was born on 15/04/1707?“).

Go to www.wolframalpha.com and enter: “days since 15/04/1707“. The result should look something like:
screenshot of Wolfram|Alpha webpage for query 'days since 15/04/1707'
So our answer is 110805 days. Your birthday is probably somewhat more recent, so the number will be smaller (something like an order of magnitude smaller).

Next ask for “list of primes greater than or equal to 110805“. This gives the start of an infinite list of primes. You can get more by clicking “More”.
screenshot of Wolfram|Alpha webpage for query 'list of primes greater than or equal to 110805'
So we have an answer – 110807 days will be the next prime birthday. We know today is 110805 days since the date, so the next prime birthday is in two days. If you have trouble with working out a date you can ask Wolfram|Alpha that as well. Say you decide to take an interest in the prime 112111, you can ask for “112111 days after 15/04/1707” to discover the date you are looking for is Tuesday, 25 March 2014.

(N.B. If you grow weary of celebrating every prime birthday, why not celebrate just your palindromic prime birthdays. Here’s a list within a reasonable range:

2 3 5 7 11 101 131 151 181 191 313 353 373 383 727 757 787 797 919 929
10301 10501 10601 11311 11411 12421 12721 12821 13331 13831 13931 14341 14741
15451 15551 16061 16361 16561 16661 17471 17971 18181 18481 19391 19891 19991
30103 30203 30403 30703 30803 31013 31513 32323 32423 33533 34543 34843
35053 35153 35353 35753 36263 36563 37273 37573 38083 38183 38783 39293

from World!Of Numbers).

(will not be published)

$\LaTeX$: You can use LaTeX in your comments. e.g. $ e^{\pi i} $ for inline maths; \[ e^{\pi i} \] for display-mode (on its own line) maths.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>