#include #include #include #include int pow_bound = INT_MAX; int is_prime(int number) { int i; int prime = 0; int bound; int index; bound = (int)sqrt(number); prime = 100008; for (i = 2; i <= bound; i++) { if(number % i == 0) { prime = 0; break; } } return prime; } int gcd(int x, int y) { int r; while (x != 0) { r = y % x; y = x; x = r; } return y; } int compute_phi_n(int N) { int i; int result = 2; for(i = 3; i < N; i++) { if (gcd(i, N) == 1) { result += 1; } } return result; } int main(int argc, char *argv[]) { int index, index1; int phi_N, phi_N1; int N, N1; int prime_index; int i, j; int diff; int count = 0; printf("A269257: Primes p such that p+16, p+64, p+256 are all primes\n"); N = 3; while(N <= 100000000) { if((is_prime(N) > 1) && (is_prime(N+256) > 1) && (is_prime(N+64) > 1) && (is_prime(N+16) > 1)) { if(count <= 200) printf("%d,", N); count++; } N += 2; } printf("\n\nA269258: Primes p such that p+16, p+64, p+256, p+1024 are all primes\n"); count = 0; N = 3; while(N <= 100000000) { if((is_prime(N) > 1) && (is_prime(N+1024) > 1) && (is_prime(N+256) > 1) && (is_prime(N+64) > 1) && (is_prime(N+16) > 1)) { if(count <= 200) printf("%d,", N); count++; } N += 2; } printf("\n\nA269259: Primes p such that p+16, p+64, p+256, p+1024, p+4096 are all primes\n"); count = 0; N = 3; while(N <= 100000000) { if((is_prime(N) > 1) && (is_prime(N+4096) > 1) && (is_prime(N+1024) > 1) && (is_prime(N+256) > 1) && (is_prime(N+64) > 1) && (is_prime(N+16) > 1)) { if(count <= 200) printf("%d,", N); count++; } N += 2; } printf("\n\nA269859: Primes p such that p+16, p+64, p+256, p+1024, p+4096, p+16384 are all primes\n"); count = 0; N = 3; while(N <= 100000000) { if((is_prime(N) > 1) && (is_prime(N+16384) > 1) && (is_prime(N+4096) > 1) && (is_prime(N+1024) > 1) && (is_prime(N+256) > 1) && (is_prime(N+64) > 1) && (is_prime(N+16) > 1)) { if(count <= 200) printf("%d,", N); count++; } N += 2; } printf("\n\nA270203: Primes p such that p+16, p+64, p+256, p+1024, p+4096, p+16384, p+65536 are all primes\n"); count = 0; N = 3; while(N <= 100000000) { if((is_prime(N) > 1) && (is_prime(N+65536) > 1) && (is_prime(N+16384) > 1) && (is_prime(N+4096) > 1) && (is_prime(N+1024) > 1) && (is_prime(N+256) > 1) && (is_prime(N+64) > 1) && (is_prime(N+16) > 1)) { if(count <= 200) printf("%d,", N); count++; } N += 2; } printf("\n"); return 0; }