The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 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
 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, 27, 26, 28, 29, 38, 30, 31, 32, 33, 34, 35, 36, 37, 39, 41, 40, 42, 44, 43, 45, 47, 48, 49, 51, 46, 57, 53, 50, 55, 59, 52, 62, 58, 111, 65, 61, 54, 72, 63, 67, 56 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS 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. 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. LINKS Danny Rorabaugh, Table of n, a(n) for n = 1..3000 Wikipedia, English numerals Hans Havermann, List of a(n) for n = 1..100000 EXAMPLE The sequence begins: 0,1,3,2,4,7,5,8,13.... The initial terms are spelled: ZERO;ONE;THREE;TWO;.... These letters are found in the spelling of the initial terms: Zero, onE, thRee, twO; fOur, seveN, fivE; eighT, tHirteen, .... PROG (Sage) 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"} decade = {2:"twenty", 3:"thirty", 4:"forty", 5:"fifty", 6:"sixty", 7:"seventy", 8:"eighty", 9:"ninety"} illion = {1:"thousand", 2:"million", 3:"billion", 4:"trillion"} def nmb_wrd(n): # For positive integers n<10^15     if n<20: return little[n]     if n<100: return decade[floor(n/10)] + little[n%10]     if n<1000: return little[floor(n/100)] + "hundred" + nmb_wrd(n%100)     k = floor((len(str(n))-1)/3)     return nmb_wrd(floor(n/10^(3*k))) + illion[k] + nmb_wrd(n%(10^(3*k))) def English_fp(n, A = [0, 1, 3, 2], i = 1):     while len(A)

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.

Last modified December 7 18:19 EST 2021. Contains 349585 sequences. (Running on oeis4.)