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.

A182509 a(0)=0, a(1)=1, a(n)=(a(n-1) XOR n) + a(n-2).

Original entry on oeis.org

0, 1, 3, 1, 8, 14, 16, 37, 61, 89, 144, 244, 392, 633, 1023, 1641, 2680, 4306, 6968, 11261, 18209, 29489, 47688, 77200, 124880, 202073, 326931, 528993, 855952, 1384942, 2240896, 3625869, 5866797, 9492633, 15359464, 24852068, 40211496, 65063537, 105275007
Offset: 0

Views

Author

Alex Ratushnyak, May 03 2012

Keywords

Comments

Terms with indices 6k+1, 6k+2, 6k+3 are odd, all other terms are even.

Programs

  • Python
    prpr = 0
    prev = 1
    for n in range(2,99):
      current = (prev ^ n) + prpr
      print(prpr, end=', ')
      prpr = prev
      prev = current

Formula

a(0)=0, a(1)=1, a(n)=(a(n-1) XOR n) + a(n-2), where XOR is the bitwise exclusive-or operator.