cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A168081 Lucas sequence U_n(x,1) over the field GF(2)[x].

Original entry on oeis.org

0, 1, 2, 5, 8, 21, 34, 81, 128, 337, 546, 1301, 2056, 5381, 8706, 20737, 32768, 86273, 139778, 333061, 526344, 1377557, 2228770, 5308753, 8388736, 22085713, 35782690, 85262357, 134742024, 352649221, 570556418, 1359020033, 2147483648, 5653987329, 9160491010
Offset: 0

Views

Author

Max Alekseyev, Nov 18 2009

Keywords

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
Also, Chebyshev polynomials of the second kind evaluated at x=1/2 (A049310) with the resulting coefficients taken modulo 2, and then evaluated at x=2. - Max Alekseyev, Jun 20 2025

Crossrefs

A bisection of A006921. Cf. A260022. - N. J. A. Sloane, Jul 14 2015
See also A257971, first differences of A006921. - Reinhard Zumkeller, Jul 14 2015

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<2, n, Bits[Xor](2*a(n-1), a(n-2)))
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jun 16 2025
  • 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 *)
  • PARI
    { a=0; b=1; for(n=1,50, c=bitxor(2*b,a); a=b; b=c; print1(c,", "); ); }
    
  • PARI
    { a168081(n) = subst(lift(polchebyshev(n-1,2,x/2)*Mod(1,2)),x,2); } \\ Max Alekseyev, Jun 20 2025
  • 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
    

Formula

For n>1, a(n) = (2*a(n-1)) XOR a(n-2).
a(n) = A248663(A206296(n)). - Antti Karttunen, Dec 11 2015
A000120(a(n)) = A002487(n). - Karl-Heinz Hofmann, Jun 16 2025
a(n) = Sum_{k=0..n} (A049310(n,k) mod 2) * 2^k. - Max Alekseyev, Jun 20 2025

A006921 Diagonals of Pascal's triangle mod 2 interpreted as binary numbers.

Original entry on oeis.org

1, 1, 3, 2, 7, 5, 13, 8, 29, 21, 55, 34, 115, 81, 209, 128, 465, 337, 883, 546, 1847, 1301, 3357, 2056, 7437, 5381, 14087, 8706, 29443, 20737, 53505, 32768, 119041, 86273, 226051, 139778, 472839, 333061, 859405, 526344, 1903901, 1377557, 3606327
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A011973, A000079, A047999 (SierpiƄski), A007318, A101624.
Cf. A257971 (first differences).

Programs

  • Haskell
    a006921 = sum . zipWith (*)
                    a000079_list . map (flip mod 2) . reverse . a011973_row
    -- Reinhard Zumkeller, Jul 14 2015
    
  • Maple
    b2:=(n,k)->binomial(n,k) mod 2;
    H:=n->add(b2(n-r,r)*2^( floor(n/2)-r ), r=0..floor(n/2));
    [seq(H(n),n=0..30)]; # N. J. A. Sloane, Jul 14 2015
  • Python
    def A006921(n): return sum(int(not r & ~(n-r))*2**(n//2-r) for r in range(n//2+1)) # Chai Wah Wu, Jun 20 2022

Formula

a(2*n) = A260022(n); a(2*n+1) = A168081(n+1). - Reinhard Zumkeller, Jul 14 2015
a(n) = Sum_{r=0..n/2} binomial(n-r,r){mod 2} * 2^(floor(n/2)-r). - _N. J. A. Sloane, Jul 14 2015
Showing 1-2 of 2 results.