A262942 Sequence of positive integers where each is chosen to be as small as possible subject to the conditions that no three terms a(j), a(j+k), a(j+2*k) (for any j and k) form an arithmetic progression (in any order) and that no term repeats.
1, 2, 4, 5, 8, 3, 7, 6, 10, 11, 14, 9, 16, 12, 13, 19, 15, 18, 20, 21, 26, 17, 22, 24, 25, 27, 31, 28, 23, 32, 29, 34, 37, 38, 40, 41, 35, 30, 42, 46, 47, 54, 36, 33, 45, 43, 49, 39, 48, 50, 55, 52, 53, 44, 59, 57, 51, 60, 56, 61, 62, 67, 58, 69, 64, 72, 66, 68, 76, 71, 73, 77, 65, 75, 63, 88, 89, 80, 78, 74, 83, 79, 70, 90, 94, 82, 81, 84, 85, 91, 87, 101
Offset: 1
Keywords
Examples
For n = 4, 3 is not available because {a(2)=2, 3, a(3)=4} form an arithmetic progression, 1,2,4 are already used, so a(4) = 5. - _Robert Israel_, Nov 15 2015
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
A229037 has a very similar definition, but a totally different graph.
Programs
-
Maple
N:= 1000: # to get all terms before the first > N V:= Vector(N): S:= Vector(N): firstav:= 1; for n from 1 to N do forbid:= {seq(op([2*V[k]-V[2*k-n], 2*V[2*k-n]-V[k],(V[k]+V[2*k-n])/2]),k=ceil((n+1)/2)..n-1)}; for v from firstav to N do if S[v] <> 0 and v = firstav then firstav:= v+1 fi; if S[v] = 0 and not member(v, forbid) then V[n]:= v; S[v]:= 1; break fi od; if v > N then break fi; od: seq(V[i],i=1..n-1); # Robert Israel, Nov 15 2015
Extensions
Added more terms from b-file. - N. J. A. Sloane, Nov 26 2015
Comments