OFFSET
1,5
MATHEMATICA
p[n_] := p[n] = PrimePi[n];
pv[n_] := pv[n] = p[n]*(p[n] + 1)/2;
v[n_, k_] := v[n, k] = Module[{c = 0, i = 1}, If[k == 1, Return[If[pv[n] == n, 1, 0]]]; While[i < n - k + 2, If[pv[i] <= n, c += v[n - i, k - 1]]; i++]; c];
a[n_] := a[n] = Module[{c = 0, k = 1}, While[k <= n, c += v[n, k]; k++]; c]; Table[a[n], {n, 1, 36}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert P. P. McKone, Dec 22 2023
STATUS
approved