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!)
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. 6
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, 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, 9, 7, 10, 12, 9, 11, 9, 9, 11, 9, 10, 13, 19, 12, 0, 0, 1, 0, 0, 1, 1, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
COMMENTS
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.
Every nonnegative integer seems to appear in this sequence - see A248627 for the corresponding indices.
Sequence A229037 is the analog for positive integers (and indices).
LINKS
FORMULA
a(n) = A229037(n+1)+1.
EXAMPLE
Start with a(0)=a(1)=0, smallest possible choice and trivially satisfying the constraint since no 3-term subsequence is possible.
Then one must take a(2)=1 since otherwise [0,0,0] would be an AP.
Then one can take again a(3)=a(4)=0, and a(5)=1.
Now appending 0 would yield the AP (0,0,0) by extracting terms with indices 0,3,6; therefore a(6)=1.
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.
PROG
(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
([i, s, t])))]; a=[]; for(n=1, 90, a=concat(a, 0); while(hasAP(a), a[#a]++); print1(a[#a]", ")); a
CROSSREFS
Sequence in context: A216805 A167259 A303650 * A000876 A287712 A287784
KEYWORD
nonn
AUTHOR
M. F. Hasler, Oct 10 2014
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 April 19 18:58 EDT 2024. Contains 371798 sequences. (Running on oeis4.)