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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

7, 11, 13, 17, 19, 23, 29, 47, 59, 61, 73, 89, 97, 101, 103, 109, 113, 127, 131, 137, 139, 149, 157, 167, 179, 181, 193, 197, 211, 223, 229, 233, 241, 251, 257, 263, 269, 281, 293, 313, 331, 337, 349, 353, 367, 373, 379, 383, 389, 401, 409, 419, 421, 433
Offset: 1

Views

Author

Mario Velucchi (mathchess(AT)velucchi.it)

Keywords

Comments

Primes whose reciprocals have even period length.
Primes p such that the order of 10 mod p is even. - Joerg Arndt, Mar 04 2014
A002371(A049084(a(n))) mod 2 == 0.
Not the same as A040121: a(33)=241 is not in A040121.
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

Examples

			From _Reinhard Zumkeller_, Oct 05 2008: (Start)
(0,5,8,8,2,3,5,2,9,4,1,1,7,6,4,7) is the period of 1/17 (see A007450),
K = A002371(A049084(17))/2 = A002371(7)/2 = 16/2 = 8,
u = 5882352, v = 94117647: u + v = 99999999 = 10^8 - 1. (End)
		

References

  • H. Rademacher and O. Toeplitz, Von Zahlen und Figuren (Springer 1930, reprinted 1968), ch. 19, "Die periodischen Dezimalbrueche". [Reinhard Zumkeller, Oct 05 2008]

Crossrefs

Programs

  • Maple
    A028416 := proc(n) local st:
    st := ithprime(n):
    if (modp(numtheory[order](10,st),2) = 0) then
       RETURN(st)
    fi: end:  seq(A028416(n), n=1..100); # Jani Melik, Feb 24 2011
  • Mathematica
    Select[Prime[Range[4,100]],EvenQ[Length[RealDigits[1/#][[1,1]]]]&] (* Harvey P. Dale, Jul 07 2011 *)
  • PARI
    forprime(p=7,1e3,if(znorder(Mod(10,p))%2==0,print1(p", "))) \\ Charles R Greathouse IV, Feb 24 2011
    
  • Python
    from sympy import gcd, isprime, n_order
    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

Extensions

More terms from Reinhard Zumkeller, Jul 29 2003

A040119 Primes p such that x^4 = 10 has a solution mod p.

Original entry on oeis.org

2, 3, 5, 31, 37, 41, 43, 53, 67, 71, 79, 83, 107, 151, 163, 173, 191, 199, 227, 239, 241, 271, 277, 283, 307, 311, 317, 347, 359, 397, 431, 439, 443, 467, 479, 523, 547, 563, 587, 599, 613, 631, 641, 643, 683, 719
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A040121 (complement in the primes).

Programs

  • Magma
    [p: p in PrimesUpTo(800) | exists(t){x : x in ResidueClassRing(p) | x^4 eq 10}]; // Vincenzo Librandi, Sep 12 2012
  • Mathematica
    ok [p_]:=Reduce[Mod[x^4 - 10, p]== 0, x, Integers]=!= False; Select[Prime[Range[180]], ok] (* Vincenzo Librandi, Sep 12 2012 *)
  • PARI
    isA040119(p)={r=0;for(m=0,p-1,if(Mod(m,p)^4==Mod(10,p),r=1));r} \\ Michael B. Porter, Oct 13 2009
    
  • PARI
    select( {is_A040119(p)=ispower(Mod(10, p), 4)}, primes(199)) \\ is_A040119(p) assumes that p is prime, else append "&& isprime(p)". - M. F. Hasler, Nov 19 2024
    

Extensions

Definition corrected by Michael B. Porter, Oct 13 2009
Showing 1-2 of 2 results.