login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A319301
Sum of GCDs of strict integer partitions of n.
4
1, 2, 4, 5, 7, 10, 11, 14, 18, 21, 22, 33, 30, 39, 49, 54, 54, 78, 72, 100, 110, 121, 126, 181, 174, 207, 238, 284, 284, 389, 370, 466, 512, 582, 647, 806, 796, 954, 1066, 1265, 1300, 1616, 1652, 1979, 2192, 2452, 2636, 3202, 3336, 3892, 4237, 4843, 5172, 6090
OFFSET
1,2
FORMULA
From Richard L. Ollerton, May 06 2021: (Start)
a(n) = Sum_{d|n} A000010(n/d)*A000009(d).
a(n) = Sum_{k=1..n} A000009(gcd(n,k)).
a(n) = Sum_{k=1..n} A000009(n/gcd(n,k))*A000010(gcd(n,k))/A000010(n/gcd(n,k)). (End)
MAPLE
b:= proc(n, i, r) option remember; `if`(i*(i+1)/2<n, 0,
(t-> `if`(i<n, b(n-i, min(i-1, n-i), t), 0)
+`if`(i=n, t, 0)+b(n, i-1, r))(igcd(i, r)))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=1..61); # Alois P. Heinz, Mar 17 2019
MATHEMATICA
Table[Sum[GCD@@ptn, {ptn, Select[IntegerPartitions[n], UnsameQ@@#&]}], {n, 30}]
(* Second program: *)
b[n_, i_, r_] := b[n, i, r] = If[i(i+1)/2 < n, 0,
With[{t = GCD[i, r]}, If[i < n, b[n - i, Min[i - 1, n - i], t], 0] +
If[i == n, t, 0] + b[n, i - 1, r]]];
a[n_] := b[n, n, 0];
Array[a, 61] (* Jean-François Alcover, May 20 2021, after Alois P. Heinz *)
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 16 2018
STATUS
approved