cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A104514 a(n) = least number k > 1 of consecutive integers which sum to 2*n; or a(n) = 0 if n is a power of 2.

This page as a plain text file.
%I A104514 #14 May 06 2015 01:13:46
%S A104514 0,0,3,0,4,3,4,0,3,5,4,3,4,7,3,0,4,3,4,5,3,8,4,3,4,8,3,7,4,3,4,0,3,8,
%T A104514 4,3,4,8,3,5,4,3,4,11,3,8,4,3,4,5,3,13,4,3,4,7,3,8,4,3,4,8,3,0,4,3,4,
%U A104514 16,3,5,4,3,4,8,3,16,4,3,4,5,3,8,4,3,4,8,3,11,4,3,4,16,3,8,4,3,4,7,3,5,4,3,4
%N A104514 a(n) = least number k > 1 of consecutive integers which sum to 2*n; or a(n) = 0 if n is a power of 2.
%C A104514 a(2^k) = 0 and a(3*n) = 3.
%C A104514 Least proper divisor d of 4*n (if any) such that d or 4*n/d is odd. - _Robert Israel_, May 06 2015
%D A104514 Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 67.
%H A104514 Robert Israel, <a href="/A104514/b104514.txt">Table of n, a(n) for n = 1..10000</a>
%F A104514 a(n) = A163169(2*n). _Robert Israel_, May 06 2015
%e A104514 a(9) = 3 because 3+4+5+6 = 5+6+7 = 2*9 = 18.
%p A104514 a:= proc(n) local divs,r;
%p A104514    divs:= select(t -> t::odd or (4*n/t)::odd, numtheory:-divisors(4*n) minus {1,4*n});
%p A104514    if nops(divs)=0 then 0 else min(divs) fi
%p A104514 end proc:
%p A104514 seq(a(n), n=1..200); # _Robert Israel_, May 06 2015
%t A104514 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]; Min[Length /@ lst[[Flatten[Position[Plus @@@ lst, n]]]]]]]; Table[f[2n], {n, 103}]
%Y A104514 Cf. A104512, A104513, A104515, A104516, A163169.
%K A104514 nonn
%O A104514 1,3
%A A104514 Alfred S. Posamentier (asp2(AT)juno.com) and _Robert G. Wilson v_, Feb 23 2005