OFFSET
1,3
FORMULA
a(n)=a(n-1)-1+(number of partitions of n into relatively prime parts).
EXAMPLE
a(1)=0.
a(2)=1 counts 1/2 + 1/2.
a(3)=3 counts 1/2 + 1/2, 1/3 + 1/3 + 1/3, and 1/3 + 2/3.
MATHEMATICA
p[n_] := p[n] = IntegerPartitions[n];
l[n_] := Length[p[n]];
p[n_, j_] := p[n, j] = Part[p[n], j]
g[n_, j_] := g[n, j] = Apply[GCD, p[n, j]]
h[n_] := h[n] = Table[g[n, j], {j, 1, l[n]}]
c[n_] := c[n] = Count[h[n], 1]
Table[c[n], {n, 0, 45}] (* A000837 *)
s[n_] := Sum[c[k], {k, 1, n}]
Table[s[n] - 1, {n, 1, 45}] (* A209489 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 09 2012
STATUS
approved