login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099355 From P-positions in a certain game. 3

%I #13 Mar 10 2023 07:54:00

%S 0,4,10,14,21,25,27,31,33,38,44,48,55,59,61,65,67,71,74,78,84,89,92,

%T 96,102,107,110,114,120,124,131,135,137,141,143,148,154,158,165,169,

%U 171,175,177,181,184,188,194,199,202,206,212,217,220,224,230,235,237

%N From P-positions in a certain game.

%H Nathaniel Johnston, <a href="/A099355/b099355.txt">Table of n, a(n) for n = 0..10000</a>

%H A. S. Fraenkel, <a href="http://www.emis.de/journals/INTEGERS/papers/eg6/eg6.Abstract.html">New games related to old and new sequences</a>, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 4, Paper G6, 2004.

%F See A099354.

%p 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:

%p 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:

%p seq(b(n), n=0..70); # _Nathaniel Johnston_, Apr 28 2011

%t a[n_] := a[n] = Module[{j, t}, If[n == 0, 0, t = a[n - 1] + 1; For[j = 0, j <= n - 1, j++, Which[t == b[j], Return[t + 1], t < b[j], Break[]]]; t]];

%t b[n_] := b[n] = If[n == 0, 0, b[n - 1] - a[n - 1] + a[n] + (-1)^b[n - 1] - (-1)^a[n - 1] + 3];

%t Table[b[n], {n, 0, 70}] (* _Jean-François Alcover_, Mar 10 2023, after _Nathaniel Johnston_ *)

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Nov 16 2004

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)