A049525 I is the first, second, eighth, ... letter in this sentence not counting spaces or commas.
1, 2, 8, 19, 25, 41, 51, 56, 61, 66, 71, 76, 81, 86, 91, 103, 115, 120, 126, 131, 137, 142, 148, 164, 178, 201, 222, 238, 243, 259, 307, 323, 351, 367, 405, 410, 432, 446, 451, 494, 510, 515, 532, 555, 588, 615, 631, 636, 652, 664, 680, 691, 700, 712, 723, 734
Offset: 1
Examples
The sentence begins: 1234567890 1234567890 1234567890 1234567890 1234567890 Iisthefirs tsecondeig hthninetee nthtwentyf ifthfortyf irstfiftyf irstfiftys ixthsixtyf irstsixtys ixthsevent yfirstseve ntysixthei ghtyfirste ightysixth ninetyfirs tonehundre dthirdoneh undredfift eenthonehu ndredtwent iethonehun dredtwenty sixthonehu ndredthirt yfirstoneh undredthir tyseventho nehundredf ortysecond onehundred ...
Programs
-
Mathematica
seed="iisthe";s[1]=1;s[2]=2; name[n_]:= StringReplace[IntegerName[n,{"English","Ordinal"}],{"-"->""," "->""}]; s[n_]:=seed=StringJoin[seed<>name[StringPosition[seed,"i"][[n-2,1]]]]; l=s/@Range[56]; Table[StringPosition[Last[l],"i"][[k,1]],{k,1,Length[l]}] (* Ivan N. Ianakiev, Apr 02 2022 *)
-
Python
from num2words import num2words from itertools import islice def n2w(n): os = num2words(n, ordinal=True).replace(" and", "") return os.replace(" ", "").replace("-", "").replace(chr(44), "") def agen(): # generator of terms s, idx = "iisthe", 0 while True: idx_rel = 1 + s.index("i") idx += idx_rel yield idx s = s[idx_rel:] + n2w(idx) print(list(islice(agen(), 56))) # Michael S. Branicky, Apr 02 2022
Extensions
More terms from Robert G. Wilson v, Jul 18 2000
Corrected and extended by Larry Reeves (larryr(AT)acm.org), Nov 02 2000