OFFSET
1,3
COMMENTS
If we let mu() be the Moebius function (A008683), then a(n) = sum mu(j), where j is taken over all parts, with repetitions, of every partition of n and where each j is such that j|n.
EXAMPLE
The 7 partitions of 5 are 1+1+1+1+1, 1+1+1+2, 1+1+3, 1+2+2, 2+3, 1+4, 5. Of these parts, only 1 and 5 divide 5. Since there are twelve 1's and one 5, we have a(5) = 12*mu(1) + 1*mu(5) = 11.
MATHEMATICA
f[n_] := Block[{s = 0, k = 1}, While[k < n + 1, If[ GCD[k, n] == 1, s = s + PartitionsP[k]]; k++ ]; s]; Table[ f[n], {n, 45}] (* Robert G. Wilson v, Jul 29 2004 *)
PROG
(PARI) a(n) = {my(s=0, k=1); while(k< n + 1, if(gcd(k, n)==1, s+=numbpart(k)); k++); s};
for(n=1, 45, print1(a(n), ", ")) \\ Indranil Ghosh, Mar 16 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Leroy Quet, Jul 29 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jul 29 2004
STATUS
approved