OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..50
V. A. Liskovets, Some easily derivable sequences, J. Integer Sequences, 3 (2000), #00.2.2.
MATHEMATICA
permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
edges[v_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v - 1];
b[n_] := (s = 0; Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]}]; s/n!);
edges4[v_] := 4 Sum[Sum[GCD[v[[i]], v[[j]]], {j, 1, i - 1}], {i, 2, Length[v]}] + Sum[2 v[[i]] - 1, {i, 1, Length[v]}];
c[n_] := (s = 0; Do[s += permcount[2 p]*2^edges4[p]*If[OddQ[n], n *4^Length[p], 1], {p, IntegerPartitions[n/2 // Floor]}]; s/n!);
a[n_] := (b[n] + c[n])/2;
Array[a, 14] (* Jean-François Alcover, Aug 26 2019, using Andrew Howroyd's code for b=A000273 and c=A003086 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 24 2000
EXTENSIONS
More terms from Vladeta Jovovic, Jul 19 2000
Terms a(14) and beyond from Andrew Howroyd, Sep 17 2018
STATUS
approved