login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002243 Numbers that are not the sum of 3 distinct triangular numbers. 5

%I #17 Nov 25 2014 10:54:38

%S 1,2,3,5,6,8,12,15,20,23,33,78

%N Numbers that are not the sum of 3 distinct triangular numbers.

%t Complement[Range[100],Union[Total/@Subsets[Accumulate[Range[0,12]], {3}]]] (* _Harvey P. Dale_, Sep 02 2014 *)

%o (PARI) is(n)=for(c=ceil((sqrt(24*n-15)+3)/6),(sqrt(8*n-7)-1)/2,my(t=n-c*(c+1)/2);for(b=sqrtint(t-1)+1,min((sqrt(8*n+1)-1)/2,c-1), if(ispolygonal(t-b*(b+1)/2,3), return(0))));1

%o select(is,[1..100]) \\ _Charles R Greathouse IV_, Nov 25 2014

%Y Cf. A000217, A002244.

%K fini,full,nonn

%O 1,2

%A _N. J. A. Sloane_, _Dan Hoey_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 07:40 EDT 2024. Contains 372009 sequences. (Running on oeis4.)