OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A005589(A000040(n)) or a(n) = A052360(A000040(n)) depending on whether hyphens and spaces are excluded or included. - Jonathan Vos Post, Oct 19 2007
a(n) = A005589(A000040(n)) since it does not count spaces or hyphens. - Michael S. Branicky, Jul 12 2022
EXAMPLE
a(13) = 8 because 'forty-one' contains 8 letters (not counting the hyphen).
PROG
(Python)
from sympy import nextprime
from itertools import count, islice
from num2words import num2words as n2w
def f(n): return sum(1 for c in n2w(n).replace(" and", "") if c.isalpha())
def agen(p=2):
while True: yield f(p); p = nextprime(p)
print(list(islice(agen(), 68))) # Michael S. Branicky, Jul 12 2022
CROSSREFS
KEYWORD
easy,nice,nonn,word
AUTHOR
EXTENSIONS
a(66) and beyond from Michael S. Branicky, Jul 12 2022
STATUS
approved