login
A152112
Number of increasing initial sequences of bases of order 3.
2
1, 1, 3, 13, 86, 760, 8518
OFFSET
1,3
COMMENTS
Using the terminology of A008932, call a set A a basis of order h if every number can be written as the sum of h (not necessarily distinct) elements of A. Call a basis an increasing basis of order h if its elements are arranged in increasing order, a0<a1<a2<...
Consider the set of all initial subsequences of any length {a0, a1, a2, ..., an} of all the increasing bases. These can be ordered in lexicographic order, giving, for h = 3:
0
0,1
0,1,2
0,1,3
0,1,4
MATHEMATICA
f[A_]:=
(AAA={};
For [ii=1, ii<=Length[A], ii++,
For[jj=1, jj<=Length[A], jj++,
For [kk=1, kk<=Length[A], kk++,
AAA=Union[AAA, {A[[ii]]+A[[jj]]+A[[kk]]}]]]];
For[ii=1, ii<=Length[AAA], ii++,
If[ii==Length[AAA], max=ii-1];
If[AAA[[ii]]>ii-1, max=ii-2; Break[]]]);
index=1;
seq[1]={0, 1};
rindex=1;
newindex=1;
For[k=1, k<=5, k++,
jbegin=rindex; jend=index;
For[j=jbegin, j<=jend, j++,
f[seq[j]];
For[i=Max[seq[j]]+1, i<=max+1, i++, index++; seq[index]=Append[seq[rindex], i]
]; rindex=rindex+1;
]]
For[i=1, i<=index, i++, Print[i, " ", seq[i]]] (* David S. Newman, Dec 29 2014 *)
CROSSREFS
Sequence in context: A354436 A157451 A188204 * A167810 A331646 A054420
KEYWORD
nonn,more
AUTHOR
David S. Newman, Mar 22 2009
EXTENSIONS
a(6)-a(7) from David S. Newman, Dec 29 2014
STATUS
approved