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!)
A005837 Lexicographically earliest increasing sequence of positive numbers that contains no 4-term arithmetic progression.
(Formerly M0621)
19
1, 2, 3, 5, 6, 8, 9, 10, 15, 16, 17, 19, 26, 27, 29, 30, 31, 34, 37, 49, 50, 51, 53, 54, 56, 57, 58, 63, 65, 66, 67, 80, 87, 88, 89, 91, 94, 99, 102, 105, 106, 109, 110, 111, 122, 126, 136, 145, 149, 151, 152, 160, 163, 167, 169, 170, 171, 174, 176, 177, 183, 187, 188, 194, 196 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = A005839(n) + 1. - Alois P. Heinz, Jan 31 2014
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Alois P. Heinz and Robert Israel, Table of n, a(n) for n = 1..10000 (n = 1..1001 from Alois P. Heinz)
J. L. Gerver and L. T. Ramsey, Sets of integers with no long arithmetic progressions generated by the greedy algorithm, Math. Comp., 33 (1979), 1353-1359.
MAPLE
Noap:= proc(N, m)
# N terms of earliest increasing seq with no m-term arithmetic progression
local A, forbid, n, c, ds, j;
A:= Vector(N):
A[1..m-1]:= <($1..m-1)>:
forbid:= {m}:
for n from m to N do
c:= min({$A[n-1]+1..max(max(forbid)+1, A[n-1]+1)} minus forbid);
A[n]:= c;
ds:= convert(map(t -> c-t, A[m-2..n-1]), set);
for j from m-2 to 2 by -1 do
ds:= ds intersect convert(map(t -> (c-t)/j, A[m-j-1..n-j]), set);
if ds = {} then break fi;
od;
forbid:= select(`>`, forbid, c) union map(`+`, ds, c);
od:
convert(A, list)
end proc:
Noap(100, 4); # Robert Israel, Jan 04 2016
MATHEMATICA
t = {1, 2, 3}; Do[s = Table[Append[i, n], {i, Subsets[t, {3}]}]; If[! MemberQ[Table[Differences[i, 2], {i, s}], {0, 0}], AppendTo[t, n]], {n, 4, 200}]; t (* T. D. Noe, Apr 17 2014 *)
CROSSREFS
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
3-term AP: A005836 (>=0), A003278 (>0);
4-term AP: A005839 (>=0), A005837 (>0);
5-term AP: A020654 (>=0), A020655 (>0);
6-term AP: A020656 (>=0), A005838 (>0);
7-term AP: A020657 (>=0), A020658 (>0);
8-term AP: A020659 (>=0), A020660 (>0);
9-term AP: A020661 (>=0), A020662 (>0);
10-term AP: A020663 (>=0), A020664 (>0).
Sequence in context: A190842 A273106 A191179 * A214980 A098161 A026194
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by M. F. Hasler, Jan 03 2016. Further edited (with new offset) by N. J. A. Sloane, Jan 04 2016
STATUS
approved

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 May 3 17:26 EDT 2024. Contains 372222 sequences. (Running on oeis4.)