login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020664 Lexicographically earliest increasing sequence of positive numbers that contains no arithmetic progression of length 10. 29
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 49, 50, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 81, 82, 83, 84, 85, 88, 89, 96, 97 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

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, 10); # Robert Israel, Jan 04 2016

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: A070698 A243079 A167619 * A055570 A083114 A129350

Adjacent sequences:  A020661 A020662 A020663 * A020665 A020666 A020667

KEYWORD

nonn

AUTHOR

David W. Wilson

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 19:08 EDT 2018. Contains 316427 sequences. (Running on oeis4.)