# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a064706
Showing 1-1 of 1
%I A064706 #39 Jun 30 2022 08:38:15
%S A064706 0,1,2,3,5,4,7,6,10,11,8,9,15,14,13,12,20,21,22,23,17,16,19,18,30,31,
%T A064706 28,29,27,26,25,24,40,41,42,43,45,44,47,46,34,35,32,33,39,38,37,36,60,
%U A064706 61,62,63,57,56,59,58,54,55,52,53,51,50,49,48,80,81,82,83,85,84,87,86
%N A064706 Square of permutation defined by A003188.
%C A064706 Inverse of sequence A064707 considered as a permutation of the nonnegative integers.
%C A064706 Not the same as A100282: a(n) = A100282(n) = A100280(A100280(n)) only for n < 64. - _Reinhard Zumkeller_, Nov 11 2004
%H A064706 Harry J. Smith, Table of n, a(n) for n = 0..1000
%H A064706 Index entries for sequences that are permutations of the natural numbers
%F A064706 a(n) = A003188(A003188(n)).
%F A064706 a(n) = n XOR floor(n/4), where XOR is binary exclusive OR. - _Paul D. Hanna_, Oct 25 2004
%F A064706 a(n) = A233280(A180201(n)), n > 0. - _Yosu Yurramendi_, Apr 05 2017
%F A064706 a(n) = A000695(A003188(A059905(n))) + 2*A000695(A003188(A059906(n))). - _Antti Karttunen_, Apr 14 2018
%t A064706 Array[BitXor[#, Floor[#/4]] &, 72, 0] (* _Michael De Vlieger_, Apr 14 2018 *)
%o A064706 (MATLAB) A = 1; for i = 1:7 B = A(end:-1:1); A = [A (B + length(A))]; end A(A) - 1
%o A064706 (PARI) a(n)=bitxor(n,n\4)
%o A064706 (PARI) { for (n=0, 1000, write("b064706.txt", n, " ", bitxor(n, n\4)) ) } \\ _Harry J. Smith_, Sep 22 2009
%o A064706 (R)
%o A064706 maxn <- 63 # by choice
%o A064706 b <- c(1,0,0)
%o A064706 for(n in 4:maxn) b[n] <- b[n-1] - b[n-2] + b[n-3]
%o A064706 # c(1,b) is A133872
%o A064706 a <- 1
%o A064706 for(n in 1:maxn) {
%o A064706 a[2*n ] <- 2*a[n] + 1 - b[n]
%o A064706 a[2*n+1] <- 2*a[n] + b[n]
%o A064706 }
%o A064706 (a <- c(0,a))
%o A064706 # _Yosu Yurramendi_, Oct 25 2020
%o A064706 (Python)
%o A064706 def A064706(n): return n^ n>>2 # _Chai Wah Wu_, Jun 29 2022
%Y A064706 Cf. A064707 (inverse), A165211 (mod 2).
%Y A064706 Cf. A003188, A000695, A059905, A059906.
%Y A064706 Cf. also A054238, A163233, A302846.
%K A064706 nonn,easy
%O A064706 0,3
%A A064706 _N. J. A. Sloane_, Oct 13 2001
%E A064706 More terms from _David Wasserman_, Aug 02 2002
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE