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.

A118029 a(0)=1. a(n) = a(n-1) + (smallest integer that is >= n and occurs among the earlier terms of the sequence).

Original entry on oeis.org

1, 2, 4, 8, 12, 20, 28, 36, 44, 56, 68, 80, 92, 112, 132, 152, 172, 192, 212, 232, 252, 280, 308, 336, 364, 392, 420, 448, 476, 512, 548, 584, 620, 656, 692, 728, 764, 808, 852, 896, 940, 984, 1028, 1072, 1116, 1172, 1228, 1284, 1340, 1396, 1452, 1508, 1564
Offset: 0

Views

Author

Leroy Quet, Apr 10 2006

Keywords

Comments

Let b_j(n) = 2*n*(n/2)^(2^(-j))/(1+2^(-j)). For any positive integers r and n, we have (n^2+n)/2 < a(n) < b_r(n) + Sum_{j=1..r} b_j(n). - Colin Defant, Sep 15 2015

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[k = 1; While[Nand[MemberQ[a, k], k >= i], k++]; AppendTo[a, a[[i]] + k], {i, 52}]; a (* Michael De Vlieger, Sep 19 2017 *)
  • PARI
    lista(nn) = {va = vector(nn); va[1] = 1; for (k=2, nn, vs = select(x->(x >= k-1), va, 1); va[k] = va[k-1] + va[vs[1]];); va;} \\ Michel Marcus, Oct 09 2015

Extensions

More terms from Adam Panagos (adam.panagos(AT)gmail.com), May 10 2006
More terms from Joshua Zucker, Jul 27 2006