Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Sep 23 2023 03:11:09
%S 1,4,6,8,11,14,16,19,21,24,26,28,31,34,36,38,41,44,46,48,51,54,56,59,
%T 61,64,66,68,71,74,76,79,81,84,86,88,91,94,96,99,101,104,106,108,111,
%U 114,116,118,121,124,126,128,131,134,136,139,141,144,146,148,151,154,156
%N Pair the natural numbers such that the m-th pair is (r, s) where r, s and s-r are the smallest numbers which have not occurred earlier and also are not equal to the difference of any earlier pair: (1, 3), (4, 9), (6, 13), (8, 18), (11, 23), (14, 29), (16, 33), (19, 39), (21, 43), (24, 49), (26, 53), (28, 58), ... Sequence gives first term of each pair.
%C Most of the pairs are of the form (r,2r+1) except for the ones like a(4) = (8,18) and a(12) = (28,58) and (38,78) etc. which are of the form (r,2r +2).
%H Clark Kimberling, <a href="/A075325/b075325.txt">Table of n, a(n) for n = 1..10000</a>
%F Let A(n) = A007814(n). Let B(n) = A(n) + 1 if A(n) < 2; B(n) = 0 if A(n)>=2 & A(n) is even; B(n) = 2 if A(n) >= 2 & A(n) is odd. Then a(n) = (5n+B(n)-4)/2. - John Chew (jjchew(AT)math.utoronto.ca), Jun 20 2006
%e The first pair (1, 3) covers 1, 2, 3. The second pair is (4, 9) covering 4, 5, 9.
%t (* Here, the offset for (a(n)) is 0. *)
%t z = 200;
%t mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
%t a = {}; b = {}; c = {};
%t Do[AppendTo[a,
%t mex[Flatten[{a, b, c}], If[Length[a] == 0, 1, Last[a]]]];
%t AppendTo[b, mex[Flatten[{a, b, c}], Last[a]]];
%t AppendTo[c, Last[a] + Last[b]], {z}];
%t Take[a, 100] (* A075325 *)
%t Take[b, 100] (* A047215 *)
%t Take[c, 100] (* A075326 *)
%t Grid[{Join[{"n"}, Range[0, 20]], Join[{"a(n)"}, Take[a, 21]],
%t Join[{"b(n)"}, Take[b, 21]], Join[{"c(n)"}, Take[c, 21]]},
%t Alignment -> ".",
%t Dividers -> {{2 -> Red, -1 -> Blue}, {2 -> Red, -1 -> Blue}}]
%t (* _Peter J. C. Moses_, Apr 26 2018 *)
%o (PARI) used = vector(500); i = 1; A = vector(80); B = A; C = A; for (n = 1, 80, while (used[i], i++); j = i + 1; while (used[j] || used [i + j], j++); A[n] = i; B[n] = i + j; C[n] = i + i + j; used[i] = 1; used[j] = 1; used[i + j] = 1); A \\ _David Wasserman_, Jan 16 2005
%Y Cf. A007814, A075326, A075327.
%Y The sequence formed by listing the differences between the second and first elements of each pair is A047215.
%K nonn
%O 1,2
%A _Amarnath Murthy_, Sep 16 2002
%E More terms from _David Wasserman_, Jan 16 2005