Skip to content

Enjoying the library? Give us a on GitHub.

You're not viewing the latest version. Click here to go to latest.
logo
galois
galois.kronecker_symbol
Initializing search
    mhostetter/galois
    • Getting Started
    • Basic Usage
    • Tutorials
    • Performance
    • Development
    • API Reference
    • Release Notes
    • Index
    mhostetter/galois
      • Getting Started
      • Array Classes
      • Compilation Modes
      • Element Representation
      • Array Creation
      • Array Arithmetic
      • Polynomials
      • Polynomial Arithmetic
      • Intro to Prime Fields
      • Intro to Extension Fields
      • Prime Fields
      • Binary Extension Fields
      • Benchmarks
      • Installation
      • Formatting
      • Unit Tests
      • Documentation
      • Arrays
        • CArray
          • Constructors
            • MIdentity
            • MOnes
            • MRandom
            • MRange
            • MZeros
          • Methods
            • Mcompile
            • Mrepr
          • Properties
            • Pcharacteristic
            • Pdefault_ufunc_mode
            • Pdegree
            • Pdtypes
            • Pelement_repr
            • Pelements
            • Pirreducible_poly
            • Pname
            • Porder
            • Pprimitive_element
            • Pufunc_mode
            • Pufunc_modes
            • Punits
        • VArrayLike
        • VDTypeLike
        • VElementLike
        • VIterableLike
        • VShapeLike
      • Galois fields
        • CFieldArray
          • Constructors
            • M__init__
            • MIdentity
            • MOnes
            • MRandom
            • MRange
            • MVandermonde
            • MZeros
          • Conversions
            • MVector
            • Mvector
          • Elements
            • Pelements
            • Pnon_squares
            • Pprimitive_element
            • Pprimitive_elements
            • Mprimitive_root_of_unity
            • Mprimitive_roots_of_unity
            • Psquares
            • Punits
          • String representation
            • M__repr__
            • M__str__
            • Marithmetic_table
            • Pproperties
            • Mrepr_table
          • Element representation
            • Pelement_repr
            • Mrepr
          • Arithmetic compilation
            • Pdefault_ufunc_mode
            • Pdtypes
            • Pufunc_mode
            • Pufunc_modes
            • Mcompile
          • Methods
            • Madditive_order
            • Mcharacteristic_poly
            • Mfield_norm
            • Mfield_trace
            • Mlog
            • Mminimal_poly
            • Mmultiplicative_order
          • Linear algebra
            • Mcolumn_space
            • Mleft_null_space
            • Mlu_decompose
            • Mnull_space
            • Mplu_decompose
            • Mrow_reduce
            • Mrow_space
          • Properties
            • Pcharacteristic
            • Pdegree
            • Pirreducible_poly
            • Pname
            • Porder
            • Pprime_subfield
          • Attributes
            • Pis_extension_field
            • Pis_prime_field
            • Pis_primitive_poly
            • Mis_square
        • CGF2
        • FField
        • FGF
        • Primitive elements
          • Fprimitive_element
          • Fprimitive_elements
          • Fis_primitive_element
      • Polynomials
        • CPoly
          • Constructors
            • M__init__
            • MDegrees
            • MIdentity
            • MInt
            • MOne
            • MRandom
            • MRoots
            • MStr
            • MZero
          • Special methods
            • M__call__
            • M__eq__
            • M__int__
            • M__len__
          • String representation
            • M__repr__
            • M__str__
          • Methods
            • Mderivative
            • Mreverse
            • Mroots
          • Factorization methods
            • Mdistinct_degree_factors
            • Mequal_degree_factors
            • Mfactors
            • Msquare_free_factors
          • Coefficients
            • Mcoefficients
            • Pcoeffs
            • Pdegrees
            • Pnonzero_coeffs
            • Pnonzero_degrees
          • Properties
            • Pdegree
            • Pfield
          • Attributes
            • Mis_conway
            • Mis_conway_consistent
            • Mis_irreducible
            • Pis_monic
            • Mis_primitive
            • Mis_square_free
        • VPolyLike
        • Irreducible polynomials
          • Firreducible_poly
          • Firreducible_polys
        • Primitive polynomials
          • Fconway_poly
          • Fmatlab_primitive_poly
          • Fprimitive_poly
          • Fprimitive_polys
        • Interpolating polynomials
          • Flagrange_poly
      • Forward error correction
        • CBCH
          • Constructors
            • M__init__
          • String representation
            • M__repr__
            • M__str__
          • Methods
            • Mdecode
            • Mdetect
            • Mencode
          • Properties
            • Pd
            • Pextension_field
            • Pfield
            • Pk
            • Pn
            • Pt
          • Attributes
            • Pis_narrow_sense
            • Pis_primitive
            • Pis_systematic
          • Matrices
            • PG
            • PH
          • Polynomials
            • Palpha
            • Pc
            • Pgenerator_poly
            • Pparity_check_poly
            • Proots
        • CReedSolomon
          • Constructors
            • M__init__
          • String representation
            • M__repr__
            • M__str__
          • Methods
            • Mdecode
            • Mdetect
            • Mencode
          • Properties
            • Pc
            • Pd
            • Pfield
            • Pk
            • Pn
            • Pt
          • Attributes
            • Pis_narrow_sense
            • Pis_primitive
            • Pis_systematic
          • Matrices
            • PG
            • PH
          • Polynomials
            • Palpha
            • Pgenerator_poly
            • Pparity_check_poly
            • Proots
      • Linear sequences
        • CFLFSR
          • Constructors
            • M__init__
            • MTaps
          • String representation
            • M__repr__
            • M__str__
          • Methods
            • Mreset
            • Mstep
            • Mto_galois_lfsr
          • Properties
            • Pfield
            • Porder
            • Ptaps
          • Polynomials
            • Pcharacteristic_poly
            • Pfeedback_poly
          • State
            • Pinitial_state
            • Pstate
        • CGLFSR
          • Constructors
            • M__init__
            • MTaps
          • String representation
            • M__repr__
            • M__str__
          • Methods
            • Mreset
            • Mstep
            • Mto_fibonacci_lfsr
          • Properties
            • Pfield
            • Porder
            • Ptaps
          • Polynomials
            • Pcharacteristic_poly
            • Pfeedback_poly
          • State
            • Pinitial_state
            • Pstate
        • Fberlekamp_massey
      • Transforms
        • Fintt
        • Fntt
      • Number theory
        • Divisibility
          • Fare_coprime
          • Fegcd
          • Feuler_phi
          • Fgcd
          • Flcm
          • Fprod
          • Ftotatives
        • Congruences
          • Fcarmichael_lambda
          • Fcrt
          • Fjacobi_symbol
          • Fkronecker_symbol
            • Parameters
              • pa
              • pn
            • Returns
            • References
          • Flegendre_symbol
          • Fis_cyclic
        • Primitive roots
          • Fprimitive_root
          • Fprimitive_roots
          • Fis_primitive_root
        • Integer arithmetic
          • Filog
          • Firoot
          • Fisqrt
      • Factorization
        • Prime factorization
          • Ffactors
        • Composite factorization
          • Fdivisor_sigma
          • Fdivisors
        • Specific factorization algorithms
          • Fperfect_power
          • Fpollard_p1
          • Fpollard_rho
          • Ftrial_division
      • Primes
        • Prime number generation
          • Fkth_prime
          • Fmersenne_exponents
          • Fmersenne_primes
          • Fnext_prime
          • Fprev_prime
          • Fprimes
          • Frandom_prime
        • Primality tests
          • Fis_composite
          • Fis_perfect_power
          • Fis_powersmooth
          • Fis_prime
          • Fis_prime_power
          • Fis_smooth
          • Fis_square_free
        • Specific primality tests
          • Ffermat_primality_test
          • Fmiller_rabin_primality_test
      • Configuration
        • Fget_printoptions
        • Fprintoptions
        • Fset_printoptions
      • Versioning
      • v0.3
      • v0.2
      • v0.1
      • v0.0
      • Index
    • Parameters
      • pa
      • pn
    • Returns
    • References
    galois.kronecker_symbol(a: int, n: int) → int

    Computes the Kronecker symbol \((\frac{a}{n})\). The Kronecker symbol extends the Jacobi symbol for all \(n\).

    Parameters:¶
    a: int¶

    An integer.

    n: int¶

    An integer.

    Returns:¶

    The Kronecker symbol \((\frac{a}{n})\) with value in \(\{0, -1, 1\}\).

    See also

    legendre_symbol, jacobi_symbol

    References¶

    • Algorithm 2.149 from https://cacr.uwaterloo.ca/hac/about/chap2.pdf

    Back to top
    Previous galois.jacobi_symbol
    Next galois.legendre_symbol
    © Copyright 2020-2024, Matt Hostetter.
    Created using Sphinx 5.3.0. and Sphinx-Immaterial