Related papers: On the Inversion Modulo a Power of an Integer
We observe structure in the sequences of quotients and remainders of the Euclidean algorithm with two families of inputs. Analyzing the remainders, we obtain new algorithms for computing modular inverses and representating prime numbers by…
We study number theoretic properties of the map $x \mapsto x^{x} \mod{p}$, where $x \in \{1,2,\ldots,p-1\}$, and improve on some recent upper bounds, due to Kurlberg, Luca, and Shparlinski, on the number of primes $p < N$ for which the map…
Let $a,k\in\mathbb{N}$. For the $k-1$-th iterate of the exponential function $x\mapsto a^x$, also known as tetration, we write \[ ^k a:=a^{a^{.^{.^{.^{a}}}}}. \] In this paper, we show how an efficient algorithm for tetration modulo natural…
This paper introduces two forms of modular inverses and proves their reciprocity formulas respectively. These formulas are then applied to formulate new and generalized algorithm for computing these modular inverses. The same algorithm is…
Approximate computing has shown to provide new ways to improve performance and power consumption of error-resilient applications. While many of these applications can be found in image processing, data classification or machine learning, we…
We present an efficient proof scheme for any instance of left-to-right modular exponentiation, used in many computational tests for primality. Specifically, we show that for any $(a,n,r,m)$ the correctness of a computation $a^n\equiv r\pmod…
We present a general theorem characterizing the relationship between the prime base $p$ representations of non-negative integers $x$ and their positive integer powers, $x^n$. For any positive integer $l$, the theorem establishes the…
We present a fast algorithm for modular exponentiation when the factorization of the modulus is known. Let $a,n,m$ be positive integers and suppose $m$ factors canonically as $\prod_{i=1}^k p_i^{e_i}$. Choose integer parameters $t_i\in [1,…
Let $p$ be a prime and let $a$ be a positive integer. In this paper we investigate $\sum_{k=0}^{p^a-1}\binom[(h+1)k,k+d]/m^k$ modulo a prime $p$, where $d$ and $m$ are integers with $-h<d<=p^a$ and $m\not=0 (mod p)$. We also study…
We show that if p is an odd prime then $$\sum_{k=0}^{p-1}E_kE_{p-1-k}=1 (mod p)$$ and $$\sum_{k=0}^{p-3}E_kE_{p-3-k}=(-1)^{(p-1)/2}2E_{p-3} (mod p),$$ where E_0,E_1,E_2,... are Euler numbers. Moreover, we prove that for any positive integer…
Let $p$ be an odd prime and let $d\in\{2,3,7\}$. When $(\frac{-d}p)=1$ we can write $p=x^2+dy^2$ with $x,y\in\mathbb Z$; in this paper we aim at determining $x$ or $y$ modulo $p^2$. For example, when $p=x^2+3y^2$, we show that if $p\equiv…
In recent work, Darmon, Pozzi and Vonk explicitly construct a modular form whose spectral coefficients are $p$-adic logarithms of Gross-Stark units and Stark-Heegner points. Here we describe how this construction gives rise to a practical…
Let $p$ be a prime number, $p=2^nq+1$, where $q$ is odd. D. Shanks described an algorithm to compute square roots $\pmod{p}$ which needs $O(\log q + n^2)$ modular multiplications. In this note we describe two modifications of this…
A new incremental algorithm for data compression is presented. For a sequence of input symbols algorithm incrementally constructs a p-adic integer number as an output. Decoding process starts with less significant part of a p-adic integer…
It is well known that the repeated square and multiply algorithm is an efficient way of modular exponentiation. The obvious question to ask is if this algorithm has an inverse which would calculate the discrete logarithm efficiently. The…
In this paper we focus on pairs consisting of the affine $N$-space and multiideals with a positive exponent. We introduce a method "lifting to characteristic 0" which is a kind of the inversion of "modulo p reduction". By making use of it,…
We present algorithms to perform modular polynomial multiplication or modular dot product efficiently in a single machine word. We pack polynomials into integers and perform several modular operations with machine integer or floating point…
An algorithm for computing {2, 3}, {2, 4}, {1, 2, 3}, {1, 2, 4} -inverses and the Moore-Penrose inverse of a given rational matrix A is established. Classes A(2, 3)s and A(2, 4)s are characterized in terms of matrix products (R*A)+R* and…
Let p be an odd prime and let a be a positive integer. In this paper we investigate the sum $\sum_{k=0}^{p^a-1}\binom{hp^a-1}{k}\binom{2k}{k}/m^k$ mod p^2, where h,m are p-adic integers with m\not=0 (mod p). For example, we show that if…
In this paper, we introduce the power-partible reduction for holonomic (or, P-recursive) sequences and apply it to obtain a series of congruences for Ap\'ery numbers $A_k$. In particular, we prove that, for any $r\in\mathbb{N}$, there…