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.

A282249 Number of representations of n as a sum of products of pairs of positive integers: n = Sum_{k=1..m} i_k*j_k with m >= 0, i_k < j_k, j_k > j_{k+1} and all factors distinct.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 2, 1, 3, 3, 4, 4, 6, 5, 6, 8, 8, 9, 11, 10, 14, 15, 14, 14, 21, 18, 21, 25, 25, 30, 34, 33, 42, 45, 41, 55, 62, 58, 66, 79, 76, 94, 95, 97, 115, 131, 120, 148, 153, 159, 175, 203, 189, 226, 232, 243, 268, 299, 271, 340, 349, 363, 389
Offset: 0

Views

Author

Alois P. Heinz, Feb 09 2017

Keywords

Comments

Or number of partitions of n where part i has multiplicity < i and all multiplicities are distinct and different from all parts.

Examples

			a(0) = 1: the empty sum.
a(6) = 2: 1*6 = 2*3.
a(8) = 2: 1*8 = 2*4.
a(10) = 3: 1*10 = 2*5 = 1*4+2*3.
a(11) = 3: 1*11 = 1*5+2*3 = 2*4+1*3.
a(12) = 4: 1*12 = 2*6 = 1*6+2*3 = 3*4.
a(13) = 4: 1*13 = 1*7+2*3 = 2*5+1*3 = 1*5+2*4.
a(14) = 6: 1*14 = 1*8+2*3 = 2*7 = 1*6+2*4 = 2*5+1*4 = 3*4+1*2.
a(15) = 5: 1*15 = 1*9+2*3 = 1*7+2*4 = 2*6+1*3 = 3*5.
a(25) = 14: 1*25 = 1*19+2*3 = 1*17+2*4 = 1*15+2*5 = 1*13+2*6 = 1*13+3*4 = 2*11+1*3 = 1*11+2*7 = 2*10+1*5 = 1*10+3*5 = 2*9+1*7 = 1*9+2*8 = 3*7+1*4 = 1*7+3*6.
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember;
          (((2*n+3)*n-2)*n-`if`(n::odd, 3, 0))/12
        end:
    g:= (n, i, s)-> `if`(n=0, 1, `if`(n>h(i), 0,
                    b(n, i, select(x-> x<=i, s)))):
    b:= proc(n, i, s) option remember; g(n, i-1, s)+
         `if`(i in s, 0, add(`if`(j in s, 0, g(n-i*j,
          min(n-i*j, i-1), s union {j})), j=1..min(i-1, n/i)))
        end:
    a:= n-> g(n$2, {}):
    seq(a(n), n=0..100);
  • Mathematica
    h[n_] := h[n] = (((2*n + 3)*n - 2)*n - If[OddQ[n], 3, 0])/12;
    g[n_, i_, s_] := If[n==0, 1, If[n>h[i], 0, b[n, i, Select[s, # <= i&]]]];
    b[n_, i_, s_] := b[n, i, s] = g[n, i - 1, s] + If[MemberQ[s, i], 0, Sum[If[MemberQ[s, j], 0, g[n - i*j, Min[n - i*j, i - 1], s ~Union~ {j}]], {j, 1, Min[i - 1, n/i]}]];
    a[n_] := g[n, n, {}];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 01 2018, after Alois P. Heinz *)