OFFSET
0,2
COMMENTS
This sequence is nondecreasing.
LINKS
David A. Corneth, Table of n, a(n) for n = 0..10000
Zhi-Wei Sun, On universal sums of polygonal numbers, arXiv:0905.0635 [math.NT], 2009-2015.
FORMULA
EXAMPLE
[n] # solutions
----------------------------------------------------
[0] 1 [(0, 0)]
[1] 2 [(0, 0), (1, 0)]
[2] 3 [(0, 0), (1, 0), (1, 1)]
[3] 3 [(0, 0), (1, 0), (1, 1)]
[4] 4 [(0, 0), (1, 0), (1, 1), (4, 0)]
[5] 5 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1)]
[6] 5 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1)]
[7] 6 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1), (4, 3)]
[8] 6 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1), (4, 3)]
[9] 6 [(0, 0), (1, 0), (1, 1), (4, 0), (4, 1), (4, 3)]
PROG
(Python)
def a(n: int) -> int:
count = 0
for p in range(n + 1):
pv = p * (p + 1) * (p + 2) // 6
if pv > n: break
for t in range(n - p + 1):
tv = t * (t + 1) // 2
if pv + tv <= n and tv <= pv:
count += 1
return count
print([a(n) for n in range(74)]) # Peter Luschny, Jul 10 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jul 03 2025
EXTENSIONS
New name and two terms (n=4 and n=20) corrected by Peter Luschny, Jul 10 2025
STATUS
approved
