This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A321293 #11 Sep 19 2024 21:56:59 %S A321293 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,26,27, %T A321293 29,30,31,33,34,42,43,51,57,60,61,71,74,88,91,99,112,116,117,132,152, %U A321293 153,176,203,228,244,256,281,293,345,392,439,441,529,594,627 %N A321293 Smallest positive number for which the 6th power cannot be written as sum of distinct 6th powers of any subset of previous terms. %C A321293 a(n)^6 forms a sum-free sequence. %H A321293 Bert Dobbelaere, <a href="/A321293/b321293.txt">Table of n, a(n) for n = 1..150</a> %H A321293 Wikipedia, <a href="https://en.wikipedia.org/wiki/Sum-free_sequence">Sum-free sequence</a> %e A321293 The smallest number > 0 that is not in the sequence is 25, because 25^6 = 1^6 + 2^6 + 3^6 + 5^6 + 6^6 + 7^6 + 8^6 + 9^6 + 10^6 + 12^6 + 13^6 + 15^6 + 16^6 + 17^6 + 18^6 + 23^6. %o A321293 (Python) %o A321293 def findSum(nopt, tgt, a, smax, pwr): %o A321293 if nopt==0: %o A321293 return [] if tgt==0 else None %o A321293 if tgt<0 or tgt>smax[nopt-1]: %o A321293 return None %o A321293 rv=findSum(nopt-1, tgt - a[nopt-1]**pwr, a, smax, pwr) %o A321293 if rv!=None: %o A321293 rv.append(a[nopt-1]) %o A321293 else: %o A321293 rv=findSum(nopt-1, tgt, a, smax, pwr) %o A321293 return rv %o A321293 def A321293(n): %o A321293 POWER=6 ; x=0 ; a=[] ; smax=[] ; sumpwr=0 %o A321293 while len(a)<n: %o A321293 while True: %o A321293 x+=1 %o A321293 lst=findSum(len(a), x**POWER, a, smax, POWER) %o A321293 if lst==None: %o A321293 break %o A321293 rhs = " + ".join(["%d^%d"%(i, POWER) for i in lst]) %o A321293 print(" %d^%d = %s"%(x, POWER, rhs)) %o A321293 a.append(x) ; sumpwr+=x**POWER %o A321293 print("a(%d) = %d"%(len(a), x)) %o A321293 smax.append(sumpwr) %o A321293 return a[-1] %Y A321293 Other powers: A321266 (2), A321290 (3), A321291 (4), A321292 (5). %K A321293 nonn %O A321293 1,2 %A A321293 _Bert Dobbelaere_, Nov 02 2018