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.

Showing 1-1 of 1 results.

A094589 a(1) = 1; a(n+1) = a(n) + (largest element of {a} <= n).

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 20, 26, 32, 38, 48, 58, 68, 78, 92, 106, 120, 134, 148, 162, 182, 202, 222, 242, 262, 282, 308, 334, 360, 386, 412, 438, 470, 502, 534, 566, 598, 630, 668, 706, 744, 782, 820, 858, 896, 934, 972, 1010, 1058, 1106, 1154, 1202, 1250, 1298
Offset: 1

Views

Author

Leroy Quet, Jun 07 2004

Keywords

Comments

a(n+1) = a(n) + a(k(n)), where k(n) is the number of elements of {a} which are <= n.

Crossrefs

Cf. A094590, A250983 (first differences).

Programs

  • Mathematica
    f[n_] := Block[{t = Table[0, {n}]}, t[[1]] = 1; For[i = 1, i < n, i++, t[[i + 1]] = t[[i]] + t[[Count[t, x_ /; 0 < x <= i]]]]; t]; f@ 54 (* Michael De Vlieger, Mar 23 2015 *)
  • PARI
    flargest(va, n) = {vsa = vecsort(va,,12); for (k=1, #vsa, if (vsa[k] < n, return (vsa[k])););}
    lista(nn) = {va = [1]; print1(va[1], ", "); for (n=2, nn, newa = flargest(va, n) + va[n-1]; print1(newa, ", "); va = concat(va, newa););} \\ Michel Marcus, Mar 23 2015

Extensions

More terms from Vladeta Jovovic, Jun 13 2004
Showing 1-1 of 1 results.