A354523 Number of distinct letters in the English word for n that can also be found in the English word for n+1.
2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 2, 4, 4, 4, 4, 3, 4, 3, 5, 6, 5, 6, 6, 6, 6, 5, 6, 3, 5, 6, 5, 5, 6, 5, 6, 6, 6, 3, 5, 5, 5, 5, 5, 6, 6, 6, 7, 4, 4, 5, 4, 5, 4, 4, 5, 5, 5, 3, 5, 6, 5, 6, 6, 5, 5, 6, 6, 5, 6, 7, 6, 7, 7, 7, 6, 6, 7, 4, 6, 7, 6, 7, 7, 6, 7, 6, 6, 5, 5, 6, 5, 6, 6, 5, 6, 5, 5, 2, 7
Offset: 0
Examples
a(0) = 2 since the letters 'e' and 'o' in 'zero' can also be found in 'one'. a(11)= 3 since the letters 'e', 'l' and 'v' in 'eleven' can also be found in 'twelve'.
Programs
-
Mathematica
a[n_]:= Length[Intersection[Characters[IntegerName[n]], Characters[IntegerName[n+1]], CharacterRange["a","z"]]]; Array[a,101,0] (* Stefano Spezia, Aug 19 2022 *)
-
Python
from num2words import num2words as n2w def b(n): return set(c for c in n2w(n).replace(" and", "") if c.isalpha()) def a(n): return len(b(n) & b(n+1)) print([a(n) for n in range(101)]) # Michael S. Branicky, Aug 19 2022
Comments