A321291 Smallest positive number for which the 4th power cannot be written as sum of 4th powers of any subset of previous terms.
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, 32, 34, 36, 38, 40, 42, 44, 46, 48, 52, 54, 56, 64, 68, 72, 76, 80, 84, 88, 92, 96, 104, 108, 112, 128, 136, 144, 152, 160, 168, 176, 184, 192, 208, 216, 224, 256
Offset: 1
Keywords
Examples
The smallest number > 0 that is not in the sequence is 15, because 15^4 = 4^4 + 6^4 + 8^4 + 9^4 + 14^4.
Links
- Bert Dobbelaere, Table of n, a(n) for n = 1..104
- Wikipedia, Sum-free sequence
Programs
-
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 A321291(n): POWER=4 ; x=0 ; a=[] ; smax=[] ; sumpwr=0 while len(a)
Formula
a(n) = 2 * a(n-12) for n > 25 (conjectured).
Comments