login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099354 From P-positions in a certain game. 2
0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 26, 28, 29, 30, 32, 34, 35, 36, 37, 39, 40, 41, 42, 43, 45, 46, 47, 49, 50, 51, 52, 53, 54, 56, 57, 58, 60, 62, 63, 64, 66, 68, 69, 70, 72, 73, 75, 76, 77, 79, 80, 81, 82, 83, 85 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Nathaniel Johnston, Table of n, a(n) for n = 0..10000

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) = A099355. 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) - a(n-1) + a(n) + (-1)^b(n-1) - (-1)^a(n-1) + 3. Apart from initial zero, complement of A099355.

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) - a(n-1) + a(n) + (-1)^b(n-1) - (-1)^a(n-1) + 3: fi: end:

seq(a(n), n=0..70); # Nathaniel Johnston, Apr 28 2011

CROSSREFS

Sequence in context: A332484 A039194 A242485 * A039115 A285964 A198045

Adjacent sequences:  A099351 A099352 A099353 * A099355 A099356 A099357

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Nov 16 2004

EXTENSIONS

Edited and corrected by Nathaniel Johnston, Apr 28 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 6 03:35 EST 2021. Contains 341841 sequences. (Running on oeis4.)