qhad2 {HadamardR}R Documentation

qhad2

Description

qhad2 creats the Quadratic residues of the prime number.

Usage

qhad2(p)

Arguments

p

is the integer

Details

The given input is prime number it retuns the matrix of order p. if the input is not prime number it returns NULL.

Value

matrix of order p

Examples

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

[Package HadamardR version 1.0.0 Index]