This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A309890 #65 Sep 12 2023 12:02:09 %S A309890 1,1,2,1,1,2,2,4,4,1,1,2,1,1,2,2,4,4,2,4,4,5,5,8,5,5,9,1,1,2,1,1,2,2, %T A309890 4,4,1,1,2,1,1,2,2,4,4,2,4,4,5,5,8,5,5,9,2,4,4,5,5,10,5,5,10,10,11,13, %U A309890 10,11,10,11,13,10,10,12,13,10,13,11,12,20,11,1,1,2,1,1,2,2,4,4,1,1,2,1,1,2,2,4,4,2 %N A309890 Lexicographically earliest sequence of positive integers without triples in weakly increasing arithmetic progression. %C A309890 Formal definition: lexicographically earliest sequence of positive integers a(n) such that for any i > 0, there is no n > 0 such that 2a(n+i) = a(n) + a(n+2i) AND a(n) <= a(n+i) <= a(n+2i). %C A309890 Sequence suggested by _Richard Stanley_ as a variant of A229037. They differ from the 55th term. The numbers n for which a(n) = 1 are given by A003278, or equally by A005836 (_Richard Stanley_). %C A309890 The sequence defined by c(n) = 1 if a(n) = 1 and otherwise c(n) = 0 is A039966 (although with a different offset). - _N. J. A. Sloane_, Dec 01 2019 %C A309890 Pleasant to listen to (button above) with Instrument no. 13: Marimba (and for better listening, save and convert to MP3). %H A309890 Sébastien Palcoux, <a href="/A309890/b309890.txt">Table of n, a(n) for n = 1..100000</a> %H A309890 Sébastien Palcoux, <a href="https://mathoverflow.net/q/338415">On the first sequence without triple in arithmetic progression</a> (version: 2019-08-21), second part, MathOverflow %H A309890 Sébastien Palcoux, <a href="/A309890/a309890.txt">Table of n, a(n) for n = 1..1000000</a> %H A309890 Sébastien Palcoux, <a href="/A309890/a309890.png">Density plot of the first 1000000 terms</a> %o A309890 (SageMath) %o A309890 # %attach SAGE/ThreeFree.spyx %o A309890 from sage.all import * %o A309890 cpdef ThreeFree(int n): %o A309890 cdef int i,j,k,s,Li,Lj %o A309890 cdef list L,Lb %o A309890 cdef set b %o A309890 L=[1,1] %o A309890 for k in range(2,n): %o A309890 b=set() %o A309890 for i in range(k): %o A309890 if 2*((i+k)/2)==i+k: %o A309890 j=(i+k)/2 %o A309890 Li,Lj=L[i],L[j] %o A309890 s=2*Lj-Li %o A309890 if s>0 and Li<=Lj: %o A309890 b.add(s) %o A309890 if 1 not in b: %o A309890 L.append(1) %o A309890 else: %o A309890 Lb=list(b) %o A309890 Lb.sort() %o A309890 for t in Lb: %o A309890 if t+1 not in b: %o A309890 L.append(t+1) %o A309890 break %o A309890 return L %o A309890 (Python) %o A309890 from itertools import count, islice %o A309890 def A309890_gen(): # generator of terms %o A309890 blist = [] %o A309890 for n in count(0): %o A309890 i, j, b = 1, 1, set() %o A309890 while n-(i<<1) >= 0: %o A309890 x, y = blist[n-2*i], blist[n-i] %o A309890 z = (y<<1)-x %o A309890 if x<=y<=z: %o A309890 b.add(z) %o A309890 while j in b: %o A309890 j += 1 %o A309890 i += 1 %o A309890 blist.append(j) %o A309890 yield j %o A309890 A309890_list = list(islice(A309890_gen(),30)) # _Chai Wah Wu_, Sep 12 2023 %Y A309890 Cf. A003278, A005836, A039966, A229037. %K A309890 nonn,look,easy,hear %O A309890 1,3 %A A309890 _Sébastien Palcoux_, Aug 21 2019