login
A318872
Partial sums of A316156.
2
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,2
LINKS
FORMULA
a(n) = Sum_{k=1..n} A316156(k).
PROG
(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];
CROSSREFS
Cf. A316156.
Sequence in context: A363463 A074899 A345868 * A267591 A101423 A263511
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 16 2018
STATUS
approved