The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A302846 Interleave the Gray-coded X and Y-coordinates of 2-dimensional Hilbert's curve in alternate bit-positions: a(n) = A000695(A003188(A059253(n))) + 2*A000695(A003188(A059252(n))). 15
 0, 1, 3, 2, 10, 8, 9, 11, 15, 13, 12, 14, 6, 7, 5, 4, 20, 22, 23, 21, 17, 16, 18, 19, 27, 26, 24, 25, 29, 31, 30, 28, 60, 62, 63, 61, 57, 56, 58, 59, 51, 50, 48, 49, 53, 55, 54, 52, 36, 37, 39, 38, 46, 44, 45, 47, 43, 41, 40, 42, 34, 35, 33, 32, 160, 162, 163, 161, 165, 164, 166, 167, 175, 174, 172, 173, 169, 171, 170, 168, 136 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Like in binary Gray code A003188, also in this permutation the binary expansions of a(n) and a(n+1) differ always by just a single bit-position, that is, A000120(A003987(a(n),a(n+1))) = 1 for all n >= 0. Here A003987 computes bitwise-XOR of its two arguments. When composed with A052330 this gives A302781. LINKS Antti Karttunen, Table of n, a(n) for n = 0..16383 FORMULA a(n) = A000695(A003188(A059253(n))) + 2*A000695(A003188(A059252(n))). a(n) = A064706(A163356(n)) = A003188(A302844(n)). PROG (PARI) A064706(n) = bitxor(n, n>>2); A057300(n) = { my(t=1, s=0); while(n>0, if(1==(n%4), n++, if(2==(n%4), n--)); s += (n%4)*t; n >>= 2; t <<= 2); (s); }; A163356(n) = if(!n, n, my(i = (#binary(n)-1)\2, f = 4^i, d = (n\f)%4, r = (n%f)); (((((2+(i%2))^d)%5)-1)*f) + if(3==d, f-1-A163356(r), A057300(A163356(r)))); A302846(n) = A064706(A163356(n)); CROSSREFS Cf. A302845 (inverse permutation). Cf. A000695, A302844, A057300, A059252, A059253, A064706, A163356, A302781. Cf. also A003188, A163252, A300838 for other permutations satisfying the same condition. Sequence in context: A246830 A268531 A056861 * A214844 A214966 A103245 Adjacent sequences:  A302843 A302844 A302845 * A302847 A302848 A302849 KEYWORD nonn,base AUTHOR Antti Karttunen, Apr 14 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 19 09:33 EST 2020. Contains 332041 sequences. (Running on oeis4.)