This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A339312 #30 Mar 09 2021 05:07:19 %S A339312 0,1,2,4,6,10,17,23,33,47,71,92,129,169,235,299,408,525,691,885,1147, %T A339312 1427,1832,2312,2878,3635,4519,5631,7002,8637,10514,13055,15864,19396, %U A339312 23530,28702,34746,42210,50671,61224,73506,88394,105447,126398,150588,179075 %N A339312 Sum over all partitions of n of the GCD of the number of parts and the number of distinct parts. %H A339312 Alois P. Heinz, <a href="/A339312/b339312.txt">Table of n, a(n) for n = 0..1000</a> %p A339312 b:= proc(n, i, p, d) option remember; `if`(n=0, igcd(p, d), %p A339312 add(b(n-i*j, i-1, p+j, d+signum(j)), j=`if`(i>1, 0..n/i, n))) %p A339312 end: %p A339312 a:= n-> b(n$2, 0$2): %p A339312 seq(a(n), n=0..50); %t A339312 b[n_, i_, p_, d_] := b[n, i, p, d] = If[n == 0, GCD[p, d], %t A339312 Sum[b[n - i*j, i - 1, p + j, d + Sign[j]], %t A339312 {j, If[i > 1, Range[0, n/i], {n}]}]]; %t A339312 a[n_] := b[n, n, 0, 0]; %t A339312 a /@ Range[0, 50] (* _Jean-François Alcover_, Mar 09 2021, after _Alois P. Heinz_ *) %Y A339312 Cf. A003989, A050873, A096541, A339006, A339011, A339394. %K A339312 nonn %O A339312 0,3 %A A339312 _Alois P. Heinz_, Dec 02 2020