login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A321292 Smallest positive number for which the 5th power cannot be written as sum of distinct 5th powers of any subset of previous terms. 5
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 25, 26, 27, 28, 30, 37, 43, 44, 55, 57, 64, 77, 82, 90, 97, 112, 116, 119, 154, 156, 178, 202, 227, 269, 309, 335, 371, 397, 442, 516, 604, 643, 722, 774, 815, 1000, 1115, 1308, 1503 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n)^5 forms a sum-free sequence.

LINKS

Bert Dobbelaere, Table of n, a(n) for n = 1..150

Wikipedia, Sum-free sequence

EXAMPLE

The smallest number > 0 that is not in the sequence is 12, because

12^5 = 4^5 + 5^5 + 6^5 + 7^5 + 9^5 + 11^5.

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 A321292(n):

....POWER=5 ; 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), A321290 (3), A321291 (4), A321293 (6).

Sequence in context: A035332 A318536 A048991 * A131881 A053460 A304678

Adjacent sequences:  A321289 A321290 A321291 * A321293 A321294 A321295

KEYWORD

nonn

AUTHOR

Bert Dobbelaere, Nov 02 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 19 17:25 EDT 2021. Contains 345144 sequences. (Running on oeis4.)