Finding The Lucas Lehmer Test Using Object
Finding The Lucas Lehmer Test Using Object
#include <iostream>
#include <vector>
// Lucas-Lehmer series.
series.push_back(current_val);
series.push_back(current_val);
// Driver program
int main() {
int n = 5;
LucasLehmer(n);
return 0;
#include<bits/stdc++.h>
using namespace std;
// bool prime[n+1];
prime[i] = true;
// is a prime
if (prime[p] == true)
prime[i] = false;
// than or equal to n
{
// Create a Boolean array "prime[0.n]"
bool prime[n+1];
SieveOfEratosthenes(n , prime);
if (prime[num])
// Driven program
int main()
int n = 31;
Mersenne Primes(n);
return 0;