
When you're spelling words on your phone keypad, you have to press the same button multiple times to get most of the letters. Like you have to press the "1" button 3 times to get a "c".
When i lived in Matawan, i noticed that you could spell the word "Matawan" on your phone pressing each button only once, right up until the last letter, "n", which was the 6 button twice. I thought, "there's an interesting property of a word".
So, i ran a simple program to figure out all the words that have the property of being easy to spell on the phone keypad.
Here's the script, and the longest few words.
cat words | grep -i '^[a,d,g,j,m,p,t,w]*$' | awk '//{print length($0),$0}' | sort -rn
pawpaw Tampa papaw mamma magma madam gamma adapt Watt watt tamp papa Matt matt mama data damp Dada Adam
If i extend the criteria to include words that are good up until the last letter (like "Matawan"), i get
cat words | grep -i '^[a,d,g,j,m,p,t,w]*.$' | awk '//{print length($0),$0}' | sort -n
Matawan wattage pawpaws pajamas Tampax papaws pampas mammas mammal mammae madman madams madame Jamaal gammas damage Addams adapts
It's surprising to me that Matawan is one of the longest of such words. I really did stumble onto an interesting word.