OFFSET
0,2
LINKS
David A. Corneth, Table of n, a(n) for n = 0..8191
EXAMPLE
Sequence gives binary encodings of polynomials in maximal ideal generated by x^2 + x + 1 in the polynomial ring GF(2)[X]. E.g. 1 * x^2+x+1 = x^2 +x+1 = 111 (binary encoding) = 7 (in decimal) x * x^2+x+1 = x^3+x^2+x = 1110 = 14 x+1 * x^2+x+1 = x^3+1 = 1001 = 9 x^2 * x^2+x+1 = x^4+x^3+x^2 = 11100 = 28 x^2+1 * x^2+x+1 = x^4+x^3+x+1 = 11011 = 27 etc.
PROG
(PARI) a(n)=bitxor(n, bitxor(2*n, 4*n)) \\ Charles R Greathouse IV, Oct 03 2016
(Python)
def A048727(n): return n^ n<<1 ^ n<<2 # Chai Wah Wu, Jun 29 2022
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Apr 26 1999
STATUS
approved