|
|
A095808
|
|
Number of ways to write n in the form m + (m+1) + ... + (m+k-1) + (m+k) + (m+k-1) + ... + (m+1) + m with integers m>= 1, k>=1. Or, number of divisors a of 4n-1 with 0 < (a-1)^2 < 4n.
|
|
1
|
|
|
0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 2, 0, 0, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 1, 0, 0, 3, 0, 1, 2, 0, 1, 1, 0, 0, 2, 2, 0, 1, 1, 0, 3, 0, 1, 2, 0, 1, 1, 0, 0, 3, 1, 0, 2, 1, 0, 3, 1, 0, 1, 0, 2, 2, 0, 1, 1, 1, 1, 1, 0, 0, 5, 1, 1, 1, 0, 1, 1, 1, 0, 3, 1, 0, 2, 0, 1, 3, 0, 0, 2, 1, 1, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,16
|
|
COMMENTS
|
n = m + (m+1) + ... + (m+k-1) + (m+k) + (m+k-1) + ... + (m+1) + m means n = k^2 + m*(2k+1) or 4n-1 = (2k+1)*(4m+2k-1). So if 4n-1 disparts into two odd factors a*b, then k = (a-1)/2, m=(n-k^2)/(2k+1) give the solution of the origin equation. We only count solutions with k^2 < n, such that m>0. This means we are taking into account only factors a < 2n+1.
|
|
LINKS
|
|
|
EXAMPLE
|
a(16)=2 because 16 = 5+6+5 and 16 = 1+2+3+4+3+2+1.
The trivial case 16=16 (k=0, m=n) is not counted. The cases m=0, e.g. 16 = 0+1+2+3+4+3+2+1+0 are not counted. The cases m<0 e.g. 16 = -4+-3+-2+-1+0+1+2+3+4+5+6+5+4+3+2+1+0+-1+-2+-3+-4 are not counted.
|
|
MATHEMATICA
|
h1 = Table[count = 0; For[k = 1, k^2 < n, k++, If[Mod[n - k^2, 2k + 1] == 0, count++ ]]; count, {n, 100}] - or - h2 = Table[Length[Select[Divisors[4n - 1], ((# - 1)^2 < 4n) &]] - 1, {n, 100}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|