I have a combinatorics problem that I'd like to put on the OEIS—the problem is that I don't have enough terms. This code challenge is to help me compute more terms, and the winner will be the user with the submission containing the greatest number of terms.

The Problem

Suppose I give you a triangular array of light bulbs with side length $n$:

o
o o
o o o
o o o o
o o o o o
o o o o o o
1 2 ... n

I'm going to turn on three lightbulbs that form an "upright" equilateral triangle as in the following example:

o
o x
o o o
o o o o
o x o o x
o o o o o o

Before I turn on the lights, your job is to remove as many lightbulbs as possible from the array—without losing the ability to deduce the triangle of bulbs that has been turned on. To be clear, if a lightbulb has been removed, it is not lit up when its position is turned on.

For example, if you removed the following bulbs (marked by .) you would only see the following two lights turn on (marked by x), which is enough uniquely deduce the third (unlit) position:

I didn't event try to wait for n=9 as it would probably take hours (the number of constraints grows like \$n^6\$). After less than 30 minutes of computation I found out that a(9)=15. I'm leaving my score as n=8 because at the moment the time constraints are unclear, but half an hour is probably too long.

How it works

Take two distinct equilateral triangles \$T_1\$ and \$T_2\$. To avoid ambiguity, there should be at least one bulb on a vertex belonging to exactly one of \$T_1\$ and \$T_2\$.

Thus the question may be rephrased as a SAT problem, with one constraint for every pair of triangles.

PS:
I would very much like to include an example for n=8, but I'm having issues with the SAT solver which apparently wants to keep the solutions all for itself.

Based strongly on Delfad0r's answer, mostly follows the same logic progression by checking triangle pairs and validating the configuration if it contains no triangle pairs that fail this validation. Since I didn't use any libraries besides itertools and copy, I have full control over saving the examples encountered throughout the program.

examples = dict() # stores examples by key pair of n to a tuple with the triangle and number of lights turned off
for n in range(3, 8):
tri = [] # model of the triangle, to be filled with booleans representing lights
tri_points = [] # list of tuples representing points of the triangle
for i in range(n):
tri.append([True]*(i + 1))
for j in range(i+1):
tri_points.append((i, j))
t_set = [] # list of all possible triangles from tri, represented by lists of points
for i in range(n):
for j in range(len(tri[i])):
for k in range(1, n - i):
t_set.append([(i, j), (i + k, j), (i + k, j + k)])
from itertools import combinations
import copy
# validates whether or not a triangle of n lights can have i lights turned off, and saves an example to examples if validated
def tri_validate(x):
candidate_list = list(combinations(tri_points, x))
tri_pairs = list(combinations(t_set, 2))
for candidate in candidate_list:
temp_tri = copy.deepcopy(tri)
valid = False
for point in candidate:
(row, col) = point
temp_tri[row][col] = False
for pair in tri_pairs:
valid = False
(tri1, tri2) = pair
for point in tri1:
if not valid:
if point not in tri2:
(row, col) = point
if temp_tri[row][col]:
valid = True
for point in tri2:
if not valid:
if point not in tri1:
(row, col) = point
if temp_tri[row][col]:
valid = True
if not valid:
break
if valid:
examples[n] = (temp_tri, x)
return True
return False
# iterates up to the point that validation fails, then moves on to the next n
for i in range(len(tri_points)):
if tri_validate(i + 1):
continue
break

Problem is, it's not very efficient. It runs really fast up to n=5, but starts to slow down significantly past that point. At n=6, it takes around a minute to run, and it's much slower at n=7. I imagine there are a lot of efficiency fixes that can be made with this program, but it's a quickly made rough draft of a good solution with a lot more flexibility to check out the inner workings of this method. I'll be incrementally working on this over time.

Your Answer

If this is an answer to a challenge…

…Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.

…Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
Explanations of your answer make it more interesting to read and are very much encouraged.

…Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.

More generally…

…Please make sure to answer the question and provide sufficient detail.

…Avoid asking for help, clarification or responding to other answers (use comments instead).