Hacker News new | ask | show | jobs
by bourgoin 1022 days ago
I really wanted to find an answer for your challenge but it seems there aren't any answers using the regular 1-26 gematria and numbers written in their ordinary English form (without "and"). However, I did find some answers using a "zero-indexed" gematria ranging from 0-25, and with this other English gematria described here on Wikipedia: https://en.wikipedia.org/wiki/English_Qabalah#R._Leo_Gillis'...

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]