|
|
A081695
|
|
From P-positions in a certain game.
|
|
2
|
|
|
0, 1, 3, 7, 12, 13, 21, 30, 31, 42, 45, 60, 61, 78, 79, 98, 99, 121, 144, 145, 170, 171, 198, 199, 228, 231, 264, 265, 300, 301, 338, 339, 378, 379, 420, 422, 423, 469, 516, 517, 566, 567, 618, 619, 672, 673, 728, 729, 786, 787, 846, 849, 912, 913, 978, 979, 1046, 1047, 1116, 1117, 1188, 1189, 1262, 1263, 1338
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
Let a(n) = A081694(n) and let b(n) = n-th term of the current sequence. Then a(n) = mex{ a(i), b(i) : 0 <= i < n}; b(n) = a(n) + b(n-1) - (1+(-1)^b(n-1))*a(n-1)/2. Also, apart from initial zero, current sequence is complement of A081694.
|
|
MAPLE
|
option remember;
local i;
if n <=1 then
n;
else
{ seq(procname(i), i=0..n-1)} union {seq(A081695(i), i=0..n-1)} ;
mex(%) ;
end if;
end proc:
option remember;
if n <= 1 then
n;
else
end if;
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|