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.

A225536 Numbers of triples {x, y, z} such that z >= y > 1 and prime(x) + prime(y) * prime(z) = 2^n.

This page as a plain text file.
%I A225536 #5 May 10 2013 14:07:39
%S A225536 0,0,0,0,1,4,5,15,22,43,65,131,204,387,635,1136,2048,3727,6794,12296,
%T A225536 22601,41746,76778,141923,263414,491925,917269,1718985,3225496,
%U A225536 6067030,11435208,21593415,40858139
%N A225536 Numbers of triples {x, y, z} such that z >= y > 1 and prime(x) + prime(y) * prime(z) = 2^n.
%e A225536 2^4 = 16 = 7 + 3*3, so a(4) = 1.
%e A225536 2^5 = 32 = 7 + 5*5 = 11 + 3*7 = 17 + 3*5 = 23 + 3*3, so a(5) = 4.
%o A225536 (C)
%o A225536 #include <stdio.h>
%o A225536 #include <math.h>
%o A225536 #define TOP (1ULL<<32)
%o A225536 int main() {
%o A225536   unsigned long long i, j, k, n, pp = 0, x, px, y, py, sr;
%o A225536   unsigned int *primes = (unsigned int*)malloc(TOP/4);
%o A225536   char *c = (char*)malloc(TOP/2);
%o A225536   memset(c, 0, TOP/2);
%o A225536   for (c[0] = i = 3; i < TOP; i+=2)
%o A225536     if (c[i>>1]==0)
%o A225536       for (primes[pp++]=i, j=i*i>>1; j<TOP/2; j+=i)  c[j]=1;
%o A225536   for (n = 1; n <= TOP; n+=n) {
%o A225536     for (k = x = 0; x < pp && (px = primes[x]) < n; ++x) {
%o A225536       for (i=n-px, sr=sqrt(i), y=0; (py=primes[y])<=sr; ++y)
%o A225536         if (i % py == 0) { if (c[i/py>>1] == 0) ++k; break; }
%o A225536     }
%o A225536     printf("%llu, ", k);
%o A225536   }
%o A225536 }
%Y A225536 Cf. A000040, A006307, A225437.
%K A225536 nonn,more
%O A225536 0,6
%A A225536 _Alex Ratushnyak_, May 10 2013