[go: up one dir, main page]

login
A099356
From P-positions in a certain game.
2
0, 1, 3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
OFFSET
0,3
LINKS
A. S. Fraenkel, New games related to old and new sequences, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper G6, 2004.
FORMULA
Let a(n) = this sequence, b(n) = A099357. Then a(n) = the smallest number not in {a(0), b(0), a(1), b(1), ..., a(n-1), b(n-1)}; b(n) = b(n-1) + (-1)^a(n-1)*a(n-1) + a(n) + 1. Apart from initial zero, complement of A099357.
MAPLE
a:=proc(n) option remember: local j, t: if(n=0)then return 0: else t:=a(n-1)+1: for j from 0 to n-1 do if(t=b(j))then return t+1: elif(t<b(j))then break: fi: od: return t: fi: end:
b:=proc(n) option remember: if(n=0)then return 0: else return b(n-1) + (-1)^a(n-1)*a(n-1) + a(n) + 1: fi: end:
seq(a(n), n=0..70); # Nathaniel Johnston, Apr 28 2011
CROSSREFS
Sequence in context: A072152 A199015 A196098 * A377431 A325209 A121543
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 16 2004
STATUS
approved