OFFSET
2,2
COMMENTS
a(p)=2^(p-1)-1 = S2(p,2) where p is a prime and S2(n,k) is the Stirling number of the second kind.
a(n) is the coefficient of x^n/n! in the Taylor series expansion of B(A(x)) where A(x)= Sum_{over positive integers relatively prime to n}x^n/n! and B(x)=x^2/2!.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 2..1000
MAPLE
a:= n-> `if`(n=2, 1, add(`if`(igcd(k, n-k)=1,
binomial(n, k), 0), k=1..iquo(n, 2))):
seq(a(n), n=2..50); # Alois P. Heinz, Nov 02 2011
MATHEMATICA
f[list_]:=x^First[list]/First[list]!+x^Last[list]/Last[list]!;
Prepend[Table[a=Total[Map[f, Select[IntegerPartitions[n, 2], Apply[GCD, #]==1&]]]; Last[Range[0, n]! CoefficientList[Series[a^2/2!, {x, 0, n}], x]], {n, 3, 30}], 1]
(* Second program: *)
a[n_] := If[n == 2, 1, Sum[If[GCD[k, n-k] == 1, Binomial[n, k], 0], {k, 1, Quotient[n, 2]}]];
a /@ Range[2, 50] (* Jean-François Alcover, Jun 09 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Geoffrey Critzer, Oct 12 2011
STATUS
approved