OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
MAPLE
s:= proc(n) option remember; `if`(n=0, 0, ithprime(n)+s(n-1)) end:
a:= proc(n) option remember; local k; for k
while irem(s(k), n)>0 do od; s(k)/n
end:
seq(a(n), n=1..70);
MATHEMATICA
s[n_] := s[n] = If[n == 0, 0, Prime[n] + s[n-1]];
a[n_] := a[n] = Module[{k}, For[k = 1, True, k++, If[Mod[s[k], n] <= 0, Return[s[k]/n]]]];
Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Dec 08 2023, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 21 2019
STATUS
approved