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.

A006559 Short period primes: the decimal expansion of 1/p has period less than p-1, but greater than zero.

This page as a plain text file.
%I A006559 M2881 #39 Jul 02 2025 16:01:55
%S A006559 3,11,13,31,37,41,43,53,67,71,73,79,83,89,101,103,107,127,137,139,151,
%T A006559 157,163,173,191,197,199,211,227,239,241,251,271,277,281,283,293,307,
%U A006559 311,317,331,347,349,353,359,373,397,401,409,421,431,439,443,449,457
%N A006559 Short period primes: the decimal expansion of 1/p has period less than p-1, but greater than zero.
%C A006559 Primes 2 and 5 are excluded because 1/2 and 1/5 have no period. Also primes p whose multiplicative order mod p is less than p-1.
%D A006559 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A006559 T. D. Noe, <a href="/A006559/b006559.txt">Table of n, a(n) for n = 1..1000</a>
%H A006559 Victor Meally, <a href="/A006556/a006556.pdf">Letter to N. J. A. Sloane</a>, no date.
%H A006559 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a>
%t A006559 Select[Prime[Range[100]], MultiplicativeOrder[10, #] < # - 1 &]
%o A006559 (PARI) a(n)=gcd(n,10)==1 && isprime(n) && znorder(Mod(10,n))<n-1 \\ _Charles R Greathouse IV_, Mar 15 2014
%o A006559 (Python)
%o A006559 from itertools import islice
%o A006559 from sympy import nextprime, n_order
%o A006559 def A006559_gen(startvalue=1): # generator of terms >= startvalue
%o A006559     p = max(startvalue-1,1)
%o A006559     while (p:=nextprime(p)):
%o A006559         if p!=2 and p!=5 and n_order(10,p)<p-1:
%o A006559             yield p
%o A006559 A006559_list = list(islice(A006559_gen(),20)) # _Chai Wah Wu_, Mar 03 2025
%Y A006559 Cf. A006883.
%K A006559 nonn,easy,nice,base
%O A006559 1,1
%A A006559 _N. J. A. Sloane_
%E A006559 More terms from _James Sellers_, Aug 21 2000