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”).

Sum of GCDs of strict integer partitions of n.
4

%I #19 May 20 2021 04:08:35

%S 1,2,4,5,7,10,11,14,18,21,22,33,30,39,49,54,54,78,72,100,110,121,126,

%T 181,174,207,238,284,284,389,370,466,512,582,647,806,796,954,1066,

%U 1265,1300,1616,1652,1979,2192,2452,2636,3202,3336,3892,4237,4843,5172,6090

%N Sum of GCDs of strict integer partitions of n.

%H Alois P. Heinz, <a href="/A319301/b319301.txt">Table of n, a(n) for n = 1..1000</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_(number_theory)">Partition (number theory)</a>

%F From _Richard L. Ollerton_, May 06 2021: (Start)

%F a(n) = Sum_{d|n} A000010(n/d)*A000009(d).

%F a(n) = Sum_{k=1..n} A000009(gcd(n,k)).

%F a(n) = Sum_{k=1..n} A000009(n/gcd(n,k))*A000010(gcd(n,k))/A000010(n/gcd(n,k)). (End)

%p b:= proc(n, i, r) option remember; `if`(i*(i+1)/2<n, 0,

%p (t-> `if`(i<n, b(n-i, min(i-1, n-i), t), 0)

%p +`if`(i=n, t, 0)+b(n, i-1, r))(igcd(i, r)))

%p end:

%p a:= n-> b(n$2, 0):

%p seq(a(n), n=1..61); # _Alois P. Heinz_, Mar 17 2019

%t Table[Sum[GCD@@ptn,{ptn,Select[IntegerPartitions[n],UnsameQ@@#&]}],{n,30}]

%t (* Second program: *)

%t b[n_, i_, r_] := b[n, i, r] = If[i(i+1)/2 < n, 0,

%t With[{t = GCD[i, r]}, If[i < n, b[n - i, Min[i - 1, n - i], t], 0] +

%t If[i == n, t, 0] + b[n, i - 1, r]]];

%t a[n_] := b[n, n, 0];

%t Array[a, 61] (* _Jean-François Alcover_, May 20 2021, after _Alois P. Heinz_ *)

%Y Cf. A000009, A000010, A078374, A078392, A289508, A289509, A303138, A306956, A319300.

%K nonn

%O 1,2

%A _Gus Wiseman_, Sep 16 2018