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”).

Smallest positive number for which the 4th power cannot be written as sum of 4th powers of any subset of previous terms.
5

%I #12 Sep 19 2024 21:57:07

%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,26,27,28,

%T 32,34,36,38,40,42,44,46,48,52,54,56,64,68,72,76,80,84,88,92,96,104,

%U 108,112,128,136,144,152,160,168,176,184,192,208,216,224,256

%N Smallest positive number for which the 4th power cannot be written as sum of 4th powers of any subset of previous terms.

%C a(n)^4 forms a sum-free sequence.

%C It is noteworthy that the terms of this sequence increase slower than those of similar sequences for smaller (A321266, A321290) but also larger powers (A321292, A321293).

%H Bert Dobbelaere, <a href="/A321291/b321291.txt">Table of n, a(n) for n = 1..104</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Sum-free_sequence">Sum-free sequence</a>

%F a(n) = 2 * a(n-12) for n > 25 (conjectured).

%e The smallest number > 0 that is not in the sequence is 15, because

%e 15^4 = 4^4 + 6^4 + 8^4 + 9^4 + 14^4.

%o (Python)

%o def findSum(nopt, tgt, a, smax, pwr):

%o if nopt==0:

%o return [] if tgt==0 else None

%o if tgt<0 or tgt>smax[nopt-1]:

%o return None

%o rv=findSum(nopt-1, tgt - a[nopt-1]**pwr, a, smax, pwr)

%o if rv!=None:

%o rv.append(a[nopt-1])

%o else:

%o rv=findSum(nopt-1, tgt, a, smax, pwr)

%o return rv

%o def A321291(n):

%o POWER=4 ; x=0 ; a=[] ; smax=[] ; sumpwr=0

%o while len(a)<n:

%o while True:

%o x+=1

%o lst=findSum(len(a), x**POWER, a, smax, POWER)

%o if lst==None:

%o break

%o rhs = " + ".join(["%d^%d"%(i, POWER) for i in lst])

%o print(" %d^%d = %s"%(x, POWER, rhs))

%o a.append(x) ; sumpwr+=x**POWER

%o print("a(%d) = %d"%(len(a), x))

%o smax.append(sumpwr)

%o return a[-1]

%Y Other powers: A321266 (2), A321290 (3), A321292 (5), A321293 (6).

%K nonn

%O 1,2

%A _Bert Dobbelaere_, Nov 02 2018