OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..3320
MAPLE
a[1]:= 1:
for n from 1 to 40 do
P:= ifactors(n)[2];
k:= nops(P);
t:= 0;
for S in combinat:-powerset(k) do
d:= mul(P[i][1]^P[i][2], i=S);
t:= t + a[d]*a[n/d]
od;
a[n+1]:= t
od:
seq(a[i], i=1..41); # Robert Israel, Mar 09 2020
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Sum[If[GCD[(n - 1)/d, d] == 1, a[(n - 1)/d] a[d], 0], {d, Divisors[n - 1]}]; Table[a[n], {n, 1, 36}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Mar 06 2020
STATUS
approved