Whether a total order set of size $n$ has the fewest endomorphisms among posets of size $n$
@Martin Rubey: Recursion works better: rel ={{1, 1}, {1, 2}, {1, 10}, {2, 2}, {3, 2}, {3, 3}, {3, 4}, {4, 4}, {5, 4}, {5, 5}, {5, 6}, {6, 6}, {7, 6}, {7, 7}, {7, 8}, {8, 8}, {9, 8}, {9, 9}, {9, 10}, {10, 10}}; max = Max[rel]; Do[down[i] = Select[rel, Max[#] == i &], {i, max}]; checkdown[f_List] := AllTrue[down[Length[f]], MemberQ[rel, f[[#1]]] &]; num[{}] := Sum[num[{i}], {i, max}]; num[f_List] := If[checkdown[f],If[Length[f] == max,1,Sum[num[Append[f, i]], {i, max}]],0]; num[{}] gives 10030.