A048725 a(n) = Xmult(n,5) or rule90(n,1).
0, 5, 10, 15, 20, 17, 30, 27, 40, 45, 34, 39, 60, 57, 54, 51, 80, 85, 90, 95, 68, 65, 78, 75, 120, 125, 114, 119, 108, 105, 102, 99, 160, 165, 170, 175, 180, 177, 190, 187, 136, 141, 130, 135, 156, 153, 150, 147, 240, 245, 250, 255, 228, 225, 238, 235, 216, 221, 210
Offset: 0
Examples
n (in binary) | 4n [binary] | n XOR 4n [binary] | [decimal] = a(n) 0 | 0 | 0 | 0 1 | 100 | 101 | 5 10 | 1000 | 1010 | 10 11 | 1100 | 1111 | 15 100 | 10000 | 10100 | 20 101 | 10100 | 10001 | 17 etc.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..16383
Crossrefs
Programs
-
Maple
a:= n-> Bits[Xor](n*4, n): seq(a(n), n=0..120); # Alois P. Heinz, Aug 24 2019
-
Mathematica
Table[ BitXor[4n, n], {n, 0, 60}] (* Robert G. Wilson v, Jul 06 2006 *)
-
PARI
a(n)=bitxor(n,4*n) \\ Charles R Greathouse IV, Oct 03 2016
-
Python
def A048725(n): return n^ n<<2 # Chai Wah Wu, Jun 29 2022
Formula
a(n) = n XOR (4n). - M. F. Hasler, Oct 09 2017
Comments