%I #23 Nov 22 2016 19:20:07
%S 22,23,20,21,18,19,16,17,30,31,28,29,26,27,24,25,6,7,4,5,2,3,0,1,14,
%T 15,12,13,10,11,8,9,54,55,52,53,50,51,48,49,62,63,60,61,58,59,56,57,
%U 38,39,36,37,34,35,32,33,46,47,44,45,42,43,40,41,86,87,84
%N Nimsum n + 22.
%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="/A004463/b004463.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_24">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-2,2,-2,2,-1,0,0,0,0,0,0,0,-1,2,-2,2,-2,2,-2,2,-1).
%F a(n) = n + 2(-1)^[n/2] + 4(-1)^[n/4] + 16(-1)^[n/16]. - Mitchell Harris, Jan 10 2005
%F From _Colin Barker_, Apr 14 2016: (Start)
%F a(n) = n XOR 22.
%F G.f.: (22 -21*x +18*x^2 -17*x^3 +14*x^4 -13*x^5 +10*x^6 -9*x^7 -10*x^16 +11*x^17 -14*x^18 +15*x^19 -18*x^20 +19*x^21 -22*x^22 +23*x^23) / ((1 -x)^2*(1 +x^2)*(1 +x^4)*(1 +x^16)).
%F (End)
%F a(n+32) = a(n)+32. - _Robert Israel_, Nov 22 2016
%p seq(Bits:-Xor(n,22),n=0..100); # _Robert Israel_, Nov 22 2016
%o (PARI) Vec((22 -21*x +18*x^2 -17*x^3 +14*x^4 -13*x^5 +10*x^6 -9*x^7 -10*x^16 +11*x^17 -14*x^18 +15*x^19 -18*x^20 +19*x^21 -22*x^22 +23*x^23) / ((1 -x)^2*(1 +x^2)*(1 +x^4)*(1 +x^16)) + O(x^50)) \\ _Colin Barker_, Apr 14 2016
%K nonn,easy
%O 0,1
%A _N. J. A. Sloane_
|