T W O H U N D R E D A N D F I F T Y O N E
20+23+15+08+21+14+04+18+05+04+01+14+04+06+09+06+20+25+15+14+05 = 251
If you don't include "and" it's more interesting. I don't think there is an answer because the value of a number grows much faster (exponentially) than the value of its gematric sum (linearly), so once you've checked there's no example below some limit (one million is enough), there can't be any examples larger than that. letterToValue = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
.split('')
.reduce( (acc, letter) => { acc[letter] = letter.charCodeAt()-64; return acc; }, {})
getValue = (word) => word.split('')
.map(letter => letter.toUpperCase())
.filter(letter => Object.keys(letterToValue).includes(letter))
.map(letter => letterToValue[letter])
.reduce((acc, val) => acc + val, 0);
['ZERO', 'ONE', 'TWO', 'THREE', 'FOUR', 'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE', 'TEN']
.reduce((acc, word) => { acc[word] = getValue(word); return acc; }, {});
['ZERO', 'ONE', 'TWO', 'THREE', 'FOUR', 'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE',
'TEN', 'ELEVEN', 'TWELVE', 'THIRTEEN', 'FOURTEEN', 'FIFTEEN', 'SIXTEEN', 'SEVENTEEN', 'EIGHTEEN', 'NINETEEN',
'TWENTY', 'TWENTY ONE', 'TWENTY TWO', 'TWENTY THREE', 'TWENTY FOUR', 'TWENTY FIVE', 'TWENTY SIX', 'TWENTY SEVEN', 'TWENTY EIGHT', 'TWENTY NINE',
'THIRTY', 'THIRTY ONE', 'THIRTY TWO', 'THIRTY THREE', 'THIRTY FOUR', 'THIRTY FIVE', 'THIRTY SIX', 'THIRTY SEVEN', 'THIRTY EIGHT', 'THIRTY NINE',
]
.map(word => getValue(word));Python 3:
>>> num_strings = ['Zero', 'One', 'Two', ... 'Seven Hundred Thirty Two' ... ] # I tried 0 to 1000. num_strings generation script sold separately
>>> def find_gematria_matches(values): return [i for i,ns in enumerate(num_strings) if i == sum(values[ord(c)-65] for c in ns.upper() if c.isalpha())]
>>> find_gematria_matches([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]) # "zero-indexed" gematria
[213]
>>> find_gematria_matches([5,20,2,23,13,12,11,3,0,7,17,1,21,24,10,4,16,14,15,9,25,22,8,6,18,19]) # R. Leo Gillis' Trigrammaton Qabalahn
[232, 242]
https://gist.github.com/mminer237/926bc453a9e09b2a2803305c5e...
Even in the millions, few gematria sums get above 800, so it's not as hard to figure out as it seems.
Two numbers are one off, though I won't spoil them here.
There is a match if you include "and" though.