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.

A226501 Triangular numbers that are the product of 4 distinct triangular numbers greater than 1.

This page as a plain text file.
%I A226501 #7 Jun 12 2013 13:56:09
%S A226501 25200,97020,145530,499500,673380,749700,839160,1185030,1445850,
%T A226501 1786995,1873080,2031120,2049300,2162160,2821500,3444000,3646350,
%U A226501 4250070,4573800,4915680,4991220,5364450,5512860,6193440,11594520,11763675,12748725,13857480,14340690,15481830
%N A226501 Triangular numbers that are the product of 4 distinct triangular numbers greater than 1.
%o A226501 (C)
%o A226501 #include <stdio.h>
%o A226501 #include <math.h>
%o A226501 typedef unsigned long long U64;
%o A226501 U64 isTriangular(U64 a) {  // ! Must be a < (1<<63)
%o A226501     U64 s = sqrt(a*2);
%o A226501     if (a>=(1ULL<<63)) exit(1);
%o A226501     return (s*(s+1) == a*2);
%o A226501 }
%o A226501 int compare64(const void *p1, const void *p2) {
%o A226501   if (*(U64*)p1 == *(U64*)p2) return 0;
%o A226501   return (*(U64*)p1 < *(U64*)p2) ? -1 : 1;
%o A226501 }
%o A226501 #define TOP (1ULL<<19)
%o A226501 U64 d[TOP];
%o A226501 int main() {
%o A226501   U64 n, x, tx, y, ty, z, tz, w, tw, p = 0;
%o A226501   for (x = tx = 3; tx <= TOP; tx+=x, ++x) {
%o A226501   for (y = ty = 3; ty < tx;   ty+=y, ++y) {
%o A226501   for (z = tz = 3; tz < ty;   tz+=z, ++z) {
%o A226501   for (w = tw = 3; tw < tz;   tw+=w, ++w) {
%o A226501     n = tx*ty*tz;
%o A226501     if (n<TOP*180 && (n*=tw)<TOP*180 && isTriangular(n))
%o A226501       d[p++] = n;
%o A226501   }}}}
%o A226501   qsort(d, p, 8, compare64);
%o A226501   for (x=n=0; n<p; ++n)
%o A226501     if (d[n] > x)  x = d[n], printf("%llu, ", x);
%o A226501   return 0;
%o A226501 }
%Y A226501 Cf. A000217, A225440.
%K A226501 nonn
%O A226501 1,1
%A A226501 _Alex Ratushnyak_, Jun 09 2013