

A297345


a(0)=0; for n>0, a(n) is the least positive integer that cannot be represented as Sum_{k=1..n1} a(i_k)*a(k), with 0 <= i_k < n.


1



0, 1, 2, 7, 24, 85, 285, 1143, 6268, 216784, 1059813, 6100794, 226303113
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


LINKS

Table of n, a(n) for n=0..12.


EXAMPLE

a(1)= 1 since it is not possible to write 1 using only a(0). a(2)=2, since it is not possible to obtain 2 using only a(0) and a(1). The following numbers up to 6 can be represented using these first 3 elements of the sequence: 3 = 1*1 + 1*2, 4 = 0*1 + 2*2, 5 = 1*1 + 2*2, 6 = 2*1 + 2*2. Again we reach a number that cannot be represented as defined above, so that number is appended to the sequence. It happens here when we try to represent 7 using only a(0)=0, a(1)=1, and a(2)=2. So 7 becomes a(3).
A larger example: 216752 = 1*1 + 1*2 + 85*7 + 285*24 + 85*85 + 85*285 + 24*1143 + 24*6268


MATHEMATICA

Nest[Function[a, Append[a, 1 + LengthWhile[Differences@ #, # == 1 &] &@ Union[Total /@ Map[a # &, Tuples[a, Length@ a]]]]], {0}, 8] (* Michael De Vlieger, Jan 09 2018 *)


PROG

(Python)
# Generate all the elements in the sequence, S, necessary to represent all
# numbers until the integer 'last'. It also shows how each integer is
# represented by showing the sequence elements and the respective
# multiplicative factors.
import numpy as np
import itertools
last=100
def generate(i, S):
n=len(S)
s=np.asarray(S, dtype=np.int)
perms = [p for p in itertools.product(S, repeat=n)]
for iks in perms:
t=np.asarray(iks)
if np.dot(t, s) == i:
print '%d=' %i,
print t, 'x', s
return 0
return 1
S=[0]
for i in range(1, last+1):
if generate(i, S) == 1:
S.append(i)
generate(i, S)


CROSSREFS

Sequence in context: A088854 A000777 A144170 * A052986 A053368 A141753
Adjacent sequences: A297342 A297343 A297344 * A297346 A297347 A297348


KEYWORD

nonn,more,hard


AUTHOR

Luis F.B.A. Alexandre, Dec 28 2017


EXTENSIONS

a(9) from Robert G. Wilson v, Jan 09 2018
a(10)a(11) from Jon E. Schoenfield, Jan 16 2018
a(12) from Giovanni Resta, Jan 22 2018


STATUS

approved



