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 A248625 #11 Apr 04 2015 21:46:57 %S A248625 0,0,1,0,0,1,1,3,3,0,0,1,0,0,1,1,3,3,1,3,3,4,4,7,4,4,8,0,0,1,0,0,1,1, %T A248625 3,3,0,0,1,0,0,1,1,3,3,1,3,3,4,4,7,4,4,8,8,3,3,4,4,9,4,4,9,1,9,12,10, %U A248625 9,7,10,12,9,11,9,9,11,9,10,13,19,12,0,0,1,0,0,1,1,3,3 %N A248625 Lexicographically earliest sequence of nonnegative integers such that no triple (a(n),a(n+d),a(n+2d)) is in arithmetic progression, for any d>0, n>=0. %C A248625 The sequence is constructed in the greedy way, appending at each step the least nonnegative integer such that no subsequence of equidistant terms contains an AP. %C A248625 Every nonnegative integer seems to appear in this sequence - see A248627 for the corresponding indices. %C A248625 Sequence A229037 is the analog for positive integers (and indices). %F A248625 a(n) = A229037(n+1)+1. %e A248625 Start with a(0)=a(1)=0, smallest possible choice and trivially satisfying the constraint since no 3-term subsequence is possible. %e A248625 Then one must take a(2)=1 since otherwise [0,0,0] would be an AP. %e A248625 Then one can take again a(3)=a(4)=0, and a(5)=1. %e A248625 Now appending 0 would yield the AP (0,0,0) by extracting terms with indices 0,3,6; therefore a(6)=1. %e A248625 Now a(7) cannot be 0 not 1 nor 2 since else a(3)=0, a(5)=1, a(7)=2 would be an AP, therefore a(7)=3 is the least possible choice. %o A248625 (PARI) [DD(v)=vecextract(v,"^1")-vecextract(v,"^-1"), hasAP(a,m=3)=u=vector(m,i,1);v=vector(m,i,i-1);for(i=1,#a-m+1,for(s=1,(#a-i)\(m-1),#Set(DD(t=vecextract(a,(i)*u+s*v)))==1&&return %o A248625 ([i,s,t])))]; a=[]; for(n=1,90,a=concat(a,0);while(hasAP(a),a[#a]++);print1(a[#a]","));a %Y A248625 Cf. A005836, A005839, A023717, ..., A020664. %Y A248625 Cf. A248627, A229037, A241752. %K A248625 nonn %O A248625 0,8 %A A248625 _M. F. Hasler_, Oct 10 2014