human
Primality Test | Set 5 ( Using Lucas | Function to check whether ( 2 ^ p - 1 ) is prime or not ..
generate the number.
First number of the series.
Generate the rest ( p - 2 ) terms of the series.
now if the ( p - 1 ) the term is 0 return true else false ..
Check whetherr 2 ^ ( p - 1 ) is prime or not ."
Solution in Python:

Write me a code to primality Test and the other steps required?
assistant
#Here is code to primality Test and the other steps required.
 def isPrime ( p ) :
	checkNumber = 2 ** p - 1
	nextval = 4 % checkNumber
	for i in range ( 1 , p - 1 ) :
		nextval = ( nextval * nextval - 2 ) % checkNumber
	if ( nextval == 0 ) : return True
	else : return False
p = 7
checkNumber = 2 ** p - 1
if isPrime ( p ) :
	print ( checkNumber , ' is ▁ Prime . ' )
else :
	print ( checkNumber , ' is ▁ not ▁ Prime ' )