login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A225536
Numbers of triples {x, y, z} such that z >= y > 1 and prime(x) + prime(y) * prime(z) = 2^n.
1
0, 0, 0, 0, 1, 4, 5, 15, 22, 43, 65, 131, 204, 387, 635, 1136, 2048, 3727, 6794, 12296, 22601, 41746, 76778, 141923, 263414, 491925, 917269, 1718985, 3225496, 6067030, 11435208, 21593415, 40858139
OFFSET
0,6
EXAMPLE
2^4 = 16 = 7 + 3*3, so a(4) = 1.
2^5 = 32 = 7 + 5*5 = 11 + 3*7 = 17 + 3*5 = 23 + 3*3, so a(5) = 4.
PROG
(C)
#include <stdio.h>
#include <math.h>
#define TOP (1ULL<<32)
int main() {
unsigned long long i, j, k, n, pp = 0, x, px, y, py, sr;
unsigned int *primes = (unsigned int*)malloc(TOP/4);
char *c = (char*)malloc(TOP/2);
memset(c, 0, TOP/2);
for (c[0] = i = 3; i < TOP; i+=2)
if (c[i>>1]==0)
for (primes[pp++]=i, j=i*i>>1; j<TOP/2; j+=i) c[j]=1;
for (n = 1; n <= TOP; n+=n) {
for (k = x = 0; x < pp && (px = primes[x]) < n; ++x) {
for (i=n-px, sr=sqrt(i), y=0; (py=primes[y])<=sr; ++y)
if (i % py == 0) { if (c[i/py>>1] == 0) ++k; break; }
}
printf("%llu, ", k);
}
}
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Alex Ratushnyak, May 10 2013
STATUS
approved