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.
%I A109814 #64 Dec 23 2022 17:25:42 %S A109814 1,1,2,1,2,3,2,1,3,4,2,3,2,4,5,1,2,4,2,5,6,4,2,3,5,4,6,7,2,5,2,1,6,4, %T A109814 7,8,2,4,6,5,2,7,2,8,9,4,2,3,7,5,6,8,2,9,10,7,6,4,2,8,2,4,9,1,10,11,2, %U A109814 8,6,7,2,9,2,4,10,8,11,12,2,5,9,4,2,8,10,4,6,11,2,12,13,8,6,4,10,3,2,7,11,8,2,12 %N A109814 a(n) is the largest k such that n can be written as sum of k consecutive positive integers. %C A109814 n is the sum of at most a(n) consecutive positive integers. As suggested by _David W. Wilson_, Aug 15 2005: Suppose n is to be written as sum of k consecutive integers starting with m, then 2n = k(2m + k - 1). Only one of the factors is odd. For each odd divisor d of n there is a unique corresponding k = min(d,2n/d). a(n) is the largest among those k. - _Jaap Spies_, Aug 16 2005 %C A109814 The numbers that can be written as a sum of k consecutive positive integers are those in column k of A141419 (as a triangle). - _Peter Munn_, Mar 01 2019 %C A109814 The numbers that cannot be written as a sum of two or more consecutive positive integers are the powers of 2. So a(n) = 1 iff n = 2^k for k >= 0. - _Bernard Schott_, Mar 03 2019 %H A109814 Donovan Johnson, <a href="/A109814/b109814.txt">Table of n, a(n) for n = 1..10000</a> %H A109814 K. S. Brown's Mathpages, <a href="http://www.mathpages.com/home/kmath107.htm">Partitions into Consecutive Integers</a> %H A109814 A. Heiligenbrunner, <a href="http://ah9.at/ahsummen.htm">Sum of adjacent numbers (in German)</a>. %H A109814 Jaap Spies, <a href="http://www.jaapspies.nl/mathfiles/problem2005-2C.pdf">Problem C NAW 5/6 nr. 2 June 2005</a>, July 2005 (solution to problem below). %H A109814 Jaap Spies, <a href="http://www.jaapspies.nl/oeis/a111776.sage">Sage program for computing A109814</a> %H A109814 Universitaire Wiskunde Competitie, <a href="http://www.nieuwarchief.nl/serie5/pdf/naw5-2005-06-2-181.pdf">Problem C</a>, Nieuw Archief voor Wiskunde, 5/6, no. 2, Problems/UWC, Jun 2005, pp. 181-182. %F A109814 From _Reinhard Zumkeller_, Apr 18 2006: (Start) %F A109814 a(n)*(a(n)+2*A118235(n)-1)/2 = n; %F A109814 a(A000079(n)) = 1; %F A109814 a(A000217(n)) = n. (End) %e A109814 Examples provided by _Rainer Rosenthal_, Apr 01 2008: %e A109814 1 = 1 ---> a(1) = 1 %e A109814 2 = 2 ---> a(2) = 1 %e A109814 3 = 1+2 ---> a(3) = 2 %e A109814 4 = 4 ---> a(4) = 1 %e A109814 5 = 2+3 ---> a(5) = 2 %e A109814 6 = 1+2+3 ---> a(6) = 3 %e A109814 a(15) = 5: 15 = 15 (k=1), 15 = 7+8 (k=2), 15 = 4+5+6 (k=3) and 15 = 1+2+3+4+5 (k=5). - _Jaap Spies_, Aug 16 2005 %p A109814 A109814:= proc(n) local m, k, d; m := 0; for d from 1 by 2 to n do if n mod d = 0 then k := min(d, 2*n/d): fi; if k > m then m := k fi: od; return(m); end proc; seq(A109814(i),i=1..150); # _Jaap Spies_, Aug 16 2005 %t A109814 a[n_] := Reap[Do[If[OddQ[d], Sow[Min[d, 2n/d]]], {d, Divisors[n]}]][[2, 1]] // Max; Table[a[n], {n, 1, 102}] %o A109814 (Sage) %o A109814 [sloane.A109814(n) for n in range(1,20)] %o A109814 # _Jaap Spies_, Aug 16 2005 %o A109814 (Python) %o A109814 from sympy import divisors %o A109814 def a(n): return max(min(d, 2*n//d) for d in divisors(n) if d&1) %o A109814 print([a(n) for n in range(1, 103)]) # _Michael S. Branicky_, Dec 23 2022 %Y A109814 Cf. A001227, A111774, A111775, A141419, A138591. %Y A109814 Cf. A000079 (powers of 2), A000217 (triangular numbers). %K A109814 nonn %O A109814 1,3 %A A109814 _David W. Wilson_ %E A109814 Edited by _N. J. A. Sloane_, Aug 23 2008 at the suggestion of _R. J. Mathar_