%I #24 Mar 13 2017 04:21:47
%S 1,2,6,14,36
%N The largest possible size of a set in F_3^n, free of three-term arithmetic progressions with the difference in {0,1}^n.
%C 102 <= a(5) <= 108. - _Robert Israel_, Mar 10 2017
%H Robert Israel, <a href="/A283438/a283438_1.txt">Set of size 36 for n=4</a>
%H Robert Israel, <a href="/A283438/a283438_2.txt">Set of size 102 for n=5</a>
%e a(0) = 1: {()}.
%e a(1) = 2: {(0), (1)}.
%e a(2) = 6: {(0,0), (0,2), (1,1), (1,2), (2,0), (2,1)}.
%e a(3) = 14: {(0,0,0), (0,0,2), (0,2,0), (0,2,2), (1,0,1), (1,0,2), (1,1,0), (1,1,1), (1,2,0), (1,2,2), (2,0,0), (2,0,1), (2,1,0), (2,1,1)}.
%o (PARI) \\ This code is for demonstration only, it is far too slow for computation!
%o ok(v)=vecmax(lift(v))<2
%o has(v)=my(t); for(i=1,#v, for(j=1,#v, if(i==j,next); for(k=1,#v, if(i==k||j==k,next); t=v[i]-v[j]; if(v[j]-v[k]==t && ok(t), return(0))))); 1
%o a(n)=my(N=3^n,v=vector(N,i,digits(N+i-1,3)[2..n+1]),u,r,t);for(i=0,2^N-1, u=Mod(vecextract(v,i),3); if(has(u), t=hammingweight(i); if(t>r, r=t))); r \\ _Charles R Greathouse IV_, Mar 07 2017
%K nonn,more,hard
%O 0,2
%A _Vsevolod F. Lev_, Mar 07 2017
%E a(4) from _Robert Israel_, Mar 07 2017