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!)
A104516 a(n) is the first occurrence of k in A104515, the difference between the maximum number of consecutive integers and the minimum number >1 of consecutive integers, the sum of which equals n. 4
1, 9, 30, 15, 21, 35, 54, 45, 55, 77, 156, 91, 105, 135, 204, 153, 171, 209, 252, 231, 253, 299, 450, 325, 351, 405, 522, 435, 465, 527, 594, 561, 595, 665, 888, 703, 741, 819, 984, 861, 903, 989 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
a(n)=0 iff n=2^k.
Where a(n)=k & a(n+2)=k+1 for k=54,252,594,...
REFERENCES
Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 67.
LINKS
EXAMPLE
a(2)=30 because 4+5+6+7+8 = 9+10+11 = 30.
MATHEMATICA
f[n_] := Block[{r = Ceiling[n/2]}, If[ IntegerQ[ Log[2, n]], 0, m = Range[r]; lst = Flatten[ Table[ m[[k]], {i, r}, {j, i + 1, r}, {k, i, j}], 1]; l = Length /@ lst[[ Flatten[ Position[ Plus @@@ lst, n]]]]; Max[l] - Min[l]]]; t = Table[0, {50}]; Do[ c = f[n]; If[ t[[c + 1]] == 0, t[[c + 1]] = n; Print[{n, c}]], {n, 10^4}]; t
CROSSREFS
Sequence in context: A173262 A337445 A291159 * A279618 A158503 A179506
KEYWORD
nonn
AUTHOR
Alfred S. Posamentier (asp2(AT)juno.com) and Robert G. Wilson v, Feb 23 2005
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 April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)