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!)
A261147 English flagpole sequence of nonnegative integers (like A215693, but with a(1)=0). 1

%I

%S 0,1,3,2,4,7,5,8,13,14,9,10,12,20,21,15,22,24,23,6,11,17,16,18,25,19,

%T 27,26,28,29,38,30,31,32,33,34,35,36,37,39,41,40,42,44,43,45,47,48,49,

%U 51,46,57,53,50,55,59,52,62,58,111,65,61,54,72,63,67,56

%N English flagpole sequence of nonnegative integers (like A215693, but with a(1)=0).

%C Concatenate the spelling of the terms in English (ignoring "and", punctuation, capitalization, and spaces); the i-th letter of this infinite word is in a(i). This is the lexicographically least such sequence of distinct nonnegative integers. A215693 is the lexicographically least such sequence of distinct positive integers.

%C In the first 100000 terms: the records for a(n)-n are set by a(1)=0, a(3)=3, a(6)=7, a(9)=13, a(14)=20, a(31)=38, a(60)=111, a(119)=211, a(18617)=18711; the records for n-a(n) are set by a(1)=0, a(4)=2, a(20)=6, a(335)=319.

%H Danny Rorabaugh, <a href="/A261147/b261147.txt">Table of n, a(n) for n = 1..3000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/English_numerals">English numerals</a>

%H Hans Havermann, <a href="/A261147/a261147.txt">List of a(n) for n = 1..100000</a>

%e The sequence begins: 0,1,3,2,4,7,5,8,13....

%e The initial terms are spelled: ZERO;ONE;THREE;TWO;....

%e These letters are found in the spelling of the initial terms: Zero, onE, thRee, twO; fOur, seveN, fivE; eighT, tHirteen, ....

%o (Sage)

%o little = {0:"", 1:"one", 2:"two", 3:"three", 4:"four", 5:"five", 6:"six", 7:"seven", 8:"eight", 9:"nine", 10:"ten", 11:"eleven", 12:"twelve", 13:"thirteen", 14:"fourteen", 15:"fifteen", 16:"sixteen", 17:"seventeen", 18:"eighteen", 19:"nineteen"}

%o decade = {2:"twenty", 3:"thirty", 4:"forty", 5:"fifty", 6:"sixty", 7:"seventy", 8:"eighty", 9:"ninety"}

%o illion = {1:"thousand", 2:"million", 3:"billion", 4:"trillion"}

%o def nmb_wrd(n): # For positive integers n<10^15

%o if n<20: return little[n]

%o if n<100: return decade[floor(n/10)] + little[n%10]

%o if n<1000: return little[floor(n/100)] + "hundred" + nmb_wrd(n%100)

%o k = floor((len(str(n))-1)/3)

%o return nmb_wrd(floor(n/10^(3*k))) + illion[k] + nmb_wrd(n%(10^(3*k)))

%o def English_fp(n, A = [0,1,3,2], i = 1):

%o while len(A)<n:

%o for let in list(nmb_wrd(A[i])):

%o new = 1

%o while (new in A) or (let not in list(nmb_wrd(new))): new += 1

%o A.append(new)

%o i += 1

%o return A[:n]

%o English_fp(67) # A215693 is English_fp(113, [1,7,3])

%Y Cf. A215693.

%K nonn,word

%O 1,3

%A _Danny Rorabaugh_, Nov 28 2015

%E Corrected by _Danny Rorabaugh_, Nov 29 2015

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 18 11:57 EST 2022. Contains 350455 sequences. (Running on oeis4.)