login
A340040
Numbers that are the sum of a square s and a cube t such that 0 < s < t.
0
9, 12, 28, 31, 36, 43, 52, 65, 68, 73, 80, 89, 100, 113, 126, 129, 134, 141, 150, 161, 174, 189, 206, 217, 220, 225, 232, 241, 246, 252, 265, 280, 297, 316, 337, 344, 347, 352, 359, 360, 368, 379, 385, 392, 407, 412, 424, 443, 464, 487, 512, 513, 516, 521, 528, 537, 539
OFFSET
1,1
EXAMPLE
28 is in the sequence since 1^2 + 3^3 = 1 + 27 = 28, where 0 < 1 < 27.
MATHEMATICA
Table[If[Sum[(Floor[i^(1/2)] - Floor[(i - 1)^(1/2)]) (Floor[(n - i)^(1/3)] - Floor[(n - i - 1)^(1/3)]), {i, Floor[(n - 1)/2]}] > 0, n, {}], {n, 700}] // Flatten
PROG
(Python)
from itertools import count, takewhile
def aupto(lim):
sqs = list(takewhile(lambda x: x <= lim, (i**2 for i in count(1))))
cbs = list(takewhile(lambda x: x <= lim, (i**3 for i in count(1))))
sms = set(s + t for s in sqs for t in cbs if 0 < s < t and s + t < lim)
return sorted(sms)
print(aupto(540)) # Michael S. Branicky, Sep 12 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Dec 26 2020
STATUS
approved