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.

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

Original entry on oeis.org

1, 2, 4, 6, 12, 14, 20, 34, 68, 70, 76, 90, 124, 194, 284, 478, 956, 958, 964, 978, 1012, 1082, 1172, 1366, 1844, 2802, 3780, 4862, 6228, 9030, 13892, 22922, 45844, 45846, 45852, 45866, 45900, 45970, 46060, 46254, 46732
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A050027, A050031, A050035, A050039, A050043, A050047, A050051, A050059, A050063, A050067, A050071 (similar, but with different initial conditions).

Programs

  • Mathematica
    Fold[Append[#1, #1[[-1]] + #1[[#2]]] &, {1, 2, 4}, Flatten@Table[2 k, {n, 5}, {k, 2^n}]] (* Ivan Neretin, Sep 07 2015 *)
  • PARI
    lista(nn) = {nn = max(nn, 3); my(va = vector(nn)); va[1] = 1; va[2] = 2; va[3] = 4; for(n=4, nn, va[n] = va[n-1] + va[2*(n - 1 - 2^logint(n-2, 2))]); va;} \\ Petros Hadjicostas, Jul 19 2020

Extensions

Name edited by Petros Hadjicostas, Jul 19 2020