|
|
A368276
|
|
Number of nonnegative representations of n = w*x + y*z with max(w, x) < min(y, z) and w <= x <= y <= z.
|
|
6
|
|
|
1, 1, 1, 3, 2, 3, 2, 3, 5, 4, 3, 6, 4, 4, 5, 9, 4, 7, 5, 9, 6, 7, 4, 11, 11, 7, 7, 11, 7, 13, 7, 10, 9, 10, 9, 19, 9, 9, 10, 17, 9, 17, 8, 14, 14, 13, 7, 21, 17, 14, 13, 17, 10, 20, 13, 22, 14, 15, 10, 26, 14, 13, 18, 28, 15, 22, 13, 19, 17, 25, 12, 33, 15, 18
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
Number of monotone Bacher representations (A368207) of n. We call a quadruple (w, x, y, z) of nonnegative integers a monotone Bacher representation of n if and only if n = w*x + y*z and w <= x < y <= z.
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 13, the 4 solutions are (w, x, y, z) = (0, 0, 1, 13), (1, 1, 2, 6), (1, 1, 3, 4), (2, 2, 3, 3).
|
|
MATHEMATICA
|
t[n_]:=t[n]=Select[Divisors[n], #^2<=n&];
A368276[n_]:=Total[t[n]]+Sum[Boole[wx<d*dx], {wx, Floor[n/2]}, {dx, t[wx]}, {d, t[n-wx]}];
|
|
PROG
|
(Python)
from itertools import takewhile
from sympy import divisors
c = sum(takewhile(lambda x: x**2 <= n, divisors(n)))
for wx in range(1, (n >> 1) + 1):
for d1 in divisors(wx):
if d1**2 > wx:
break
m = n - wx
c += sum(1
for d in takewhile(lambda x: x**2 <= m, divisors(n - wx))
if wx < d * d1)
(Julia)
using Nemo
t(n) = (d for d in divisors(n) if d * d <= n)
sum(sum(sum(1 for d in t(n - wx) if wx < d * dx; init=0)
for dx in t(wx)) for wx in 1:div(n, 2); init=sum(t(n)))
end
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|