cp's OEIS Frontend

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.

A339312 Sum over all partitions of n of the GCD of the number of parts and the number of distinct parts.

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 17, 23, 33, 47, 71, 92, 129, 169, 235, 299, 408, 525, 691, 885, 1147, 1427, 1832, 2312, 2878, 3635, 4519, 5631, 7002, 8637, 10514, 13055, 15864, 19396, 23530, 28702, 34746, 42210, 50671, 61224, 73506, 88394, 105447, 126398, 150588, 179075
Offset: 0

Views

Author

Alois P. Heinz, Dec 02 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p, d) option remember; `if`(n=0, igcd(p, d),
          add(b(n-i*j, i-1, p+j, d+signum(j)), j=`if`(i>1, 0..n/i, n)))
        end:
    a:= n-> b(n$2, 0$2):
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, i_, p_, d_] := b[n, i, p, d] = If[n == 0, GCD[p, d],
         Sum[b[n - i*j, i - 1, p + j, d + Sign[j]],
         {j, If[i > 1, Range[0, n/i], {n}]}]];
    a[n_] := b[n, n, 0, 0];
    a /@ Range[0, 50] (* Jean-François Alcover, Mar 09 2021, after Alois P. Heinz *)