%I #19 Apr 28 2025 13:45:58
%S 24,25,26,27,28,29,30,31,16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,
%T 15,0,1,2,3,4,5,6,7,56,57,58,59,60,61,62,63,48,49,50,51,52,53,54,55,
%U 40,41,42,43,44,45,46,47,32,33,34,35,36,37,38,39,88,89,90
%N Nimsum n + 24.
%C A self-inverse permutation of the natural numbers. - _Philippe Deléham_, Nov 22 2016
%D E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 60.
%D J. H. Conway, On Numbers and Games. Academic Press, NY, 1976, pp. 51-53.
%H Colin Barker, <a href="/A004465/b004465.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Ni#Nimsums">Index entries for sequences related to Nim-sums</a>
%H <a href="/index/Rec#order_26">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,0,0,0,0,0,-1,2,-1,0,0,0,0,0,-1,2,-1,0,0,0,0,0,-1,2,-1).
%F a(n) = n + 8(-1)^[n/8] + 16(-1)^[n/16]. - Mitchell Harris, Jan 10 2005
%F From _Colin Barker_, Apr 14 2016: (Start)
%F a(n) = n XOR 24.
%F G.f.: (24-23*x+8*x^8-7*x^9-8*x^16+9*x^17-24*x^24+25*x^25) / ((1-x)^2*(1+x^8)*(1+x^16)).
%F (End)
%t CoefficientList[Series[(24-23x+8x^8-7x^9-8x^16+9x^17-24x^24+25x^25)/((1-x)^2(1+x^8)(1+x^16)),{x,0,80}],x] (* or *) LinearRecurrence[{2,-1,0,0,0,0,0,-1,2,-1,0,0,0,0,0,-1,2,-1,0,0,0,0,0,-1,2,-1},{24,25,26,27,28,29,30,31,16,17,18,19,20,21,22,23,8,9,10,11,12,13,14,15,0,1},80] (* _Harvey P. Dale_, Apr 28 2025 *)
%o (PARI) Vec((24-23*x+8*x^8-7*x^9-8*x^16+9*x^17-24*x^24+25*x^25)/((1-x)^2*(1+x^8)*(1+x^16)) + O(x^50)) \\ _Colin Barker_, Apr 14 2016
%K nonn,easy
%O 0,1
%A _N. J. A. Sloane_