|
|
A180122
|
|
First of three "least, sum, least" self-generating sequences.
|
|
3
|
|
|
1, 4, 7, 9, 12, 15, 18, 20, 23, 26, 29, 31, 34, 37, 39, 42, 45, 48, 50, 53, 56, 59, 61, 64, 67, 70, 72, 75, 78, 80, 83, 86, 89, 91, 94, 97, 100, 102, 105, 108, 111, 113, 116, 119, 121, 124, 127, 130, 132, 135, 138, 141, 143, 146, 149, 151, 154, 157, 160, 162, 165, 168
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = least positive integer not yet used;
b(n) = n + a(n);
c(n) = least positive integer not yet used.
|
|
EXAMPLE
|
The three sequences, labeled a,b,c, are
a=(1,4,7,9,...), b=(2,6,10,13,...), c=(3,5,8,11...).
|
|
MATHEMATICA
|
mex[list_, offset_]:=NestWhile[#+1&, offset, MemberQ[list, #]&];
z=100; a[1]=1; b[1]=1+a[1];
c[1]=mex[soFar={a[1], b[1]}, 1];
Do[soFar=Join[soFar, {c[n-1]}];
a[n]=mex[soFar, c[n-1]];
b[n]=n+a[n]; soFar=Join[soFar, {a[n], b[n]}];
c[n]=mex[soFar, a[n]], {n, 2, z}]
A180122 = Map[Floor[(1 + Sqrt[3]) #] - 1 &, Range[200]]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|