cp's OEIS Frontend

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.

A172372 Least number k such that the n-th prime not dividing 10 (A004139(n)) divides the repunit (10^k-1)/9.

This page as a plain text file.
%I A172372 #41 Feb 16 2025 08:33:11
%S A172372 3,6,2,6,16,18,22,28,15,3,5,21,46,13,58,60,33,35,8,13,41,44,96,4,34,
%T A172372 53,108,112,42,130,8,46,148,75,78,81,166,43,178,180,95,192,98,99,30,
%U A172372 222,113,228,232,7,30,50,256,262,268,5,69,28,141,146,153,155,312,79,110
%N A172372 Least number k such that the n-th prime not dividing 10 (A004139(n)) divides the repunit (10^k-1)/9.
%C A172372 If p is an odd prime different from 5, then p divides an infinite number of terms of the sequence of repunits {1, 11, 111, 1111, ... }. The proof is elementary: let p be such a prime. If p = 3, then 3 divides (10^3-1)/9 = 111. Otherwise, take k = (10^p - 1)/9; by the Fermat theorem, 10^(p-1) == 1 (mod p), so p divides (10^(p-1)-1); since p is relatively prime to 9, it divides k. Trivially, if p divides any k digit repunit, it divides the k*m digit repunit as well.
%C A172372 Essentially the same as A002371. - _T. D. Noe_, Apr 11 2012
%D A172372 David Wells, The Factors of the Repunits 11 through R_40, The Penguin Dictionary of Curious and Interesting Numbers, p. 219 Penguin 1986.
%D A172372 David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1997.
%D A172372 David Wells, Curious and Interesting Numbers (Revised), Penguin Books, page 114.
%H A172372 Project Euler, <a href="https://projecteuler.net/problem=129">Problem 129: Repunit divisibility</a>
%H A172372 S. S. Wagstaff, Jr., <a href="http://homes.cerias.purdue.edu/~ssw/cun/index.html">The Cunningham Project</a>
%H A172372 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Repunit.html">Repunit</a>.
%e A172372 3 divides 111, but not 1 or 11, so a(1) = 3.
%e A172372 7 divides 111111 but not 1, 11, 111, 1111, or 11111, so a(2) = 6.
%o A172372 (PARI) a(n) = {k=1; p = if(n>1, prime(n+2), 3); while((10^k-1)/9 % p, k++); k;} \\ _Michel Marcus_, May 25 2014
%Y A172372 Cf. A002275 (repunits), A002371 (period of decimal expansion of 1/prime(n)), A004139 (odd primes excluding 5), A095250 (11111111... (n times) mod n).
%K A172372 nonn
%O A172372 1,1
%A A172372 _Michel Lagneau_, Feb 01 2010
%E A172372 Corrected and edited by _Michel Lagneau_, Apr 25 2010
%E A172372 Term 6 between terms 44 and 96 doesn't belong to the sequence. The same for term 43 between terms 43 and 178. Corrected and edited by _Krzysztof Wojtas_, May 25 2014