OFFSET
2,2
FORMULA
MATHEMATICA
b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n < 1, 1, b[n - 1, s] + If[m*(m + 1)/2 == Length[Union[Flatten[Table[ sn[[i]] + sn[[j]], {i, 1, m}, {j, i + 1, m + 1}]]]], b[n - 1, sn], 0]]];
c[n_, s_] := c[n, s] = Module[{sn, m}, If[n < 1, 1, sn = Append[s, n]; m = Length[sn]; If[m*(m - 1)/2 == Length[Table[sn[[i]] - sn[[j]], {i, 1, m - 1}, {j, i + 1, m}] // Flatten // Union], c[n - 1, sn], 0] + c[n-1, s]]];
Table[Print[n, " ", a[n]]; a[n], {n, 2, 40}] (* Jean-François Alcover, Aug 27 2019, after Alois P. Heinz in A196723 and A143823 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 01 2010
EXTENSIONS
a(15)-a(28) from Nathaniel Johnston, Nov 12 2010
a(29)-a(40) from Andrew Howroyd, Jul 09 2017
STATUS
approved