A181539 Smallest number m > 1 such that m^2 == 1 (mod 10^n).
9, 49, 249, 1249, 18751, 218751, 781249, 24218751, 74218751, 1425781249, 13574218751, 163574218751, 163574218751, 19836425781249, 19836425781249, 2480163574218751, 12519836425781249, 12519836425781249, 487480163574218751, 15487480163574218751, 215487480163574218751, 215487480163574218751
Offset: 1
Keywords
Examples
1249^2 = 1560001 == 1 (mod 10^4), and there is no smaller m > 1 such that m^2 == 1 (mod 10^4). Hence a(4) = 1249.
Links
- Max Alekseyev, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
PARI
install(Zn_quad_roots, GGG); a181539(n) = vecsort(Zn_quad_roots(10^n,0,-1)[2])[2]; \\ Max Alekseyev, Oct 13 2024
Formula
Let b(n) = A224474(n) (or equivalently b(n) = A224473(n)), then for n >= 3, there are eight solutions in [0,10^n) to x^2 == 1 (mod 10^n), namely x = 1, 5*10^(n-1) - 1, 5*10^(n-1) + 1, 10^n - 1, b(n), 10^n - b(n), |b(n) - 5*10^(n-1)|, and 10^n - |b(n) - 5*10^(n-1)|, so a(n) = min{b(n), |b(n) - 5*10^(n-1)|, 10^n - b(n)} < 25*10^(n-2). - Jianing Song, Sep 23 2024
Extensions
a(2) through a(4), a(7) through a(11) corrected, comment added, example replaced by Klaus Brockhaus, Nov 01 2010
Edited by N. J. A. Sloane, Oct 29 2010, Nov 09 2010
Definition to avoid the constant sequence a(n)=1 constrained by R. J. Mathar, Nov 18 2010
a(1) corrected, terms a(13) onward added by Max Alekseyev, Dec 10 2012
Comments