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-8 of 8 results.

A128948 Primes p for which the period length of 1/p is a perfect power, A001597.

Original entry on oeis.org

3, 17, 73, 101, 137, 163, 257, 353, 449, 577, 641, 751, 757, 883, 1297, 1409, 1801, 3137, 3529, 5477, 7057, 7351, 8929, 9397, 10753, 11831, 12101, 13457, 13553, 14401, 15361, 15377, 15973, 18523, 19841, 20809, 21401, 21601, 23549, 24001, 24337
Offset: 1

Views

Author

Robert G. Wilson v, May 05 2007

Keywords

Comments

Number of primes p < 10^n whose period length of 1/p is a perfect power: 1,3,14,24,78,173,461,1190,3235,8933,....
The primes modulo any integer do not seem to be equally distributed.

Examples

			The prime 73 has a period of 8 = 2^3 which is a member of A001597, hence is a member of this sequence.
		

Crossrefs

Programs

  • Mathematica
    lst = {3}; p = 1; While[p < 10^8, p = NextPrime@p; If[GCD @@ Last /@ FactorInteger@ MultiplicativeOrder[10, p] > 1, AppendTo[lst, p]; Print@p]]; lst (* Ray Chandler, May 11 2007 *)

Extensions

Correction (3 is a member of the sequence) from Ray Chandler, May 11 2007
B-file corrected by Ray Chandler, Oct 23 2011

A129727 Primes p for which the period length of 1/p is a semiprime.

Original entry on oeis.org

7, 13, 23, 31, 43, 47, 59, 67, 71, 101, 103, 139, 167, 179, 191, 263, 277, 283, 293, 311, 383, 431, 439, 443, 503, 547, 557, 599, 607, 613, 653, 683, 787, 809, 827, 853, 859, 863, 887, 947, 983, 997, 1013, 1019, 1039, 1163, 1213, 1237, 1321, 1367, 1399, 1423
Offset: 1

Views

Author

Jonathan Vos Post, May 12 2007

Keywords

Comments

The prime index of A122183. Semiprime analog of A072859 = primes p for which the period length of 1/p is prime. Based upon A002371 = period of decimal expansion of 1/(n-th prime).

Examples

			a(1) = 7 because A000040(4) Period of decimal expansion of 1/7 = 6 = 2*3, a semiprime.
a(2) = 13 because A000040(6) = 6 = 2*3.
a(3) = 23 because A000040(9) = 22 = 2*11.
a(4) = 31 because A000040(11) = 15 = 3*5.
a(5) = 43 because A000040(14) = 21 = 3*7.
a(6) = 47 because A000040(15) = 46 = 2*23.
a(7) = 59 because A000040(17) = 58 = 2*29.
		

Crossrefs

Programs

  • Mathematica
    fQ[p_] := Plus @@ Last /@ FactorInteger@Length@RealDigits[1/p][[1, 1]] == 2;; lst = {}; Do[ p = Prime@n; If[ fQ@p, AppendTo[lst, p]], {n, 230}] (* Robert G. Wilson v *)

A197225 Primes p with the period of the decimal fraction 1/p a prime power, A000961.

Original entry on oeis.org

3, 11, 17, 37, 41, 53, 73, 79, 83, 101, 107, 137, 163, 173, 227, 239, 257, 271, 317, 347, 353, 359, 449, 467, 479, 563, 587, 641, 643, 719, 733, 751, 757, 773, 797, 839, 907, 1031, 1187, 1231, 1283, 1307, 1319, 1409, 1439, 1493, 1523, 1627, 1637, 1879, 1907
Offset: 1

Views

Author

T. D. Noe, Oct 22 2011

Keywords

Crossrefs

Cf. A072859 (period is prime).
Cf. A072982 (period is a power of 2).
Cf. A128948 (period is perfect power).
Cf. A197226 (the periods of this sequence).
Cf. A129727 (period is a semiprime).

