A212216
Number of representations of n as a sum of products of distinct pairs of positive integers, n = Sum_{k=1..m} i_k*j_k with i_k<=j_k, i_k<=i_{k+1}, j_k<=j_{k+1}, i_k*j_k
1, 1, 1, 2, 3, 4, 6, 7, 8, 12, 15, 18, 25, 28, 34, 44, 51, 59, 75, 87, 103, 124, 143, 163, 198, 228, 261, 310, 354, 404, 479, 538, 612, 708, 802, 907, 1049, 1175, 1320, 1518, 1711, 1910, 2187, 2431, 2724, 3097, 3447, 3843, 4348, 4818, 5373, 6032, 6693, 7420
Offset: 0
Keywords
Examples
a(0) = 1: 0 = the empty sum. a(1) = 1: 1 = 1*1. a(2) = 1: 2 = 1*2. a(3) = 2: 3 = 1*1 + 1*2 = 1*3. a(4) = 3: 4 = 1*1 + 1*3 = 1*4 = 2*2. a(5) = 4: 5 = 1*2 + 1*3 = 1*1 + 1*4 = 1*1 + 2*2 = 1*5. a(6) = 6: 6 = 1*1 + 1*2 + 1*3 = 1*2 + 1*4 = 1*2 + 2*2 = 1*1 + 1+5 = 1*6 = 2*3.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..200
Crossrefs
Programs
-
Maple
with(numtheory): b:= proc(n, m, i, j) option remember; `if`(n=0, 1, `if`(m<1, 0, b(n, m-1, i, j) +`if`(m>n, 0, add(b(n-m, m-1, min(i, k), min(j, m/k)), k=select(x-> is(x<=min(sqrt(m), i) and m<=j*x), divisors(m)))))) end: a:= n-> b(n$4): seq(a(n), n=0..30);
-
Mathematica
b[n_, m_, i_, j_] := b[n, m, i, j] = If[n == 0, 1, If[m<1, 0, b[n, m-1, i, j]+If[m>n, 0, Sum [b[n-m, m-1, Min[i, k], Min[j, m/k]], {k, Select[Divisors[m], # <= Min [Sqrt[m], i] && m <= j*# &]}]]]]; a[n_] := b[n, n, n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 04 2014, after Alois P. Heinz *)