cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A182380 Primes whose base 26 representation (using a=1, b=2, ..., y=25, z=0) form English words or phrases.

This page as a plain text file.
%I A182380 #17 Feb 21 2014 01:05:28
%S A182380 31,53,61,67,109,149,157,197,223,313,347,353,359,379,409,421,503,509,
%T A182380 521,613,691,743,859,863,929,1049,1097,1163,1181,1201,1249,1487,1489,
%U A182380 1601,2281,2437,2441,2521,2579,2741,2753
%N A182380 Primes whose base 26 representation (using a=1, b=2, ..., y=25, z=0) form English words or phrases.
%C A182380 Some particularly pleasing prime words and phrases are (with capitals added merely for visual clarity): [discovered by _Patrick Devlin_, April 2012]
%C A182380    "somePrime" -> 4092274325963
%C A182380    "somePrimeWordSequence" -> 390521469300124399570501784387
%C A182380    "thisIsAGoodExampleOfAPrimePhrase"
%C A182380      -> 1486423446502142057087542429696717235339605927
%C A182380   And some OEIS-themed prime (pseudo-)words and phrases are:
%C A182380    "NJAS" -> 252869
%C A182380    "integers" -> 76851151747
%C A182380    "welcomeToOEIS" -> 2214931257921335609
%C A182380    "theOEISWordPrime" -> 34075123572372820632427
%C A182380 Let w be any phrase (e.g., w could be Homer's Iliad, or w could be the unabridged concatenation of all of Shakespeare's works). Then Dirichlet's theorem on arithmetic progressions implies that if the last letter of w is relatively prime to 26, then there are infinitely many primes whose final digits base 26 are exactly w.  There is no guarantee, however, that these primes would be prime phrases since there is essentially no control over how the beginnings of these base 26 representations would look.
%H A182380 C. K. Caldwell, <a href="http://www.utm.edu/research/primes/notes/words.html">The Prime Lexicon</a> (This is for the related base 36 interpretation as in A038842)
%e A182380 The English word "beg" becomes 2*26^2 + 5*26 + 7 = 1489, which is prime, so 1489 is in the sequence.  Similarly, "bee" becomes 1487, which is also prime (thus, "bee" and "beg" are the first 'twin prime words' in this sequence).
%p A182380 # To test if a word  w="someword" [all lowercase]  corresponds to a prime,
%p A182380 # call isprime(wordToNumber(w))  or  ifactor(wordToNumber(w))
%p A182380 letters:=["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]:
%p A182380 wordToNumber:=proc(w) local lastLetter, i:
%p A182380     if length(w) = 0 then return 0: end if:
%p A182380     lastLetter := w[length(w)]:
%p A182380     for i to nops(letters) - 1 do if letters[i] = lastLetter then return i + 26*wordToNumber(w[1 .. length(w) - 1]): fi: od:
%p A182380     return 26*wordToNumber(w[1 .. length(w) - 1]):
%p A182380 end proc:
%Y A182380 Cf. A038842 (base 36 version), A072922.
%K A182380 nonn,base,word
%O A182380 1,1
%A A182380 _Patrick Devlin_, Apr 27 2012