login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.
Note that a(n) = 0 if 4n-1 is prime. - Alfred Heiligenbrunner, Mar 01 2016
LINKS
A. Heiligenbrunner, Tower-Sums of adjacent numbers (in German).
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
Sequence in context: A139032 A182035 A343493 * A281453 A079807 A363887
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 27 02:35 EDT 2024. Contains 374636 sequences. (Running on oeis4.)