Programs

  • Mathematica
    myPerfectPowerQ[n_] := Length[FactorInteger[n]] == 1; Select[Prime[Range[500]], Mod[10,#] > 0 && myPerfectPowerQ[Length[RealDigits[1/#, 10][[1,1]]]] &]

A249330 Primes which do not divide any repunit number R(p) = (10^p - 1)/9 with p prime.

Original entry on oeis.org

2, 5, 7, 13, 17, 19, 23, 29, 31, 43, 47, 59, 61, 67, 71, 73, 89, 97, 101, 103, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 179, 181, 191, 193, 197, 199, 211, 223, 229, 233, 241, 251, 257, 263, 269, 277, 281, 283, 293, 307, 311, 313, 331, 337, 349, 353
Offset: 1

Views

Author

Arkadiusz Wesolowski, Oct 25 2014

Keywords

Comments

If a prime p has period n, then p divides 10^m - 1 for all m divisible by n. Therefore the sequence together with 3 is the complement in the primes of A072859.

Crossrefs

Cf. A072859.

Programs

  • Magma
    [2] cat [p: p in PrimesInInterval(5, 353) | not IsPrime(Modorder(10, p))];

A122183 Primes p_i by index i for which the period length of 1/p_i is a semiprime.

Original entry on oeis.org

4, 6, 9, 11, 14, 15, 17, 19, 20, 26, 27, 34, 39, 41, 43, 56, 59, 61, 62, 64, 76, 83, 85, 86, 96, 101, 102, 109, 111, 112, 119, 124, 138, 140, 144, 147, 149, 150, 154, 161, 166, 168, 170, 171, 175, 192, 198, 203, 216, 219, 222, 224, 225, 235, 236, 239, 240, 246, 251
Offset: 1

Views

Author

Jonathan Vos Post, May 10 2007

Keywords

Comments

Semiprime analog of A072859 based on A002371.
Numbers n such that A002371(n) is an element of A001358.

Examples

			a(1) = 4 because A002371(4) Period of decimal expansion of 1/(4th prime) = 6 = 2*3, a semiprime.
a(2) = 6 because A002371(6) = 6 = 2*3.
a(3) = 9 because A002371(9) = 22 = 2*11.
a(4) = 11 because A002371(11) = 15 = 3*5.
a(5) = 14 because A002371(14) = 21 = 3*7.
a(6) = 15 because A002371(15) = 46 = 2*23.
a(7) = 17 because A002371(17) = 58 = 2*29.
		

Crossrefs

Programs

  • Mathematica
    semiprimeQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; PrimePi /@ Select[Prime@ Range@ 254, semiprimeQ@ MultiplicativeOrder[10, # ] &] (* Robert G. Wilson v *)

Extensions

Edited, corrected and extended by Robert G. Wilson v, May 22 2007

A170945 Least number k such that the decimal representation of 1/k has period Fibonacci(n).

Original entry on oeis.org

3, 11, 27, 41, 73, 53, 43, 103, 1321, 497867, 323, 467, 11311, 20141, 12169, 232159532264041847249
Offset: 2

Views

Author

Michel Lagneau, Feb 19 2010

Keywords

Comments

The period of 1/k is the least integer p such that 10^p = 1 (mod k). The integer p is also known as the multiplicative order of 10 (mod k).

Examples

			p(k) is the period of 1/k, we obtain with k=3,11,27,41,73,53,43,103 p(3)=1,p(11)=2,p(27)=3,p(41)=5,p(73)=8, p(53)=13,p(43)=21, p(103)=34
		

References

  • Mohammad K. Azarian, The Generating Function for the Fibonacci Sequence, Missouri Journal of Mathematical Sciences, Vol. 2, No. 2, Spring 1990, pp. 78-79. Zentralblatt MATH, Zbl 1097.11516.
  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.

Crossrefs

Cf. A000045, A039834 (signed Fibonacci numbers), A002329, A072859 (periodic sequences), A003060

Programs

  • Maple
    For the great numbers (p > 70), the maple program is very slow. That's what we use an process of two steps: factoring 10^p-1 with elliptic curve method (see the first web site), and then, for each factor q(k), k=1,2,...,r computation the periods of 1/q(k) and keep the period q(i) such that q(i) = Fibonacci number. The 17th term required 3h 2m for the computing of (10^1597) -1 T:=array(0..100);U:=array(0..100); n0:=0:n1:=1:T[1] = 1:for i from 2 to 30 do: n2:=n0+n1:T[i]:=n2:n0:=n1:n1:=n2:od:U[1]:=3:U[2]:=3:for q from 3 to 10 do: p0:=T[q]: indic:=0:for n from 1 to 2000 do:for p from 1 to 150 while(irem(10^p,n)<>1 or gcd(n,10)<>1 ) do:od: if irem(10^p,n) = 1 and gcd(n,10) = 1 and p=p0 and indic=0 then U[q]:=n:indic:=1:else fi:od: od: for n from 1 to 10 do:print( U[n]):od:

Extensions

Edited by T. D. Noe, Apr 14 2010

A173491 a(n) is the least k such that the period of the decimal expansion of 1/k is A000204(n).

Original entry on oeis.org

3, 27, 101, 239, 21649, 19, 3191, 35121409, 722817036322379041, 2241, 797, 967, 1230610745978027, 3373, 60787, 509538919, 15060275578609, 5779, 37397, 423557
Offset: 1

Views

Author

Michel Lagneau, Feb 19 2010

Keywords

Comments

Smallest k such that A007732(k) = A000204(n).
For the large numbers (p > 70), the Maple program below is very slow. So we use a process of two steps: first, factor 10^p-1 using the elliptic curve method; then, for each factor q(k), k=1,2,...,r, compute the period of 1/q(k) and keep the period q(i) such that q(i) ... [unfinished sentence? - R. J. Mathar, Feb 24 2010] Compare the Maple section of A170945!

Examples

			a(1)=3 because the period of 1/3 = 0.333... is 1, and 3 is the smallest number with that period.
a(2)=27 because the period of 1/27 = 0.037037... is 3 = A000204(2), and 27 is the smallest number with that period.
a(3)=101 because the period of 1/101 = 0.00990099... is 4 = A000204(3), and 101 is the smallest number with that period.
a(4)= 239 because the period of 1/239 = 0.00418410041841... is 7 = A000204(4), and 239 is the smallest number with that period.
		

References

  • V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.

Crossrefs

Programs

  • Maple
    T:=array(0..100); U:=array(0..100); n0:=1: n1:=3: T[1] := 1: T[2] := 3:for i from 3 to 30 do: n2:=n0+n1: T[i]:=n2: n0:=n1: n1:=n2: od:
    for q from 1 to 7 do: p0:=T[q]: indic:=0: for n from 1 to 25000 do: for p from 1 to 30 while(irem(10^p, n)<>1 or gcd(n,10)<>1 ) do: od: if irem(10^p,n) = 1 and gcd(n,10) = 1 and p=p0 and indic=0 then U[q]:=n: indic:=1: else fi: od: od:
    for n from 1 to 7 do: print( U[n]): od:
  • Mathematica
    (* This [slow] mma program gives all denominators < 50000 and disagrees with existing sequence for n = 11: a(11) = 797 instead of 29453 *) a204[n_] := a204[n] = Coefficient[Series[(2 - t )/(1 - t - t^2), {t, 0, n}], t^n] ; a7732[n_] := a7732[n] = MultiplicativeOrder[10, FixedPoint[Quotient[#, GCD[#, 10]] &, n]]; a[n_] := (k = 2; While[k++; k < 50000 && a7732[k] != a204[n] ]; k); Table[a[n], {n, 1, 15}](* Jean-François Alcover, Sep 02 2011 *)

Extensions

References to unrelated sequences removed by R. J. Mathar, Feb 24 2010
Extended with the help of Jean-François Alcover and D. S. McNeil by T. D. Noe, Sep 07 2011

A386519 Index of the smallest prime p such that the number of digits L in the repeating decimal period of 1/p equals the n-th prime.

Original entry on oeis.org

5, 12, 13, 52, 2431, 16, 153888, 27417323062119920, 223378173194137397198, 452, 406, 150886, 23, 40, 2153717, 28, 92971458509, 130, 40998
Offset: 1

Views

Author

Jean-Marc Rebert, Jul 24 2025

Keywords

Comments

In general, for (q,2*5)=1, the length of the period of 1/q is equal to the multiplicative order of 10 modulo q, which is the smallest k such that 10^k == 1 (mod q). It follows that a(n) must be a prime divisor of 10^prime(n)-1. Hence, apart from a(2), we have prime(a(n)) = A147555(n) and a(20) is the index of the prime 241573142393627673576957439049. - Giovanni Resta, Jul 24 2025

Examples

			a(1) = 5, since the 5th prime, p = 11, has a repeating decimal period of length L = 2, and 2 = prime(1). There is no smaller prime for which the period length equals the 1st prime.
 n      a(n)         p  L
 1         5        11  2
 2        12        37  3
 3        13        41  5
 4        52       239  7
 5      2431     21649 11
 6        16        53 13
 7    153888   2071723 17
		

Crossrefs

Extensions

a(8)-a(19) from Giovanni Resta, Jul 24 2025
Showing 1-8 of 8 results.