OFFSET
1,1
COMMENTS
C. F. Gauss proved that all positive integers can be expressed as the sum of three triangular numbers. However, Zhi-Wei Sun (2009) has shown that there are 95 candidates for universal triples. This sequence looks at the {p4, p5, p6} triples and ask which integers require all three members to satisfy the sum.
Obviously, a(n) cannot be either a square, a pentagonal number, nor a hexagonal number.
There are more terms less than some integer in A020757 than in this sequence. In a sense, a square plus a pentagonal plus a hexagonal number is more efficient than the sum of three triangular numbers.
Number of terms less than 2^k: 0, 1, 1, 2, 2, 7, 18, 42, 90, 195, 411, 852, 1828, 3808, 7922, 16455, 34069, 70221, 144388, 296140, 607631, 1243014, 2541264, 5188590, 10582932, 21560211, 43885475, 89256834, 181404148, 368418480, ..., .
Number of terms less than 10^k: 2, 14, 187, 2279, 25667, 281899, 3045604, 32457145, 342587592, ..., .
a(n) =~ 5.14 n^(.97).
LINKS
Zhi-Wei Sun, On universal sums of polygonal numbers, arXiv:0905.0635 [math.NT], 2009-2015.
EXAMPLE
7 is not in the sequence since the third hexagonal number 6 plus the second square or pentagonal number sum to 7;
8 is in the sequence because s = {0, 1, 4}, p = {0, 1, 5}, and h = {0, 1, 6} with no two sets having members which sum to 8.
MATHEMATICA
planeFiguratePi[r_, n_] := Floor[((r -4) +Sqrt[(r -4)^2 + 8n (r -2)])/(2 (r - 2))];
h = Table[PolygonalNumber[6, n], {n, 0, planeFiguratePi[6, 500]}];
p = Table[PolygonalNumber[5, n], {n, 0, planeFiguratePi[5, 500]}];
s = Table[PolygonalNumber[4, n], {n, 0, planeFiguratePi[4, 500]}];
Complement[ Range@ 500, Flatten[{Outer[Plus, h, p], Outer[Plus, h, s], Outer[Plus, p, s]} ]]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Aug 07 2024
STATUS
approved