%I #34 Sep 08 2022 08:44:33
%S 3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12,19,18,17,16,23,22,21,20,27,26,
%T 25,24,31,30,29,28,35,34,33,32,39,38,37,36,43,42,41,40,47,46,45,44,51,
%U 50,49,48,55,54,53,52,59,58,57,56,63,62,61,60,67,66,65,64,71
%N Nimsum n + 3.
%C The same as A120634 except for first 3 terms. - _Pietro Battiston_, Jan 19 2008
%C Permutation of the nonnegative integers. - _Wesley Ivan Hurt_, Apr 06 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 <a href="/index/Ni#Nimsums">Index entries for sequences related to Nim-sums</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the nonnegative integers</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F G.f.: (4*x^4-x^3-x^2-x+3)/((x-1)^2*(x+1)*(x^2+1)). - _Ralf Stephan_, Nov 01 2003
%F a(n) = n + (-1)^n + 2*(-1)^floor(n/2). - Mitchell Harris, Jan 10 2005
%F From _Wesley Ivan Hurt_, Apr 06 2016: (Start)
%F a(n) = a(n-1) + a(n-4) - a(n-5) for n>4.
%F a(n) = n + (-1)^n + 2*(-1)^((2*n-1+(-1)^n)/4).
%F a(n) = A004442(A004443(n)) = A004443(A004442(n)).
%F a(a(n)) = n; n+a(n) = A004442(n) + A004443(n). (End)
%F a(n) = n XOR 3. - _Falk Hüffner_, Jan 23 2022
%p A004444:=n->n+(-1)^n+2*(-1)^floor(n/2): seq(A004444(n), n=0..50); # _Wesley Ivan Hurt_, Apr 06 2016
%t CoefficientList[Series[(4x^4-x^3-x^2-x+3)/((x-1)^2(x+1) (x^2+1)), {x,0,70}],x] (* _Harvey P. Dale_, Mar 24 2011 *)
%t Table[n + (-1)^n + 2 (-1)^Floor[n/2], {n, 0, 100}] (* _Wesley Ivan Hurt_, Apr 06 2016 *)
%o (Magma) [n + (-1)^n + 2*(-1)^Floor(n/2): n in [0..100]]; // _Wesley Ivan Hurt_, Apr 06 2016
%o (PARI) Vec((4*x^4-x^3-x^2-x+3)/((x-1)^2*(x+1)*(x^2+1)) + O(x^90)) \\ _Michel Marcus_, Apr 06 2016
%o (Python)
%o def a(n): return n^3
%o print([a(n) for n in range(69)]) # _Michael S. Branicky_, Jan 23 2022
%Y Cf. A004442 (nimsum n+1), A004443 (nimsum n+2), A120634.
%K nonn,easy
%O 0,1
%A _N. J. A. Sloane_
%E More terms from _Michael S. Branicky_, Jan 23 2022