Recreational mathematics: "stringy" primes

32 views
Skip to first unread message

Juuso Alasuutari

unread,
Jan 16, 2026, 10:47:44 AM (4 days ago) Jan 16
to seq...@googlegroups.com
Good location-dependent time of day everyone. I'm new to this group, and very much a programmer instead of mathematically inclined, so please excuse any potential fumbling, misuse of terninology, and so on.

Is there any place here for discussing a meaningless and arbitrary definition for a certain set of prime pairs? Specifically:

- take a natural language word in ASCII,
- read the bytes as if they were the raw data of an integer value,
- do the above in both little-endian and big-endian byte order,
- observe that both of these integers are in fact prime numbers,
- decide to name such prime pairs "stringy" primes, because "stringy" is one such word.

Again, my apologies if this isn't on-topic or entertaining.

Juuso Alasuutari

David Radcliffe

unread,
Jan 16, 2026, 11:53:40 AM (4 days ago) Jan 16
to seq...@googlegroups.com
The main problem with this sort of sequence is that "natural language word" is not well-defined. One would have to choose a particular word list, and there is no canonical choice.

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/72ee4cb4-0ba7-4084-b23d-9bb56bc36c9b%40gmail.com.

Dave Consiglio

unread,
Jan 16, 2026, 11:57:41 AM (4 days ago) Jan 16
to seq...@googlegroups.com
Perhaps the names of prime numbers that are 'stringy'? 

Also, when I convert 'stringy' to ASCII I get 115 116 114 105 110 103 121, and 115116114105110103121 is not prime. Am I misunderstanding you?

Daniel Mondot

unread,
Jan 16, 2026, 12:59:35 PM (4 days ago) Jan 16
to seq...@googlegroups.com
I think he meant:
115*256^0 + 116*256^1 + 114*256^2 + 105*256^3 + 110*256^4 + 103*256^5 + 121*256^6 = 34172196095161459,
and
115*256^6 + 116*256^5 + 114*256^4 + 105*256^3 + 110*256^2 + 103*256^1 + 121*256^0 = 32497657065662329,
both primes

M F Hasler

unread,
Jan 16, 2026, 2:22:44 PM (4 days ago) Jan 16
to seq...@googlegroups.com
On Fri, Jan 16, 2026, 12:57 Dave Consiglio <dave...@gmail.com> wrote:
Perhaps the names of prime numbers that are 'stringy'? 

Also, when I convert 'stringy' to ASCII I get 115 116 114 105 110 103 121, and 115116114105110103121 is not prime. Am I misunderstanding you?

Big and little endian means that you consider the bytes as digits in base 256.

