OFFSET
1,1
EXAMPLE
2999 = P(24) + P(38) = P(13) + P(43) = P(9) + P(44), where P(n) is the n-th pentagonal number A000326.
MATHEMATICA
dnpQ[n_]:=Count[IntegerPartitions[n, {2}], _?(AllTrue[(1+Sqrt[1+24#])/6, IntegerQ]&)]==3; Parallelize[Select[Range[30000], dnpQ]] (* or *) Select[Tally[Total/@Subsets[ PolygonalNumber[ 5, Range[200]], {2}]], #[[2]]==3&][[;; , 1]]//Union (* Harvey P. Dale, Jul 20 2023 *)
PROG
(PARI) is(k) = sum(i=1, sqrt(1+12*k)\6, sqrt(1+24*k+12*i-36*i*i)%6==5) == 3; \\ Jinyuan Wang, Mar 06 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Olivier GĂ©rard, Mar 05 2020
STATUS
approved