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.

A049890 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) = 2.

Original entry on oeis.org

1, 1, 2, 3, 6, 12, 24, 47, 93, 188, 376, 751, 1501, 2999, 5992, 11972, 23921, 47888, 95776, 191551, 383101, 766199, 1532392, 3064772, 6129521, 12258996, 24517897, 49035606, 98070837, 196140924, 392280350, 784557707, 1569109434
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A049891 (similar, but with minus a(2*m)), A049938 (similar, but with plus a(m)), A049939 (similar, but with plus a(2*m)).

Programs

  • PARI
    lista(nn) = { nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 1; va[3] = 2; my(sa = vecsum(va)); for (n=4, nn, va[n] = sa - va[n - 1 - 2^logint(n-2,2)]; sa += va[n]; ); va; } \\ Petros Hadjicostas, Apr 27 2020

Extensions

Name edited by Petros Hadjicostas, Apr 27 2020