login
Sums of two or more positive consecutive odd numbers.
6

%I #22 Oct 21 2022 07:59:20

%S 4,8,9,12,15,16,20,21,24,25,27,28,32,33,35,36,39,40,44,45,48,49,51,52,

%T 55,56,57,60,63,64,65,68,69,72,75,76,77,80,81,84,85,87,88,91,92,93,95,

%U 96,99,100,104,105,108,111,112,115,116,117,119,120,121,123,124,125,128

%N Sums of two or more positive consecutive odd numbers.

%C Sums of two or more positive consecutive odd numbers are Sum_{k=0..m} (2*j+i+2*k) = (m+1)*(m+2*j+i) with m >= 1 and 2*j+i >=1. Testing a number n against being a member can be done by scanning all divisors d, building m=d-1, if this is >= 1 building n/d-m, and testing this for being an odd number >= 1. - _R. J. Mathar_, Jan 25 2011

%C The sums of two positive consecutive odd numbers are A008586 (without 0), the sums of three positive consecutive odd numbers are A016945 (without 3), etc.

%D Paul Halmos, "Problems for Mathematicians, Young and Old", Dolciani Mathematical Expositions, 1991, Solution to problem 3G, p. 179.

%H Erzsébet Orosz, <a href="http://ami.ektf.hu/uploads/papers/finalpdf/AAPASM_31_from125to129.pdf">On odd-summing numbers</a>, Acta Academiae Paedagogicae Agriensis, Sectio Mathematicae 31 (2004) 125-129.

%e 1+3=4, 3+5=8, 1+3+5=9, 5+7=12, 3+5+7=15, 7+9=16, ...

%p isA177713 := proc(n) local d,l; for d in numtheory[divisors](n) do l := d-1 ; if l >=1 then l := n/d -l; if type(l,'odd') and l>=1 then return true; end if; end if; end do: return false; end proc:

%p for n from 2 to 130 do if isA177713(n) then printf("%d,",n) ; end if; end do; # _R. J. Mathar_, Jan 25 2011

%t z=200; lst={}; Do[c=a; Do[c+=b; If[c<=2*z, AppendTo[lst,c]], {b,a-2,1,-2}],{a,1,z,2}]; Union@lst

%Y Cf. A008586, A016945.

%K nonn,easy

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, May 11 2010