OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
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
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 16 2018
STATUS
approved