|
|
A295054
|
|
Solution of the complementary equation a(n) = a(n-1) + a(n-2) + b(1) + b(2) + ... + b(n-1), where a(0) = 1, a(1) = 2, b(0) = 3, and (a(n)) and (b(n)) are increasing complementary sequences.
|
|
2
|
|
|
1, 2, 7, 18, 40, 81, 153, 276, 482, 823, 1383, 2298, 3788, 6209, 10137, 16505, 26821, 43526, 70569, 114340, 185178, 299812, 485310, 785469, 1271154, 2057027, 3328615, 5386107, 8715219, 14101856, 22817639, 36920094, 59738368, 96659134
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
The increasing complementary sequences a() and b() are uniquely determined by the titular equation and initial values. See A295053 for a guide to related sequences.
|
|
LINKS
|
|
|
EXAMPLE
|
a(0) = 1, a(1) = 2, b(0) = 3
b(1) = 4 (least "new number")
a(2) = a(1) + a(0) + b(1) = Complement: (b(n)) = (3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, ...)
|
|
MATHEMATICA
|
mex := First[Complement[Range[1, Max[#1] + 1], #1]] &;
a[0] = 1; a[1] = 2; b[0] = 3;
a[n_] := a[n] = a[n - 1] + a[n - 2] + Sum[b[k], {k, 1, n - 1}];
b[n_] := b[n] = mex[Flatten[Table[Join[{a[n]}, {a[i], b[i]}], {i, 0, n - 1}]]];
Table[a[n], {n, 0, 18}] (* A295054 *)
Table[b[n], {n, 0, 10}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|