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.

A028416 Primes p such that the decimal expansion of 1/p has a periodic part of even length.

This page as a plain text file.
%I A028416 #52 Nov 28 2024 11:15:08
%S A028416 7,11,13,17,19,23,29,47,59,61,73,89,97,101,103,109,113,127,131,137,
%T A028416 139,149,157,167,179,181,193,197,211,223,229,233,241,251,257,263,269,
%U A028416 281,293,313,331,337,349,353,367,373,379,383,389,401,409,419,421,433
%N A028416 Primes p such that the decimal expansion of 1/p has a periodic part of even length.
%C A028416 Primes whose reciprocals have even period length.
%C A028416 Primes p such that the order of 10 mod p is even. - _Joerg Arndt_, Mar 04 2014
%C A028416 A002371(A049084(a(n))) mod 2 == 0.
%C A028416 Not the same as A040121: a(33)=241 is not in A040121.
%C A028416 Let (d(i): 1<=i<=2*K) be the period of the decimal expansion of 1/a(n), K=A002371(A049084(a(n)))/2, then d(i) + d(i+K) = 9 for i with 1<=i<=K, or, equivalently: u + v = 10^K - 1 with u = Sum_{i=1..K} d(i)*10^(K-i) and v = Sum_{i=1..K} d(i+K)*10^(K-i). - _Reinhard Zumkeller_, Oct 05 2008
%D A028416 H. Rademacher and O. Toeplitz, Von Zahlen und Figuren (Springer 1930, reprinted 1968), ch. 19, "Die periodischen Dezimalbrueche". [_Reinhard Zumkeller_, Oct 05 2008]
%H A028416 T. D. Noe, <a href="/A028416/b028416.txt">Table of n, a(n) for n = 1..1000</a>
%H A028416 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a>.
%e A028416 From _Reinhard Zumkeller_, Oct 05 2008: (Start)
%e A028416 (0,5,8,8,2,3,5,2,9,4,1,1,7,6,4,7) is the period of 1/17 (see A007450),
%e A028416 K = A002371(A049084(17))/2 = A002371(7)/2 = 16/2 = 8,
%e A028416 u = 5882352, v = 94117647: u + v = 99999999 = 10^8 - 1. (End)
%p A028416 A028416 := proc(n) local st:
%p A028416 st := ithprime(n):
%p A028416 if (modp(numtheory[order](10,st),2) = 0) then
%p A028416    RETURN(st)
%p A028416 fi: end:  seq(A028416(n), n=1..100); # _Jani Melik_, Feb 24 2011
%t A028416 Select[Prime[Range[4,100]],EvenQ[Length[RealDigits[1/#][[1,1]]]]&] (* _Harvey P. Dale_, Jul 07 2011 *)
%o A028416 (PARI) forprime(p=7,1e3,if(znorder(Mod(10,p))%2==0,print1(p", "))) \\ _Charles R Greathouse IV_, Feb 24 2011
%o A028416 (Python)
%o A028416 from sympy import gcd, isprime, n_order
%o A028416 is_A028416 = lambda n: gcd(n,10)==1 and n>5 and n_order(10, n)%2==0 and isprime(n) # _M. F. Hasler_, Nov 19 2024
%Y A028416 Cf. A087000, A186635.
%K A028416 nonn,base
%O A028416 1,1
%A A028416 Mario Velucchi (mathchess(AT)velucchi.it)
%E A028416 More terms from _Reinhard Zumkeller_, Jul 29 2003