login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers that are the sum of a square s and a cube t such that 0 < s < t.
0

%I #11 Sep 12 2021 12:50:33

%S 9,12,28,31,36,43,52,65,68,73,80,89,100,113,126,129,134,141,150,161,

%T 174,189,206,217,220,225,232,241,246,252,265,280,297,316,337,344,347,

%U 352,359,360,368,379,385,392,407,412,424,443,464,487,512,513,516,521,528,537,539

%N Numbers that are the sum of a square s and a cube t such that 0 < s < t.

%e 28 is in the sequence since 1^2 + 3^3 = 1 + 27 = 28, where 0 < 1 < 27.

%t 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

%o (Python)

%o from itertools import count, takewhile

%o def aupto(lim):

%o sqs = list(takewhile(lambda x: x <= lim, (i**2 for i in count(1))))

%o cbs = list(takewhile(lambda x: x <= lim, (i**3 for i in count(1))))

%o sms = set(s + t for s in sqs for t in cbs if 0 < s < t and s + t < lim)

%o return sorted(sms)

%o print(aupto(540)) # _Michael S. Branicky_, Sep 12 2021

%Y Cf. A000290, A000578, A010052, A010057.

%K nonn

%O 1,1

%A _Wesley Ivan Hurt_, Dec 26 2020