OFFSET
1,2
COMMENTS
The number of nonnegative numbers k such that A240088(k) = n.
EXAMPLE
a(0) does not exist since all numbers can be represented as the sum of a triangular, square and pentagonal number;
a(1) = 1 because A240088({0}) = 1;
a(2) = 2 because A240088({3, 18}) = 2;
a(3) = 10 because A240088({1, 2, 4, 8, 9, 13, 14, 35, 98, 168}) = 3;
a(4) = 12 because A240088({5, 6, 7, 21, 25, 30, 34, 39, 43, 48, 63, 78}) = 4;
a(5) = 13 because A240088({10, 11, 12, 17, 20, 23, 28, 33, 69, 193, 203, 230, 243}) = 5;
a(6) = 10 because A240088({19, 24, 32, 44, 53, 55, 74, 90, 111, 130}) = 6;
a(7) = 23 because A240088({15, 16, 27, 29, 40, 46, 56, 60, 62, 68, 73, 84, 85, 95, 108, 113, 123, 135, 139, 163, 165, 273, 553}) = 7; etc.
MATHEMATICA
f[n_] := Block[{j, k = 1, lenq, lenr, v = {}, t = PolygonalNumber[3, Range[0, 1 + Sqrt[2 n]]], s = PolygonalNumber[4, Range[0, 1 + Sqrt[n]]], p = PolygonalNumber[5, Range[0, 2 + Sqrt[2 n/3]]]}, u = Select[Union[Join[t, s, p]], # < n + 1 &]; q = IntegerPartitions[n, {3}, u]; lenq = 1 + Length@q; While[k < lenq, j = 1; r = q[[k]]; rr = Permutations@r; lenr = 1 + Length@rr; While[j < lenr, If[ MemberQ[t, rr[[j, 1]]] && MemberQ[s, rr[[j, 2]]] && MemberQ[p, rr[[j, 3]]], AppendTo[v, rr[[j]]]]; j++]; k++]; Length@v];
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Sep 25 2019
STATUS
approved