|
|
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
|
|
|
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)<n:
for let in list(nmb_wrd(A[i])):
new = 1
while (new in A) or (let not in list(nmb_wrd(new))): new += 1
A.append(new)
i += 1
return A[:n]
English_fp(67) # A215693 is English_fp(113, [1, 7, 3])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,word
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|