%I #6 Apr 11 2018 09:03:50
%S 2,3,22,27,32,37,42,47,52,57,62,67,72,77,82,87,92,97,102,109,117,122,
%T 127,134,142,147,152,159,167,172,177,184,192,197,202,209,217,222,227,
%U 234,242,247,252,259,267,272,277,284,292,297,302
%N a(n) = a(0)*b(n) + a(1)*b(n-1), where a(0) = 2, a(1) = 3, b(0) = 1; b(1) = 4 ; b(2) = 5.
%C The increasing complementary sequences a() and b() are uniquely determined by the titular equation and initial values. See A297830 for a guide to related sequences.
%H Clark Kimberling, <a href="/A298470/b298470.txt">Table of n, a(n) for n = 0..1000</a>
%e a(2) = 2*5 + 3*4 = 22.
%t mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
%t aCoeffs = {2, 3}; bCoeffs = {1, 4, 5};
%t Table[a[n - 1] = #[[n]], {n, Length[#]}] &[aCoeffs];
%t Table[b[n - 1] = #[[n]], {n, Length[#]}] &[bCoeffs];
%t a[n_] := Hold[Sum[a[z] b[n - z], {z, 0, Length[aCoeffs] - 1}]]
%t Table[{a[z] = ReleaseHold[a[z]], b[z + 1] =
%t mex[Join[Table[a[n], {n, 0, z}], Table[b[n], {n, 0, z}]], 1]}, {z,
%t Length[aCoeffs], 1000}];
%t Table[a[n], {n, 0, 50}] (* A298470 *)
%t Table[b[n], {n, 0, 50}] (* complement *)
%t (* _Peter J. C. Moses_, Jan 19 2018 *)
%Y Cf. A298338, A298295.
%K nonn,easy
%O 0,1
%A _Clark Kimberling_, Feb 11 2018
|