Hacker News new | past | comments | ask | show | jobs | submit login

I propose the following challenge: find the smallest integer number that, when written in English words, equals the sum of it's letters (following gematria rules i.e. A=1, B=2 etc).



   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.


Maybe you'll find some with the scheme "x score and y" =)


I don't want to write out all of the written-out numbers, but I wrote some code:

    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));


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]


No number does, at least by the usual way of writing them.

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.


I was bored and played around with various letter numbering schemes, like reversed order, or digits of Pi (or E), or the value of the letter multiplied by how many times it appears in the string and so on, and so forth. I got bored eventually, but it is a great fun (for certain minds, I guess, but still).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: