|
|
A075325
|
|
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.
|
|
4
|
|
|
1, 4, 6, 8, 11, 14, 16, 19, 21, 24, 26, 28, 31, 34, 36, 38, 41, 44, 46, 48, 51, 54, 56, 59, 61, 64, 66, 68, 71, 74, 76, 79, 81, 84, 86, 88, 91, 94, 96, 99, 101, 104, 106, 108, 111, 114, 116, 118, 121, 124, 126, 128, 131, 134, 136, 139, 141, 144, 146, 148, 151, 154, 156
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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).
|
|
LINKS
|
|
|
FORMULA
|
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
|
|
EXAMPLE
|
The first pair (1, 3) covers 1, 2, 3. The second pair is (4, 9) covering 4, 5, 9.
|
|
MATHEMATICA
|
(* Here, the offset for (a(n)) is 0. *)
z = 200;
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
a = {}; b = {}; c = {};
Do[AppendTo[a,
mex[Flatten[{a, b, c}], If[Length[a] == 0, 1, Last[a]]]];
AppendTo[b, mex[Flatten[{a, b, c}], Last[a]]];
AppendTo[c, Last[a] + Last[b]], {z}];
Grid[{Join[{"n"}, Range[0, 20]], Join[{"a(n)"}, Take[a, 21]],
Join[{"b(n)"}, Take[b, 21]], Join[{"c(n)"}, Take[c, 21]]},
Alignment -> ".",
Dividers -> {{2 -> Red, -1 -> Blue}, {2 -> Red, -1 -> Blue}}]
|
|
PROG
|
(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
|
|
CROSSREFS
|
The sequence formed by listing the differences between the second and first elements of each pair is A047215.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|