OFFSET
0,1
LINKS
Jean-François Alcover, Table of n, a(n) for n = 0..1000
MAPLE
with(numtheory):
b:= proc(n) option remember; nops(invphi(n)) end:
g:= proc(n) option remember; `if`(n=0, 1, add(
g(n-j)*add(d*b(d), d=divisors(j)), j=1..n)/n)
end:
a:= n-> g(n)+g(2*iquo(n, 2)+1)/2:
seq(a(n), n=0..40); # Alois P. Heinz, Mar 02 2023
MATHEMATICA
b[n_] := b[n] = Length[invphi[n]];
g[n_] := g[n] = If[n == 0, 1, Sum[g[n - j]*Sum[d*b[d], {d, Divisors[j]}], {j, 1, n}]/n];
a[n_] := g[n] + g[2*Quotient[n, 2] + 1]/2;
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Nov 16 2023, after Alois P. Heinz and using Maxim Rytin's invphi program (see A007617) *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 02 2023
STATUS
approved