login
A321290
Smallest positive number for which the 3rd power cannot be written as sum of 3rd powers of any subset of previous terms.
5
1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 17, 21, 22, 28, 29, 33, 38, 41, 48, 68, 70, 96, 124, 130, 158, 179, 239, 309, 310, 351, 468, 509, 640, 843, 900, 1251, 1576, 1640, 2305, 2444, 2989, 3410, 4575, 5758, 5998, 7490, 8602, 11657, 13017, 15553, 19150, 24411, 25365
OFFSET
1,2
COMMENTS
a(n)^3 forms a sum-free sequence.
LINKS
EXAMPLE
a(10) = 13. 3rd powers of 14, 15 and 16 can be written as sums of 3rd powers of a subset of the terms {a(1)..a(10)}:
14^3 = 2^3 + 3^3 + 8^3 + 13^3,
15^3 = 4^3 + 5^3 + 7^3 + 8^3 + 10^3 + 11^3,
16^3 = 1^3 + 2^3 + 3^3 + 4^3 + 5^3 + 7^3 + 11^3 + 13^3,
17^3 cannot be written in this way, so a(11) = 17 is the next term.
PROG
(Python)
def findSum(nopt, tgt, a, smax, pwr):
if nopt==0:
return [] if tgt==0 else None
if tgt<0 or tgt>smax[nopt-1]:
return None
rv=findSum(nopt-1, tgt - a[nopt-1]**pwr, a, smax, pwr)
if rv!=None:
rv.append(a[nopt-1])
else:
rv=findSum(nopt-1, tgt, a, smax, pwr)
return rv
def A321290(n):
POWER=3 ; x=0 ; a=[] ; smax=[] ; sumpwr=0
while len(a)<n:
while True:
x+=1
lst=findSum(len(a), x**POWER, a, smax, POWER)
if lst==None:
break
rhs = " + ".join(["%d^%d"%(i, POWER) for i in lst])
print(" %d^%d = %s"%(x, POWER, rhs))
a.append(x) ; sumpwr+=x**POWER
print("a(%d) = %d"%(len(a), x))
smax.append(sumpwr)
return a[-1]
CROSSREFS
Other powers: A321266 (2), A321291 (4), A321292 (5), A321293 (6)
Sequence in context: A277992 A180968 A191847 * A274337 A107912 A190850
KEYWORD
nonn
AUTHOR
Bert Dobbelaere, Nov 02 2018
STATUS
approved