OFFSET
0,3
COMMENTS
The Lucas sequence U_n(x,1) over the field GF(2)={0,1} is: 0, 1, x, x^2+1, x^3, x^4+x^2+1, x^5+x, ... Numerical values are obtained evaluating these 01-polynomials at x=2 over the integers.
The counterpart sequence is V_n(x,1) = x*U_n(x,1) that implies identities like U_{2n}(x,1) = x*U_n(x,1)^2. - Max Alekseyev, Nov 19 2009
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
For n>1, a(n) = (2*a(n-1)) XOR a(n-2).
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n] = BitXor[2 a[n - 1], a[n - 2]]; Table[a@ n, {n, 0, 32}] (* Michael De Vlieger, Dec 11 2015 *)
PROG
(PARI) { a=0; b=1; for(n=1, 50, c=bitxor(2*b, a); a=b; b=c; print1(c, ", "); ) }
(Python)
def A168081(n): return sum(int(not r & ~(2*n-1-r))*2**(n-1-r) for r in range(n)) # Chai Wah Wu, Jun 20 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Alekseyev, Nov 18 2009
STATUS
approved