OFFSET
1,1
COMMENTS
The increasing complementary sequences a() and b() are uniquely determined by the titular equation and initial value. Let x = (5 - sqrt(5))/2 and y = (5 + sqrt(5))/2. Let r = y - 2 = golden ratio (A001622). It appears that
2 - r <= n*x - a(n) < r and 2 - r < b(n) - n*y < r for all n >= 1.
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 1, so b(1) = 5 - a(1) = 4. In order for a() and b() to be increasing and complementary, we have a(2) = 2, a(3) = 3, a(4) = 5, etc.
MATHEMATICA
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
u = 5; v = 5; z = 220;
c = {v}; a = {1}; b = {Last[c] - Last[a]};
Do[AppendTo[a, mex[Flatten[{a, b}], Last[a]]];
AppendTo[c, u Length[c] + v];
AppendTo[b, Last[c] - Last[a]], {z}];
c = Flatten[Position[Differences[a], 2]];
a (* A305847 *)
b (* A305848 *)
c (* A305849 *)
(* Peter J. C. Moses, May 30 2018 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 11 2018
STATUS
approved