int main() { puts("Initializing...\n"); initialize_primes(); init_saved(); puts("Initialized\n\n"); double max = 1; int max_n = 0; for(int n = 2; n <= 1000000; n++) { double curr = ((double)n)/totient(n); if(curr > max) { max = curr; max_n = n; //printf("%d\n", n); } if(n % 1 == 0) { //printf("(%d: %f, %d: %f)\n", n, curr, max_n, max); } } printf("%d yeilds max value %f", max_n, max); return 0; }
int main() { puts("Initializing prime...\n"); initialize_primes(); puts("Initialized\n\n"); return 0; }
int main(void) { initialize_primes(); long curr_num = 3; while(judge(curr_num)) { curr_num += 2; } printf("Answer: %ld\n", curr_num); return 0; }
int main(void) { initialize_primes(); for(long long i = 987654321; i > 1; i--) { if(is_pandigital(i) && is_prime(i)) { printf("%lld\n", i); return 0; } } return 1; }
Prime(void) { initialize_primes(); }