OFFSET
1,15
COMMENTS
a(n)=0 iff n=2^k.
REFERENCES
Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 67.
EXAMPLE
a(18) = 1 because 3+4+5+6 = 5+6+7 = 18.
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]]]; Table[ f[2n], {n, 105}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Alfred S. Posamentier (asp2(AT)juno.com) and Robert G. Wilson v, Feb 23 2005
STATUS
approved