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.

A268239 Given an n X n X n grid of points, a(n) is the maximum number of points that can be painted red so that, if any 8 of the red points are chosen, they do not form a cube with sides parallel to the grid.

Original entry on oeis.org

0, 1, 7, 25, 56, 109, 187, 295, 440
Offset: 0

Views

Author

Benoit Cloitre and N. J. A. Sloane, Feb 05 2016

Keywords

Comments

Using a greedy coloring gives a(4) >= 49.

Examples

			For n=3, we may color 25 of the 27 points red (X) without any of 25 red points forming a cube. Color the three slices as follows:
XXX XXX XXX
XXX X.X XXX
XXX XXX xx.
		

Crossrefs

This is a three-dimensional analog of A227133.

Programs

  • Mathematica
    a[n_] := Block[{m, qq, nv = n^3, ne}, qq = Flatten[1 + Table[n^2*z + n*x + y + s*Plus @@@ Tuples[{{0, 1}, {0, n}, {0, n^2}}], {x, 0, n-2}, {y, 0, n-2}, {z, 0, n-2}, {s, Min[n-x, n-y, n-z] - 1}], 3]; ne = Length@ qq; m = Table[0, {ne}, {nv}]; Do[m[[i, qq[[i]]]] = 1, {i, ne}]; Total@ Quiet@ LinearProgramming[ Table[-1, {nv}], m, Table[{7, -1}, {ne}], Table[{0, 1}, {nv}], Integers]]; Table[ a[n], {n, 0, 6}] (* Giovanni Resta, Feb 06 2016 *)

Extensions

a(4)-a(6) from Giovanni Resta, Feb 06 2016
a(7)-a(8) from Paul Tabatabai using integer programming, Sep 27 2018