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.

A204771 a(n) = a(n-1) XOR (a(n-2)*3).

Original entry on oeis.org

0, 1, 1, 2, 1, 7, 4, 17, 29, 46, 121, 243, 408, 833, 1929, 3658, 6353, 12815, 30844, 61009, 100133, 216534, 514233, 930107, 1686288, 3352737, 8264081, 15163506, 27077825, 53153175, 133991380, 243114769, 428343405, 854649182, 2120804377, 3870970883, 6937439304
Offset: 0

Views

Author

Alex Ratushnyak, May 07 2012

Keywords

Crossrefs

Cf. A101624: a(n) = a(n-1) XOR (a(n-2)*2).
Cf. A101625: a(n) = a(n-1) XOR (a(n-2)*4).

Programs

  • Python
    prpr = 0
    prev = 1
    for i in range(99):
        current = (prev)^(prpr*3)
        print(prpr, end=',')
        prpr = prev
        prev = current

Formula

a(0)=0, a(1)=1, a(n) = a(n-1) XOR (a(n-2)*3), where XOR is the bitwise exclusive-OR operator.