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.

A099679 Least m such that repunit R_m is a multiple of A045572(n) (i.e., odd numbers not divisible by 5).

This page as a plain text file.
%I A099679 #26 Aug 02 2024 12:03:56
%S A099679 1,3,6,9,2,6,16,18,6,22,27,28,15,6,3,6,5,21,46,42,48,13,18,58,60,18,
%T A099679 33,66,35,8,6,13,81,41,84,44,6,15,96,18,4,34,53,108,3,112,18,48,22,15,
%U A099679 42,21,130,18,8,46,138,6,42,148,75,144,78,39,66,81,166,78,18,43,174,178
%N A099679 Least m such that repunit R_m is a multiple of A045572(n) (i.e., odd numbers not divisible by 5).
%H A099679 Charles R Greathouse IV, <a href="/A099679/b099679.txt">Table of n, a(n) for n = 1..10000</a>
%H A099679 Patrick de Geest, <a href="http://www.worldofnumbers.com/repunits.htm">Repunits and their prime factors</a>
%H A099679 T. Granlund, <a href="http://www.swox.com/gmp/fac10m.txt">Factors of 10^n - 1</a>
%H A099679 M. Kamada, <a href="https://stdkmd.net/nrr/repunit/">Factorizations of 11...11(Repunits)</a>
%H A099679 Y. Koide, <a href="https://repunit-koide.jimdofree.com/">Factorization of Repunit Numbers</a>
%H A099679 P. Yiu, <a href="http://math.fau.edu/yiu/RecreationalMathematics2003.pdf">Factorization of Repunits R_n for n<=50</a>, Appendix Chap. 18.5 pp. 173/360 in 'Recreational Mathematics'.
%t A099679 f[n_] := Block[{k = 1}, While[ Mod[(10^k - 1)/9, n] != 0, k++ ]; k]; f /@ Select[ 2Range[ 90] - 1, Mod[ #, 5] != 0 &] (* _Robert G. Wilson v_, Oct 27 2004 *)
%o A099679 (PARI) A(n)={ \\ Least m such that n | R_m
%o A099679     my(f=factor(n),s=1,t);
%o A099679     for(i=1,#f[,1],
%o A099679         if(f[i,1]==3,
%o A099679             t=3
%o A099679         ,
%o A099679             t=Mod(10,9*f[i,1]);
%o A099679             fordiv(f[i,1]-1,d,
%o A099679                 if(t^d==1,t=d;break)
%o A099679             )
%o A099679         );
%o A099679         t*=f[i,1]^(f[i,2]-1);
%o A099679         s=lcm(s,t)
%o A099679     );
%o A099679     s
%o A099679 };
%o A099679 a(n)=A(10*(n>>2)+[-1, 1, 3, 7][n%4+1]) \\ Least m such that A045572(n) | R_m
%o A099679 \\ _Charles R Greathouse IV_, Jul 31 2011
%Y A099679 Cf. A002275, A045572.
%K A099679 nonn,easy
%O A099679 1,2
%A A099679 _Lekraj Beedassy_, Oct 26 2004
%E A099679 Corrected and extended by _Robert G. Wilson v_, Oct 27 2004