qhad2 {HadamardR} | R Documentation |
qhad2 creats the Quadratic residues of the prime number.
qhad2(p)
p |
is the integer |
The given input is prime number it retuns the matrix of order p. if the input is not prime number it returns NULL.
matrix of order p
qhad2(7)
# [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#[1,] 0 -1 -1 1 -1 1 1
#[2,] 1 0 -1 -1 1 -1 1
#[3,] 1 1 0 -1 -1 1 -1
#[4,] -1 1 1 0 -1 -1 1
#[5,] 1 -1 1 1 0 -1 -1
#[6,] -1 1 -1 1 1 0 -1
#[7,] -1 -1 1 -1 1 1 0