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.

A082009 a(n) is the label of parent node of node n in tree shown in A082007.

Original entry on oeis.org

0, 0, 1, 3, 3, 1, 6, 6, 2, 9, 9, 2, 12, 12, 4, 15, 15, 16, 18, 18, 16, 21, 21, 17, 24, 24, 17, 27, 27, 4, 30, 30, 31, 33, 33, 31, 36, 36, 32, 39, 39, 32, 42, 42, 5, 45, 45, 46, 48, 48, 46, 51, 51, 47, 54, 54, 47, 57, 57, 5, 60, 60, 61, 63
Offset: 1

Views

Author

N. J. A. Sloane, Oct 06 2009, based on a posting by Steve Witham (sw(AT)tiac.net) to the Math Fun Mailing List, Sep 30 2009

Keywords

Programs

  • Mathematica
    w = {{0}}; a = ConstantArray[0, 254]; Do[k = 2^Floor@Log2[n - 1]; AppendTo[w, Flatten@Table[w[[n - k]] + (2^k - 1) i, {i, 2^k}]]; a[[w[[-1]]]] = Riffle[#, #] &@w[[-2]], {n, 2, 8}]; a (* Ivan Neretin, Mar 12 2017 *)