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.

A219209 Maximal product of all parts of a partition of n into distinct divisors of n.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 48, 13, 14, 15, 16, 17, 162, 19, 200, 21, 22, 23, 1152, 25, 26, 27, 784, 29, 1350, 31, 32, 33, 34, 35, 15552, 37, 38, 39, 6400, 41, 2058, 43, 44, 45, 46, 47, 73728, 49, 50, 51, 52, 53, 8748, 55, 25088, 57, 58, 59, 864000
Offset: 0

Views

Author

Alois P. Heinz, Nov 14 2012

Keywords

Examples

			a(0) = 1: the empty product.
a(p) = p for any prime p: [p]-> p.
a(12) = 48: [2,4,6]-> 48.
a(20) = 200: [1,4,5,10]-> 200.
a(24) = 1152: [1,2,3,4,6,8]-> 1152.
		

Crossrefs

The number of distinct products are in A219208.

Programs

  • Maple
    a:= proc(n) local b, l;
          l:= sort([numtheory[divisors](n)[]]);
          b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
                max(b(n, i-1), `if`(l[i]>n, 0, l[i] *b(n-l[i], i-1)))))
              end; forget(b);
          b(n, nops(l))
        end:
    seq(a(n), n=0..80);
  • Mathematica
    a[n_] := a[n] = Module[{b, l}, l = Divisors[n]; b[m_, i_] := b[m, i] = If[m == 0, 1, If[i<1, 0, Max[b[m, i-1], If[l[[i]]>m, 0, l[[i]]*b[m-l[[i]], i-1] ]]]]; b[n, Length[l]]]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Feb 16 2017, translated from Maple *)