A212597 Number of ways of writing n in the form i*j+k*m with 0
0, 0, 1, 1, 3, 3, 5, 5, 7, 9, 10, 11, 14, 15, 16, 19, 20, 23, 24, 27, 28, 33, 30, 37, 36, 42, 40, 48, 44, 53, 49, 57, 55, 65, 55, 72, 64, 74, 70, 83, 72, 90, 77, 95, 87, 102, 84, 112, 94, 112, 104, 124, 102, 133, 109, 135, 123, 142, 117, 160, 128, 152, 138
Offset: 1
Examples
1*1+1*4 = 1*2+1*3 = 1*1+2*2 = 5, so a(5) = 3.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
Maple
with(numtheory): a:= proc(n) local j, l, m; add(add(add(`if`(j
is(h>=sqrt(n-l)), divisors(n-l))), j=select(h-> is(h>=sqrt(l)), divisors(l))), l=1..n-1) end: seq(a(n), n=1..100); # Alois P. Heinz, May 24 2012 -
Mathematica
a[n_] := Sum[Sum[Sum[If[j < m || j == m && l*m < (n-l)*j, 1, 0], {m, Select[Divisors[n-l], # >= Sqrt[n-l]&]}], {j, Select[Divisors[l], # >= Sqrt[l]&]}], {l, 1, n-1}]; Array[a, 100] (* Jean-François Alcover, Mar 27 2017, after Alois P. Heinz *)