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.

A049946 a(n) = a(1) + a(2) + ... + a(n-1) + a(m) for n >= 4, where m = n - 1 - 2^p and p is the unique integer such that 2^p < n - 1 <= 2^(p+1), starting with a(1) = a(2) = 1 and a(3) = 4.

Original entry on oeis.org

1, 1, 4, 7, 14, 28, 56, 115, 233, 460, 920, 1843, 3689, 7385, 14784, 29596, 59251, 118388, 236776, 473555, 947113, 1894233, 3788480, 7576988, 15154035, 30308188, 60616603, 121233666, 242468255, 484938356, 969880408, 1939768215
Offset: 1

Views

Author

Keywords

Programs

  • Maple
    s := proc(n) option remember; `if`(n < 1, 0, a(n) + s(n - 1)) end proc:
    a := proc(n) option remember;
    `if`(n < 4, [1, 1, 4][n], s(n - 1) + a(-2^ceil(-1 + log[2](n - 1)) + n - 1)):
    end proc:
    seq(a(n), n = 1..40); # Petros Hadjicostas, Apr 25 2020

Extensions

Name edited by Petros Hadjicostas, Apr 25 2020