While the name of a prime is ambiguous, the number associated to a string isn't, 
for a given "encoding" like ANSI or iso-latin1 or UTF-8. (All of these are supersets of ASCII, 
so the choice is irrelevant as long as we restrict ourselves to words over the alphabet [A-Za-z].

So actually, rather than stringy primes, the notion of prime strings(or words) could make sense, too.
Say a word is ANSI prime if its ANSI representation, considered as base-256 representation of a number, is prime (maybe: in both directions).
Then we can make the list of all ANSI prime words, e.g. over the alphabet [A-Z] :

prime_words(length, alphabet=[65..90])={
   forvec(w=vector(length ,i,[65,90]), isprime(fromdigits(w,256)) && isprime(fromdigits(Vecrev(w),256)) && print1(Strchr(w)", "))}

for(L=1,4, prime_words(L)
C, G, I, O, S, Y, /* for example, I = 73 */
EI, ES, GQ, IE, KY, MY, QG, SE, YK, YM, /* e.g., MY = 859 | 967 */ 
ABS, ADO, AHY, AIO, AKM, ALI, AMU, AOI, APE, APO, APW, AQQ, ARA, ARU, AVK, AVU, AWA, AYE, AYK, CBK, CCS, CEC, CFM, CHC, CKK, CKQ, CMC, CNC, CNE, CNQ, CSC, CUG, CUK, CUQ, CVO, CYC, CYU, CZU, EAS, EBM, EEY, EFE, EGG, EIE, EJE, EJS, ELQ, ENC, ENM, EOE, EPA, EQY, EUE, EXK, EYA, GEG, GEW, GGE, GIY, GLU, GQG, GUC, GUI, GVK, GXS, GZS, 
IAI, IDI, IDM, IHQ, IJO, IKU, ILA, IMI, IOA, IOW, IQI, ITW, IUG, IZI, KBC, KBU, KCK, KEY, KGQ, KJK, KKC, KKM, KNY, KOK, KSS, KTY, KUC, KUQ, KVA, KVG, KVK, KXE, KYA, MAU, MBE, MDI, MES, MFC, MHM, MKA, MKK, MLY, MNE, MOM, MQQ, MSW, MTS, OAU, OAY, ODA, OIA, OJI, OLQ, OPA, OQO, OSO, OSY, OTO, OVC, QBY, QGK, QHI, QHS, QKC, QLE, QLO, QNC, QQA, QQM, QUC, QUK, QVQ, QZU, SAE, SBA, SBS, SCC, SCY, SEM, SHQ, SIS, SJE, SKS, SNS, SSK, STM, SUS, SXG, SZG, UAM, UAO, UBK, UBU, UJY, UKI, ULG, UMA, URA, UTU, UVA, UYC, UZC, UZQ, WEG, WMW, WOI, WOW, WPA, WSM, WTI, WUW, WXW, WYW, YAO, YBQ, YCS, YEE, YEK, YEY, YHA, YIG, YIY, YJU, YLM, YNK, YNY, YQE, YSO, YTK, YTY, YZY, 
AAWQ, AAYC, ABOS, ABWA, ACDQ, ACRC, ACVQ, ACZO, ADPY, ADRS, ADSC, AESU, AETQ, AEZE, AFAS, AFAW, AFCU, AFLW, AFQA, AFSE, AFSY, AFTA, AFWU, AGAS, AGAU, AGFQ, AGGY, AGNW, AGVM, AGVY, AGYI, AGZU, AHBG, AHCC, AHCO, AHOA, AHSC, AISS, AIWY, AIZG, AJCQ, AJHK, AJIK, AJMG, AJOA, AJPA, AKOI, AKPW, ALOO, ALVQ, ALWU, AMOM, AMSY, AMTC, ANAI, ANDW, ANTA, ANWG, ANXC, AOBS, AODY, AOFI, AOHA, AOIC, AOIE, AOJA, AOOU, AORI, APAM, APCK, APGM, APJA, APKW, APNQ, APOM, APPM, APPY, APQU, APWC, APWW, AQBG, AQDW, AQFA, AQIM, AQKQ, AQPU, AQQW, AQSO, AQYC, ARBG, ARDM, ARJG, ARSM, ARXW, ASBU, ASQE, ASSG, ASTQ, ASVO, ATBG, ATBQ, ATFA, ATNA, ATNM, ATVW, ATYQ, AUBC, AUBS, AUEU, AUFO, AUHY, AUJK, AUKM, AURU, AUUI, AUUO, AUVM, AVDC, AVEW, AVHQ, AVNW, AVSO, AVVU, AVXA, AWAO, AWBA, AWLY, AWPW, AWSE, AWWE, AXAQ, AXBO, AXEO, AXHC, AXJM, AXJQ, AXKO, AXRI, AXVA, AXYA, AYFM, AYJO, AYPI, AYSY, AYTQ, AYXA, AZDK, AZIU, AZJE, AZWG, ...

It is funny that the first three ASCII prime words (over [A-Z]) of the English language are : I, MY, APE (= 7369 | 7765).
Note that (due to the "reverse" property), all these prime words can only start and end with every second letter of the alphabet:
A, C, E, G, ..., W, Y.

PS: Since ASCII is in principle a 7-bit encoding, it could make sense to consider the ASCII representation as base-128 digits. 
Also, one might look at A-Z encoded as 1..26, considered as base-32 digits,
or [A-Za-z] encoded as 1..52 (similar to Base64, up to offset) considered as base-64 digits.
As an alternative to the "odd letter bias" mentioned earlier, 
one could also consider the Base64 encoding starting at 0
(then prime words could only end with B, D, F, H, J, ...)

- Maximilian

Arthur O'Dwyer

unread,
Jan 16, 2026, 2:23:47 PM (4 days ago) Jan 16
to seq...@googlegroups.com, Juuso Alasuutari
On Fri, Jan 16, 2026 at 10:47 AM Juuso Alasuutari <juuso.al...@gmail.com> wrote:
Good location-dependent time of day everyone. I'm new to this group, and very much a programmer instead of mathematically inclined, so please excuse any potential fumbling, misuse of terninology, and so on.

Is there any place here for discussing a meaningless and arbitrary definition for a certain set of prime pairs? Specifically:
- take a natural language word in ASCII,
- read the bytes as if they were the raw data of an integer value,
- do the above in both little-endian and big-endian byte order,
- observe that both of these integers are in fact prime numbers,
- decide to name such prime pairs "stringy" primes, because "stringy" is one such word.

From a math point of view, this is unsatisfying because it involves not one but two "arbitrary dictionary" steps: first, the definition of "natural language word" (e.g. presumably you'd say IDLER is such a word but ADLER isn't, and it's not clear how to formalize that distinction); and secondly the definition of "ASCII" (i.e. the mapping that tells us that "A" should map to 0x41 instead of, say, 0x2A, which is easy to formalize but it's not clear why a mathematician would choose that mapping over any other).  In programming terms, both of these steps involve magic numbers; the algorithm would be more elegant if it didn't involve magic numbers.

From a programming point of view, this is unsatisfying because it involves the arbitrary choice of prime numbers as the "interestingness" property. Why should a programmer care about primes, and not, say, odd numbers, or abundant numbers, or Fibonacci numbers, or valid RSA keys, or numbers whose SHA256 hash ends in 0000, or whatever?  It's also unsatisfying because the algorithm is case-sensitive: the words "stringy" and "I" are stringy, but "STRINGY" and "i" are not stringy.

It's also somewhat unsatisfying because primality depends on oddness. We can see right away that no word beginning or ending with B, D, F, H, J, L, N, P, R, T, V, X, or Z can ever be stringy. It would be more aesthetically pleasing if stringiness were not so trivially dependent on the word's initial and final letters.

(Addendum — A more charitable way to put this, I guess, is that this is a somewhat interesting property of strings, perhaps suitable for a challenge on the Code Golf StackExchange ("Write a short function that tells whether a given string is stringy"), but it doesn't suggest a sequence at all.)

According to a Python program I just whipped up, the Wordle-target-wordlist words that are stringy by your definition are:

omega study witty

CLOVE CURVE GULLY OVATE QUARK QUOTE SLATE SLAVE STICK STORE UNITY USAGE WISPY WRUNG

Mucky Slick Snipe


And the Wordle-allowed-wordlist words (see "Wordle-like games require two word lists") that are stringy by your definition are:

abacs acmes airns anana ayres casky chivs chivy coble eaves elpee emyde galea gales gamas gawcy geats glibs grads gynae kangs khoum kyats manty miche mingy moira mvule ooses ousts ovoli sents skols soare stade staig sulus waney wilts wonky yests

AEGIS APPUI AREPA ASWAY AYGRE CABRE CAKES CERIC CHAPS CLIME COMAS COWLS CUSPY ELVES EREVS ETAPE ETICS EXIES GALLY GOURA GRANS GROVY IMPIS KENTS MAURI OBANG OUPAS SCLIM SENSI SIDES SMEKE SOPHS SUNNS WAKES WAMUS WANTS WARES WUSHU

Abaya Adoze Alane Argus Askoi Carbs Casas Casus Chave Chirk Claes Cuffo Emove Gapes Genom Gilas Goafs Goary Grigs Kacha Khets Kibei Knive Kophs Mazey Meeds Meffs Mengs Miaow Milpa Moles Motis Ostia Qorma Quine Salmi Scads Seems Skyey Stoae Waifs Walis Wanze Yowls


The longest such words in my /usr/dict/words are

ARISTOCRATICALNESS

Chlorophylliferous

Sulphoterephthalic

Underconsciousness


A sampling of notable crosswordese entries with this property: MATHEMATICALLY, MULTIMILLIONAIRE, ULTRADEMOCRATIC, WORLDCUPWINNERS, Quixotically, saracenic, stratocirrus, meteorologically, unphilanthropic, ectoplasm, eightscore, adenopharyngitis, edmundburke, scudmissile, sliceoflife, gulfofnaples, spacecapsule, wildcatstrike, aquartertonine.

Rather than "stringy," one might say that these words/strings' ASCII representations are all "bi-endian primes."

In one sense, looking at primes does seem satisfying (if arbitrarily chosen): primes are just common enough that the first two word lists above are non-empty, without being clumsily large. On the other hand I doubt there exist any "bi-endian Fibonacci numbers." There are only like 8-or-fewer Fibonacci numbers of a given byte-length at all, so the chance of one of those coincidentally being a byte-reversal of another must be pretty vanishingly low. (Except trivially: the first 12 Fibonacci numbers are their own byte-reversal because they're all only one byte in length.)
Looking at weird numbers might be equally satisfying, but then the frequency of weird numbers seems to be pretty closely related to the frequency of primes.
I initially assumed that the density of abundant numbers would be about 50%, but it turns out the natural density of abundant numbers is only about 25%. Still, that means I'd expect about (25% squared =) 6% of the dictionary to be "bi-endian abundant numbers" — whereas (by empirical calculation) only about 0.12% of the dictionary is "bi-endian prime numbers."

Cheers,
Arthur

Charles Greathouse

unread,
Jan 16, 2026, 2:25:27 PM (4 days ago) Jan 16
to seq...@googlegroups.com
A trivial observation: only words starting and ending with acegikmoqsuwy are candidates.

Tom Duff

unread,
Jan 16, 2026, 2:32:49 PM (4 days ago) Jan 16
to seq...@googlegroups.com
Yes, the what constitutes a word is an elastic concept. But there is a largish group of people who agree on a list of English words, the players of tournament Scrabble. (Almost: North American Scrabble players use a different list than the rest of the world.) In any case, the (non-NA) list is known as Sowpods and I have searched it for stringy primes of length up to 8 letters. The complete list of 228 words is

a        abacs    ablings  academy  acmes    afaras   afforces aggadic  

agrypnia aia      aidance  airns    ala      alberts  alfa     allegro  

allonym  allovers altering amie     analcime anana    anatas   ancone   

angerly  apocarpy appetize arrobas  aspirate asyndeta aua      ave      

ayres    cabbagy  cadets   callee   caloyers canals   capoeira casky    

cattails cawkers  cesiums  chalehs  chalice  chargers chay     chirre   

chivs    chivving chivy    chocking coble    comperes coxless  cris     

crooves  croute   cycloses eaves    echidna  edgeless eggnogs  elpee    

eme      emyde    encrusts ennages  enoughs  entopic  epiclike epigene  

ergs     erotemes ethe     evitate  extine   eyre     galea    gales    

gamas    garlic   gau      gawcy    geats    genappes germins  gharry   

gig      gillers  gisarmes glacials glibs    gloams   grads    grazings 

guying   gynae    idents   impede   injury   inklings inquere  issuable 

issues   kadi     kak      kangs    keddahs  kenotic  kerving  kettle   

khoum    kons     kopeks   kuchcha  kyats    kyboshes mace     manty    

marcels  masseurs matins   maxi     measure  meddlers melamdim miche    

midspace ming     mingy    mis      mishmees mismeets missis   mitching 

mittens  mnas     moby     moira    morisco  mose     mourns   mudeyes  

mustards mvule    omega    ono      ooses    orca     oubits   oulakans 

ousts    outkills ovoli    qi       quinoa   sagenite saltings saprobes 

sasines  sative   satoris  savagery scatts   scog     sculks   scurfs   

seaside  sememes  sempre   sents    shamas   shayas   shufti   sim      

sirocco  situses  skelps   skols    slishes  snoods   snugness soare    

soignee  sokens   speaning stade    stades   staig    stembuck straying 

stringy  striving strokes  struck   study    subucula sucrase  sulus    

swounds  syngamic ulosis   ultradry umbonic  unce     unmellow unshuts  

unthaws  uraris   urbane   waddlers waney    waning   warhable warpaths 

waspie   whae     whaling  whences  wilts    wishbone witty    wonky    

yests    yipe     yowleys  yuke     yulans


(Sowpods doesn't contain one-letter words because they're not Scrabble-legal. I added 'a' by hand.)
I'm running the 9+ letter words now (they're about half the list) but my program is very slow. In any case, it hasn't found any in the couple of hours its been running.
BTW, sowpods has 267753 words, 114577 of which are 8 letters or shorter.

Dave Consiglio

unread,
Jan 16, 2026, 7:50:15 PM (4 days ago) Jan 16
to seq...@googlegroups.com
How about using just the names of prime numbers (lower case) that are "stringy'? That should eliminate the "is it a word" issue.

Lucas Brown

unread,
Jan 16, 2026, 8:39:07 PM (4 days ago) Jan 16
to seq...@googlegroups.com
This does not quite resolve the issue: there is no canonical function from numbers to words.  Even within the English language, there is some dispute about how very large numbers should be textified—see https://en.wikipedia.org/wiki/Names_of_large_numbers for further details.

—Lucas A. Brown

Reply all
Reply to author
Forward
0 new messages