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!)
A225440 Triangular numbers that are the product of three distinct triangular numbers greater than 1. 2

%I #6 May 08 2013 11:45:57

%S 378,630,990,3240,4095,4950,5460,9180,15400,19110,25200,31878,37128,

%T 37950,39060,52650,61425,79800,97020,103740,105570,122265,145530,

%U 157080,161028,176715,192510,221445,265356,288420,304590,306936,346528,437580,500500,545490,583740

%N Triangular numbers that are the product of three distinct triangular numbers greater than 1.

%C Triangular numbers of the form triangular(x) * triangular(y) * triangular(z), x > y > z > 1.

%H Donovan Johnson, <a href="/A225440/b225440.txt">Table of n, a(n) for n = 1..1000</a>

%e 378 = 3 * 6 * 21.

%e 630 = 3 * 10 * 21.

%e 990 = 3 * 6 * 55.

%o (C)

%o #include <stdio.h>

%o typedef unsigned long long U64;

%o U64 isTriangular(U64 a) { // ! Must be a < (1<<63)

%o U64 s = sqrt(a*2);

%o if (a>=(1ULL<<63)) exit(1);

%o return (s*(s+1)/2 == a);

%o }

%o int compare64(const void *p1, const void *p2) {

%o if (*(U64*)p1 == *(U64*)p2) return 0;

%o if (*(U64*)p1 < *(U64*)p2) return -1;

%o return 1;

%o }

%o #define TOP (1<<21)

%o U64 d[TOP];

%o int main() {

%o U64 c, x, tx, y, ty, z, tz, p = 0;

%o for (x = tx = 3; tx <= TOP; tx+=x, ++x) {

%o for (y = ty = 3; ty < tx; ty+=y, ++y) {

%o for (z = tz = 3; tz < ty; tz+=z, ++z) {

%o c = tx*ty*tz;

%o if (c <= TOP*18 && isTriangular(c)) d[p++] = c;

%o }}}

%o qsort(d, p, 8, compare64);

%o for (x=c=0; c<p; ++c) if ((y=d[c])>x) printf("%llu, ", y), x=y;

%o return 0;

%o }

%Y Cf. A000217, A085780, A140089, A188630, A225390.

%K nonn

%O 1,1

%A _Alex Ratushnyak_, May 08 2013

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)