OFFSET
0,2
COMMENTS
(n,a(n)) are Wythoff pairs: (0,0), (1,2), (3,5), (4,7), ..., where each difference occurs once.
Self-inverse when considered as a permutation or function, i.e., a(a(n)) = n. - Howard A. Landman, Sep 25 2001
If the offset is 1, the sequence can also be obtained by rearranging the natural numbers so that sum of n terms is a multiple of n, or equivalently so that the arithmetic mean of the first n terms is an integer. - Amarnath Murthy, Aug 16 2002
For n = 1, 2, 3, ..., let p(n)=least natural number not already an a(k), q(n) = n + p(n); then a(p(n)) = q(n), a(q(n)) = p(n). - Clark Kimberling
Also, indices of powers of 2 in A086482. - Amarnath Murthy, Jul 26 2003
There is a 7-state Fibonacci automaton (see a002251_1.pdf) that accepts, in parallel, the Zeckendorf representations of n and a(n). - Jeffrey Shallit, Jul 14 2023
REFERENCES
E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 76.
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.
Eric Duchene, Aviezri S. Fraenkel, Vladimir Gurvich, Nhan Bao Ho, Clark Kimberling, and Urban Larsson, Wythoff Wisdom, 43 pages, no date, unpublished.
Eric Duchene, Aviezri S. Fraenkel, Vladimir Gurvich, Nhan Bao Ho, Clark Kimberling, and Urban Larsson, Wythoff Wisdom, unpublished, no date [Cached copy, with permission]
Alex Meadows and B. Putman, A New Twist on Wythoff's Game, arXiv preprint arXiv:1606.06819 [math.CO], 2016.
Gabriel Nivasch, More on the Sprague-Grundy function for Wythoff’s game, pages 377-410 in "Games of No Chance 3, MSRI Publications Volume 56, 2009.
Jeffrey Shallit, Automaton for A002251
Jeffrey Shallit, Proving properties of some greedily-defined integer recurrences via automata theory, arXiv:2308.06544 [cs.DM], 2023.
R. Silber, Wythoff's Nim and Fibonacci Representations, Fibonacci Quarterly #14 (1977), pp. 85-88.
N. J. A. Sloane, Scatterplot of first 100 terms [The points are symmetrically placed about the diagonal, although that is hard to see here because the scales on the axes are different]
FORMULA
a(n) = A019444(n+1) - 1.
MATHEMATICA
With[{n = 42}, {0}~Join~Take[Values@ #, LengthWhile[#, # == 1 &] &@ Differences@ Keys@ #] &@ Sort@ Flatten@ Map[{#1 -> #2, #2 -> #1} & @@ # &, Transpose@ {Array[Floor[# GoldenRatio] &, n], Array[Floor[# GoldenRatio^2] &, n]}]] (* Michael De Vlieger, Nov 14 2017 *)
PROG
(PARI) A002251_upto(N, c=0, A=Vec(0, N))={for(n=1, N, A[n]||(#A<A[n]=n+c++)|| A[n+c]=n); A} \\ The resulting vector starts with A002251[1]=2, a(0)=0 is not included. - M. F. Hasler, Nov 27 2019, replacing earlier code from Sep 17 2014
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
Edited by Christian G. Bower, Oct 29 2002
STATUS
approved