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.

A177733 Integers that can be expressed as the sum of two or more positive consecutive numbers (the largest being even) AND also as the sum of two or more positive consecutive numbers (the largest being odd).

This page as a plain text file.
%I A177733 #15 May 02 2023 03:03:52
%S A177733 9,15,18,21,27,30,33,35,36,39,42,45,49,51,54,55,57,60,63,66,69,70,72,
%T A177733 75,77,78,81,84,87,90,91,93,95,98,99,102,105,108,110,111,114,115,117,
%U A177733 119,120,121,123,126,129,132,133,135,138,140,141,143,144,147,150,153,154
%N A177733 Integers that can be expressed as the sum of two or more positive consecutive numbers (the largest being even) AND also as the sum of two or more positive consecutive numbers (the largest being odd).
%C A177733 Intersection of A177732 and A177731.
%C A177733 From _Robert Israel_, May 02 2023: (Start)
%C A177733 Numbers k with odd divisors d_1, d_2 >= 2 such that k + (d_1+1)/2 is odd and
%C A177733 k + (d_2+1)/2 is even.
%C A177733 Contains no primes, powers of 2 or products of a prime and a power of 2.
%C A177733 Contains odd semiprime p*q iff at least one of p and q == 3 (mod 4).
%C A177733 (End)
%H A177733 Robert Israel, <a href="/A177733/b177733.txt">Table of n, a(n) for n = 1..10000</a>
%e A177733 9 is in the sequence because 2+3+4=9=4+5.
%e A177733 15 is in the sequence because 7+8=15=1+2+3+4+5.
%p A177733 filter:= proc(n) local a,b,x,y,todd,teven;
%p A177733    todd:= false; teven:= false;
%p A177733    for a in select(type,numtheory:-divisors(n),odd) minus {1} do
%p A177733      b:= 2*n/a;
%p A177733      x:= (a+b+1)/2;
%p A177733        if x::odd then todd:= true; if teven then return true fi
%p A177733        else teven:= true; if todd then return true fi
%p A177733      fi od:
%p A177733   false
%p A177733 end proc:
%p A177733 select(filter, [$1..200]); # _Robert Israel_, May 01 2023
%t A177733 z=200;lst1={};Do[c=a;Do[c+=b;If[c<=2*z,AppendTo[lst1,c]],{b,a-1,1,-1}],{a,1,z,2}];Union@lst1; z=200;lst2={};Do[c=a;Do[c+=b;If[c<=2*z,AppendTo[lst2,c]],{b,a-1,1,-1}],{a,2,z,2}]; Intersection[lst1,lst2]
%Y A177733 Cf. A000217, A177713.
%K A177733 nonn
%O A177733 1,1
%A A177733 _Vladimir Joseph Stephan Orlovsky_, May 12 2010