OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..2000
MAPLE
dc:= proc(b, c) proc(n) option remember; add(
b(d)*c(n/d), d=numtheory[divisors](n)) end
end:
a:= dc(x-> 3^(x-1), y-> `if`(y=1, 1, ithprime(y-1))):
seq(a(n), n=1..33); # Alois P. Heinz, Nov 07 2021
MATHEMATICA
dc[b_, c_] := Module[{a}, a[n_] := a[n] = Sum[
b[d]*c[n/d], {d, Divisors[n]}]; a];
a = dc[3^(#-1)&, If[# == 1, 1, Prime[#-1]]&];
Table[a[n], {n, 1, 33}] (* Jean-François Alcover, May 21 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved