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.

A318872 Partial sums of A316156.

Original entry on oeis.org

1, 3, 6, 12, 19, 27, 36, 49, 64, 81, 99, 118, 138, 169, 201, 240, 280, 323, 378, 437, 500, 564, 629, 695, 762, 830, 899, 969, 1040, 1112, 1185, 1271, 1376, 1482, 1589, 1697, 1806, 1916, 2027, 2145, 2280, 2416, 2553, 2709, 2866, 3024, 3183, 3343, 3504, 3666, 3829, 3993, 4158, 4324, 4491, 4675, 4860, 5046, 5233, 5428
Offset: 1

Views

Author

Antti Karttunen, Sep 16 2018

Keywords

Crossrefs

Cf. A316156.

Programs

  • PARI
    up_to = 10000;
    povisin(v,n) = { forstep(j=n,1,-1, if(v[j] == n, return(j))); (0); }; \\ Here: povisin = position_of_n_in_strictly_increasing_v
    A318872list(up_to) = { my(v316156 = vector(up_to), v318872 = vector(up_to), k, s); v316156[1] = v318872[1] = 1; for(n=2, up_to, k = 1+v316156[n-1]; if(povisin(v316156, n-1), s = v318872[n-1]; while((s+k)%(n-1), k++)); v316156[n] = k; v318872[n] = v318872[n-1] + v316156[n]); (v318872); };
    v318872 = A318872list(up_to);
    A318872(n) = v318872[n];

Formula

a(n) = Sum_{k=1..n} A316156(k).