login
A373391
Integers whose American English names (minus punctuation) can be split into two parts wherein the product of the letter-ranks of one part is equal to that of the other.
0
3960, 13986, 15368, 80547, 85740, 111789, 111987, 386048, 408649, 408946, 410699, 410969, 410996, 486014, 519487, 519784, 609408, 609804, 615430, 619814, 629428, 629824, 639438, 639834, 649448, 649844, 659458, 659854, 669468, 669864, 679478, 679874
OFFSET
1,1
COMMENTS
By letter-rank we mean a=1, b=2, ..., z=26. If the qualifying split happens beside a letter "a" (as for 408649) there will be two solutions, as moving that "a" to the other side of the split will not affect either product.
There can be no terms involving "million" less than 10^60 ("novemdecillion") since "m" = 13 would otherwise have no counterpart to make the product of all valuations square. - Michael S. Branicky, Jun 03 2024
Similarly, there can be no terms involving "quadrillion" less than 10^18 because "q" = 17. a(84)=1000107588, a(10887)=1000000611455. - Hans Havermann, Jun 15 2024
EXAMPLE
3960 = threethousandni|nehundredsixty has the product of the letter-ranks of each side of the vertical pipe equal (to 486491443200000).
PROG
(Python)
from math import prod, isqrt
from num2words import num2words
def n2w(n): return "".join(c for c in num2words(n).replace(" and", "") if c.isalpha())
def ok(n):
d = [ord(c) - ord('A') + 1 for c in n2w(n).upper()]
if isqrt(s:=prod(d))**2 != s: return False
return any(prod(d[:i]) == prod(d[i:]) for i in range(1, len(d)))
print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Jun 03 2024
(Python)
from math import prod, isqrt
from num2words import num2words
def n2w(n):
return "".join(c for c in num2words(n).replace(" and", "") if c.isalpha())
def ok(n):
d = [ord(c) - ord("A") + 1 for c in n2w(n).upper()]
pr = prod(d)
s = isqrt(pr)
if s**2 != pr:
return False
p = 1
for i in range(len(d)):
p *= d[i]
if p > s:
return False
if p == s:
return True
for n in range(1, 100000):
if ok(n):
print(n, end=", ")
# David A. Corneth, Jun 03 2024, adapted from Michael S. Branicky, Jun 03 2024
CROSSREFS
Cf. A372222.
Sequence in context: A230617 A250531 A319800 * A034599 A007038 A222783
KEYWORD
nonn,base,word
AUTHOR
Hans Havermann, Jun 03 2024
STATUS
approved