OFFSET
1,1
EXAMPLE
The four cases for n = 4 are:
o o o o
o o o o X o o X
o o o o X o o o X X o o
o o o o o o o o o X o o o o X o
PROG
(Python)
def solve(cli):
count = 1
for k in range(len(cli)):
x, y, z = cli[k]
clo = []
for c in cli[k+1:]:
if (not x in c) and (not y in c) and (not z in c):
clo.append(c)
count += 2*solve(clo)
return count
def A326611(n):
c0 = []
for x in range(n):
for y in range(x+1, n):
z = n-1-x-y
if z>y: c0.append((x, y, z))
count = solve(c0)
if n%3 == 1:
c1 = [c for c in c0 if not n//3 in c]
count += solve(c1)
return count
# Bert Dobbelaere, May 14 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Andrew Howroyd, Sep 12 2019
EXTENSIONS
More terms from Bert Dobbelaere, May 14 2021
STATUS
approved