OFFSET
1,1
COMMENTS
Some particularly pleasing prime words and phrases are (with capitals added merely for visual clarity): [discovered by Patrick Devlin, April 2012]
"somePrime" -> 4092274325963
"somePrimeWordSequence" -> 390521469300124399570501784387
"thisIsAGoodExampleOfAPrimePhrase"
-> 1486423446502142057087542429696717235339605927
And some OEIS-themed prime (pseudo-)words and phrases are:
"NJAS" -> 252869
"integers" -> 76851151747
"welcomeToOEIS" -> 2214931257921335609
"theOEISWordPrime" -> 34075123572372820632427
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.
LINKS
C. K. Caldwell, The Prime Lexicon (This is for the related base 36 interpretation as in A038842)
EXAMPLE
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).
MAPLE
# To test if a word w="someword" [all lowercase] corresponds to a prime,
# call isprime(wordToNumber(w)) or ifactor(wordToNumber(w))
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"]:
wordToNumber:=proc(w) local lastLetter, i:
if length(w) = 0 then return 0: end if:
lastLetter := w[length(w)]:
for i to nops(letters) - 1 do if letters[i] = lastLetter then return i + 26*wordToNumber(w[1 .. length(w) - 1]): fi: od:
return 26*wordToNumber(w[1 .. length(w) - 1]):
end proc:
CROSSREFS
KEYWORD
nonn,base,word
AUTHOR
Patrick Devlin, Apr 27 2012
STATUS
approved