login

Revision History for A159451

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of numbers less than n, that are contained in n written as English number names.
(history; published version)
#11 by Michael De Vlieger at Tue Feb 13 08:13:48 EST 2024
STATUS

reviewed

approved

#10 by Michel Marcus at Tue Feb 13 07:20:16 EST 2024
STATUS

proposed

reviewed

#9 by Michel Marcus at Tue Feb 13 07:20:12 EST 2024
STATUS

editing

proposed

#8 by Michel Marcus at Tue Feb 13 07:20:09 EST 2024
LINKS

R. Reinhard Zumkeller, <a href="/A159451/b159451.txt">Table of n, a(n) for n = 0..10000</a>

STATUS

reviewed

editing

#7 by Joerg Arndt at Tue Feb 13 07:16:18 EST 2024
STATUS

proposed

reviewed

#6 by Michael S. Branicky at Tue Feb 13 07:13:22 EST 2024
STATUS

editing

proposed

#5 by Michael S. Branicky at Tue Feb 13 06:31:46 EST 2024
CROSSREFS
#4 by Michael S. Branicky at Tue Feb 13 06:26:01 EST 2024
EXAMPLE

n = 19 -> nineteen: a(19) = #{nine} = 1;

n = 20 -> twenty: a(20) = #{} = 0;

n = 21 -> twentyone: a(21) = #{one, twenty} = 2.

PROG

(Python)

from num2words import num2words

from functools import cache

@cache

def n2w(n):

map = {ord(c): None for c in "-, "}

return num2words(n).replace(" and", "").translate(map)

def a(n): wn = n2w(n); return sum(1 for i in range(n) if n2w(i) in wn)

print([a(n) for n in range(105)]) # Michael S. Branicky, Feb 13 2024

CROSSREFS
STATUS

approved

editing

Discussion
Tue Feb 13
06:26
Michael S. Branicky: I confirm entire b-file.
#3 by Russ Cox at Fri Mar 30 18:51:04 EDT 2012
AUTHOR

_Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), _, Apr 12 2009

Discussion
Fri Mar 30
18:51
OEIS Server: https://oeis.org/edit/global/246
#2 by N. J. A. Sloane at Thu Nov 11 07:34:06 EST 2010
LINKS

R. Zumkeller, <a href="/A159451/b159451.txt">Table of n, a(n) for n = 0..10000</a>

Robert G. Wilson v, <a href="/A000027/a000027.txt">English names for the numbers from 0 to 11159 without spaces or hyphens</a>

KEYWORD

nonn,word,new