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.
%I A226147 #5 May 29 2013 12:16:50 %S A226147 193,233,265,301,526,709,753,922,961,962,986,1126,1178,1285,1373,1485, %T A226147 1525,1537,1558,1601,1710,1737,1962,1965,2202,2437,2466,2578,2685, %U A226147 2693,2862,3206,3346,3462,3622,3682,3937,3938,3965,4005,4017,4018,4058,4393,4489,4498,4717 %N A226147 Numbers n such that triangular(n) is an average of three successive primes. %o A226147 (C) %o A226147 #include <stdio.h> %o A226147 #include <stdlib.h> %o A226147 #include <math.h> %o A226147 #define TOP (1ULL<<30) %o A226147 int main() { %o A226147 unsigned long long i, j, p1, p2, r, s; %o A226147 unsigned char *c = (unsigned char *)malloc(TOP/8); %o A226147 memset(c, 0, TOP/8); %o A226147 for (i=3; i < TOP; i+=2) %o A226147 if ((c[i>>4] & (1<<((i>>1) & 7)))==0 /*&& i<(1ULL<<32)*/) %o A226147 for (j=i*i>>1; j<TOP; j+=i) c[j>>3] |= 1 << (j&7); %o A226147 for (p2=2, p1=3, i=5; i < TOP; i+=2) %o A226147 if ((c[i>>4] & (1<<((i>>1) & 7)))==0) { %o A226147 s = p2 + p1 + i; %o A226147 if ((s%3)==0) { %o A226147 s/=3; %o A226147 r = sqrt(s*2); %o A226147 if (r*(r+1)==s*2) printf("%llu, ", r); %o A226147 } %o A226147 p2 = p1, p1 = i; %o A226147 } %o A226147 return 0; %o A226147 } %Y A226147 Cf. A076304, A206279, A226145-A226150. %K A226147 nonn %O A226147 1,1 %A A226147 _Alex Ratushnyak_, May 28 2013