This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A045616 #62 Jul 08 2025 12:27:19 %S A045616 3,487,56598313 %N A045616 Primes p such that 10^(p-1) == 1 (mod p^2). %C A045616 Primes p such that the decimal fraction 1/p has same period length as 1/p^2, i.e., the multiplicative order of 10 modulo p is the same as the multiplicative order of 10 modulo p^2. [extended by _Felix Fröhlich_, Feb 05 2017] %C A045616 No further terms below 1.172*10^14 (as of Feb 2020, cf. Fischer's table). %C A045616 56598313 was announced in the paper by Brillhart et al. - _Helmut Richter_, May 17 2004 %C A045616 A265012(A049084(a(n))) = 1. - _Reinhard Zumkeller_, Nov 30 2015 %C A045616 From _Jianing Song_, Jun 21 2025: (Start) %C A045616 The ring of integers of Q(10^(1/k)) is Z[10^(1/k)] if and only if k does not have a prime factor in this sequence. See Theorem 5.3 of the paper of Keith Conrad. For example, we have: %C A045616 (1 + 10^(1/3) + 10^(2/3))/3 is an algebraic integer, but it is not in Z[10^(1/3)]; %C A045616 (1 + 10^(486/487) + 10^(2*486/487) + ... + 10^(486*486/487))/487 is an algebraic integer, but it is not in Z[10^(1/487)]; %C A045616 (1 + 10^(56598312/56598313) + 10^(2*56598312/56598313) + ... + 10^(56598312*56598312/56598313))/56598313 is an algebraic integer, but it is not in Z[10^(1/56598313)]. (End) %D A045616 J. Brillhart, J. Tonascia, and P. Weinberger, On the Fermat quotient, pp. 213-222 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971. %D A045616 Richard K. Guy, Unsolved Problems in Number Theory, Springer, 2004, A3. %H A045616 Amir Akbary and Sahar Siavashi, <a href="http://math.colgate.edu/~integers/s3/s3.Abstract.html">The Largest Known Wieferich Numbers</a>, INTEGERS, 18(2018), A3. See Table 1 p. 5. %H A045616 Keith Conrad, <a href="https://kconrad.math.uconn.edu/blurbs/gradnumthy/integersradical.pdf">The ring of integers in a radical extension</a>. %H A045616 Richard Fischer, <a href="http://www.fermatquotient.com/FermatQuotienten/">Fermat quotients B^(P-1) == 1 (mod P^2)</a>. %H A045616 Wilfrid Keller and Jörg Richstein, <a href="https://doi.org/10.1090/S0025-5718-04-01666-7">Solutions of the congruence a^(p-1) == 1 (mod p^r)</a>, Math. Comp. 74 (2005), 927-936. %H A045616 Peter L. Montgomery, <a href="https://doi.org/10.1090/S0025-5718-1993-1182246-5">New solutions of a^(p-1) == 1 (mod p^2)</a>, Math. Comp. 61 (1993), 361-363. %H A045616 Math Overflow, <a href="http://mathoverflow.net/questions/27579/is-the-smallest-primitive-root-modulo-p-a-primitive-root-modulo-p2">Is the smallest primitive root modulo p a primitive root modulo p^2?</a>, Jun 09 2010. %H A045616 Helmut Richter, <a href="http://hr.userweb.mwn.de/numb/period.html">The period length of the decimal expansion of a fraction</a>. %H A045616 Helmut Richter, <a href="http://hr.userweb.mwn.de/numb/fact486.html">The Prime Factors Of 10^486-1</a>. %H A045616 Siqiong Yao and Akira Toyohara, <a href="https://arxiv.org/abs/2507.01295">The length of the repeating decimal</a>, arXiv:2507.01295 [math.NT], 2025. See p. 19. %H A045616 Samuel Yates, <a href="http://www.jstor.org/stable/2689643">The Mystique of Repunits</a>, Math. Mag. 51 (1978), 22-28. %t A045616 A045616Q = PrimeQ@# && PowerMod[10, # - 1, #^2] == 1 &; Select[Range[1000000], A045616Q] (* _JungHwan Min_, Feb 04 2017 *) %t A045616 Select[Prime[Range[34*10^5]],PowerMod[10,#-1,#^2]==1&] (* _Harvey P. Dale_, Apr 10 2018 *) %o A045616 (PARI) lista(nn) = forprime(p=2, nn, if (Mod(10, p^2)^(p-1)==1, print1(p, ", "))); \\ _Michel Marcus_, Aug 16 2015 %o A045616 (Haskell) %o A045616 import Math.NumberTheory.Moduli (powerMod) %o A045616 a045616 n = a045616_list !! (n-1) %o A045616 a045616_list = filter %o A045616 (\p -> powerMod 10 (p - 1) (p ^ 2) == 1) a000040_list' %o A045616 -- _Reinhard Zumkeller_, Nov 30 2015 %Y A045616 Cf. A001220, A014127, A123692, A212583, A123693, A111027, A128667, A234810, A242741, A128668, A244260, A090968, A242982, A128669, A039951. %Y A045616 Cf. A265012, A049084, A000040. %K A045616 bref,hard,nonn,nice,more %O A045616 1,1 %A A045616 _Helmut Richter_, Dec 11 1999