login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A266728 Stanley sequence S_5(0,3). 3

%I #20 Jun 06 2024 12:29:17

%S 0,3,4,5,6,8,9,10,11,13,14,15,16,18,19,21,25,28,29,30,31,33,34,35,36,

%T 38,39,40,41,43,44,46,50,53,54,55,56,58,59,60,61,63,64,65,66,68,69,71,

%U 75,78,79,80,81,83,84,85,86,88,89,90,91,93,94,96,125,128,129,130

%N Stanley sequence S_5(0,3).

%C Lexicographic first increasing sequence with a(0) = 0, a(1) = 3 and for all n > 1, {a(0), ..., a(n)} does not contain 5 terms in arithmetic progression.

%H R. A. Moy and D. Rolnick, <a href="http://arxiv.org/abs/1502.06013">Novel structures in Stanley sequences</a>, Discrete Math., 339 (2016), 689-698. Also arXiv:1502.06013 [math.CO], 2015.

%H A. M. Odlyzko and R. P. Stanley, <a href="http://www-math.mit.edu/~rstan/papers/od.pdf">Some curious sequences constructed with the greedy algorithm</a>, 1978.

%o (PARI) A266728(n,show=1,L=5,v=[0,3],D=v->v[2..-1]-v[1..-2])={ while(#v<=n, show&&print1(v[#v]","); v=concat(v,v[#v]); while(v[#v]++, forvec(i=vector(L,j,[if(j<L,j,#v),#v]),#Set(D(vecextract(v,i)))>1||next(2),2);break));v[n+1]} \\ _M. F. Hasler_, Jan 18 2016

%Y Cf. A005836, A188053, A266727.

%Y Cf. A185256 = S_3(0,3) = S(0,3), A267650 = S_4(0,3).

%K nonn

%O 0,2

%A _N. J. A. Sloane_, Jan 04 2016

%E More terms from _M. F. Hasler_, Jan 18 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 25 23:06 EDT 2024. Contains 374615 sequences. (Running on oeis4.)