cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A283438 The largest possible size of a set in F_3^n, free of three-term arithmetic progressions with the difference in {0,1}^n.

Original entry on oeis.org

1, 2, 6, 14, 36
Offset: 0

Views

Author

Vsevolod F. Lev, Mar 07 2017

Keywords

Comments

102 <= a(5) <= 108. - Robert Israel, Mar 10 2017

Examples

			a(0) = 1: {()}.
a(1) = 2: {(0), (1)}.
a(2) = 6: {(0,0), (0,2), (1,1), (1,2), (2,0), (2,1)}.
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)}.
		

Programs

  • PARI
    \\ This code is for demonstration only, it is far too slow for computation!
    ok(v)=vecmax(lift(v))<2
    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
    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

Extensions

a(4) from Robert Israel, Mar 07 2017