OFFSET
1,2
REFERENCES
R. K. Guy, Unsolved Problems Number Theory, Sect E35.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Enrique Pérez Herrero [1..11000], Goudout Élie [11001..20000], Table of n, a(n) for n = 1..20000
D. Gale, Tracking the Automatic Ant: And Other Mathematical Explorations, ch. 5, p. 27. Springer, 1998. [From Enrique Pérez Herrero, Mar 28 2010]
C. Kimberling, Problem 1615, Crux Mathematicorum, Vol. 17 (2) 44 1991.
FORMULA
a(n) >= floor((n+4)/3), n is expulsed from the unshuffled zone. - Enrique Pérez Herrero, Feb 25 2010
MATHEMATICA
L[n_] := L[n] = (
i = Floor[(n + 4)/3];
j = Floor[(2*n + 1)/3];
While[(i != j), j = Max[2*(i - j), 2*(j - i) - 1]; i++ ];
Return[i];
) A006852[n_] := L[n]
(* Enrique Pérez Herrero, Mar 28 2010 *)
PROG
(PARI) A006852(n)=
{
my(i, j);
i=floor((n+4)/3);
j=floor((2*n+1)/3);
while((i!=j),
j=max(2*i-2*j, -1-2*i+2*j);
i++;
); return(i); }
\\ Enrique Pérez Herrero, Feb 25 2010
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
7593 corrected to 7598 by Hans Havermann, July 1998
STATUS
approved