login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213006 Positive numbers that, spelled in English, are as long as the spelling of their digits. 2

%I #27 Apr 03 2023 14:33:36

%S 1,2,3,4,5,6,7,8,9,11,12,13,15,18,1001,1002,1003,1004,1005,1006,1007,

%T 1008,1009,1010,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,

%U 3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,5001,5002,5003,5004,5005,5006,5007,5008,5009,5010,6001,6002,6003

%N Positive numbers that, spelled in English, are as long as the spelling of their digits.

%C _Dan Hoey_ came up with an inequality Spell_Length(n)<=A*n+B (I've forgotten A and B, which are fairly small rationals: equality at two points), that was used to limit the maximum length of a self-enumerating sentence, and thus make an exhaustive search possible. - _R. H. Hardin_, Feb 22 2012

%D Eric Angelini, Posting to Sequence Fans Mailing List, Feb 12 2012

%D Hans Havermann, Posting to Sequence Fans Mailing List, Feb 23 2012

%H Hans Havermann, <a href="/A213006/b213006.txt">Table of n, a(n) for n = 1..10000</a>

%e 11 = eleven (6 letters) = one one (6 letters)

%e 1002 = one thousand two (14 letters) = one zero zero two (14 letters).

%o (Python)

%o from num2words import num2words as n2w

%o m = {"0":4, "1":3, "2":3, "3":5, "4":4, "5":4, "6":3, "7":5, "8":5, "9":4}

%o def dl(n): return sum(m[d] for d in str(n))

%o def wl(n): return sum(1 for c in n2w(n).replace(" and", "") if c.isalpha())

%o def ok(n): return dl(n) == wl(n)

%o print([k for k in range(1, 7000) if ok(k)]) # _Michael S. Branicky_, Apr 03 2023

%K nonn,base,word

%O 1,2

%A _N. J. A. Sloane_, Jun 01 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:06 EDT 2024. Contains 371962 sequences. (Running on oeis4.)