OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..5000
MAPLE
with(numtheory):
b:= proc(n) option remember; `if`(n=1, 1,
add(b(n/q*`if`(q=2, 1, prevprime(q))), q=factorset(n)))
end:
a:= proc(n) a(n):= b(n)+ `if`(n=1, 0, a(n-1)) end:
seq(a(n), n=1..100); # Alois P. Heinz, Aug 09 2012
MATHEMATICA
b[n_] := b[n] = If[n == 1, 1, Sum[b[n/q If[q == 2, 1, NextPrime[q, -1]]], {q, FactorInteger[n][[All, 1]]}]];
a[n_] := a[n] = b[n] + If[n == 1, 0, a[n - 1]];
Array[a, 100] (* Jean-François Alcover, Nov 20 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, Dec 31 2008
EXTENSIONS
More terms from Alois P. Heinz, Aug 09 2012
STATUS
approved