login
A327792
a(n) is the greatest nonnegative number which has a partition into a triangular number (A000217), a square number (A000290), and a pentagonal number (A000326) in n different ways.
2
0, 18, 168, 78, 243, 130, 553, 455, 515, 658, 865, 945, 633, 1918, 2258, 1385, 1583, 2828, 2135, 2335, 2785, 4533, 3168, 3478, 2790, 3868, 4193, 7328, 4953, 5278, 6390, 8148, 8015, 4585, 9160, 10485, 7613, 12333, 12025, 10178, 9923, 9720, 12558, 11340, 17420, 11753, 14893, 16155, 16415, 14343, 18053, 19803, 16608, 27283
OFFSET
1,2
COMMENTS
The largest nonnegative number k such that A240088(k) = n.
LINKS
EXAMPLE
a(0) does not exist since all numbers can be represented as the sum of a triangular, square & pentagonal number.
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