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

A007498 Unique period lengths of primes mentioned in A007615.

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 12, 14, 19, 23, 24, 36, 38, 39, 48, 62, 93, 106, 120, 134, 150, 196, 294, 317, 320, 385, 586, 597, 654, 738, 945, 1031, 1172, 1282, 1404, 1426, 1452, 1521, 1752, 1812, 1836, 1844, 1862, 2134, 2232, 2264, 2667, 3750, 3903, 3927, 4274, 4354
Offset: 1

Views

Author

Keywords

Comments

Let {Zs(m, 10, 1)} be the Zsigmondy numbers for a = 10, b = 1: Zs(m, 10, 1) is the greatest divisor of 10^m - 1^m that is coprime to 10^r - 1^r for all positive integers r < m. Then this sequence gives m such that Zs(m, 10, 1) is a prime power (e.g., Zs(1, 10, 1) = 9 = 3^2, Zs(2, 10, 1) = 11, Zs(3, 10, 1) = 37, Zs(4, 10, 1) = 101). It is very likely that Zs(m, 10, 1) is prime if m > 1 is in this sequence (note that the Mathematica and PARI programs below are based on this assumption). - Jianing Song, Aug 12 2020

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Samuel Yates, Period Lengths of Exactly One or Two Prime Numbers, J. Rec. Math., 18 (1985), 22-24.

Crossrefs

Cf. A161508 (unique period lengths in base 2).

Programs

  • Mathematica
    lst={1}; Do[p=Cyclotomic[n, 10]/GCD[n, Cyclotomic[n, 10]]; If[PrimeQ[p], AppendTo[lst, n]], {n, 3000}]; lst (* T. D. Noe, Sep 08 2005 *)
  • PARI
    isok(n) = if (n==1, 1, my(p = polcyclo(n, 10)); isprime(p/gcd(p, n))); \\ Michel Marcus, Jun 20 2018

Extensions

More terms from T. D. Noe, Sep 08 2005
a(48)-a(52) from Ray Chandler, Jul 09 2008

A036275 The periodic part of the decimal expansion of 1/n. Any initial 0's are to be placed at end of cycle.

Original entry on oeis.org

0, 0, 3, 0, 0, 6, 142857, 0, 1, 0, 90, 3, 769230, 714285, 6, 0, 5882352941176470, 5, 526315789473684210, 0, 476190, 45, 4347826086956521739130, 6, 0, 384615, 370, 571428, 3448275862068965517241379310, 3, 322580645161290, 0, 30, 2941176470588235, 285714, 7
Offset: 1

Views

Author

Keywords

Comments

a(n) = 0 iff n = 2^i*5^j (A003592). - Jon Perry, Nov 19 2014
a(n) = n iff n = 3 or 6 (see De Koninck & Mercier reference). - Bernard Schott, Dec 02 2020

Examples

			1/28 = .03571428571428571428571428571428571428571... and digit-cycle is 571428, so a(28)=571428.
		

References

  • Jean-Marie De Koninck & Armel Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 347 pp. 50 and 205, Ellipses, Paris, 2004.

Crossrefs

Programs

  • Maple
    isCycl := proc(n) local ifa,i ; if n <= 2 then RETURN(false) ; fi ; ifa := ifactors(n)[2] ; for i from 1 to nops(ifa) do if op(1,op(i,ifa)) <> 2 and op(1,op(i,ifa)) <> 5 then RETURN(true) ; fi ; od ; RETURN(false) ; end: A036275 := proc(n) local ifa,sh,lpow,mpow,r ; if not isCycl(n) then RETURN(0) ; else lpow:=1 ; while true do for mpow from lpow-1 to 0 by -1 do if (10^lpow-10^mpow) mod n =0 then r := (10^lpow-10^mpow)/n ; r := r mod (10^(lpow-mpow)-1) ; while r*10 < 10^(lpow-mpow) do r := 10*r ; od ; RETURN(r) ; fi ; od ; lpow := lpow+1 ; od ; fi ; end: for n from 1 to 60 do printf("%d %d ",n,A036275(n)) ; od ; # R. J. Mathar, Oct 19 2006
  • Mathematica
    fc[n_]:=Block[{q=RealDigits[1/n][[1,-1]]},If[IntegerQ[q],0,While[First[q]==0,q=RotateLeft[q]];FromDigits[q]]];
    Table[fc[n],{n,36}] (* Ray Chandler, Nov 19 2014, corrected Jun 27 2017 *)
    Table[FromDigits[FindTransientRepeat[RealDigits[1/n,10,120][[1]],3] [[2]]],{n,40}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 12 2019 *)

Extensions

Corrected and extended by N. J. A. Sloane
Corrected a(92), a(208), a(248), a(328), a(352) and a(488) which missed a trailing zero (see the table). - Philippe Guglielmetti, Jun 20 2017

A040017 Prime 3 followed by unique period primes (the period r of 1/p is not shared with any other prime) of the form A019328(r)/gcd(A019328(r),r) in order (periods r are given in A051627).

Original entry on oeis.org

3, 11, 37, 101, 9091, 9901, 333667, 909091, 99990001, 999999000001, 9999999900000001, 909090909090909091, 1111111111111111111, 11111111111111111111111, 900900900900990990990991, 909090909090909090909090909091
Offset: 1

Views

Author

Keywords

Comments

Prime p=3 is the only known example of a unique period prime such that A019328(r)/gcd(A019328(r),r) = p^k with k > 1 (cf. A323748). It is plausible to assume that no other such prime exists. Under this (unproved) assumption, the current sequence lists all unique period primes in order and represents a sorted version of A007615. - Max Alekseyev, Oct 14 2022

Examples

			The decimal expansion of 1/101 is 0.00990099..., having a period of 4 and it is the only prime with that period.
		

References

  • J.-P. Delahaye, Merveilleux nombres premiers ("Amazing primes"), p. 324, Pour la Science Paris 2000.

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[c = Cyclotomic[n, 10]; q = c/GCD[c, n]; If[PrimeQ[q], AppendTo[lst, q]], {n, 62}]; Prepend[Sort[lst], 3] (* Arkadiusz Wesolowski, May 13 2012 *)

Formula

For n >= 2, a(n) = A019328(r) / gcd(A019328(r), r), where r = A051627(n). - Max Alekseyev, Oct 14 2022

Extensions

Missing term a(45) inserted in b-file at the suggestion of Eric Chen by Max Alekseyev, Oct 13 2022
Edited by Max Alekseyev, Oct 14 2022

A187614 Primes p such that the decimal representation of 1/p does not contain every digit 0-9.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 31, 37, 41, 43, 67, 73, 79, 101, 137, 239, 271, 353, 449, 757, 859, 1933, 4649, 8779, 9091, 9901, 21401, 21649, 25601, 27961, 52579, 62003, 123551, 333667, 513239, 538987, 909091, 1676321, 2071723, 2906161, 5882353, 10838689, 35121409, 52986961, 99990001, 265371653, 1056689261, 1058313049, 1360682471
Offset: 1

Views

Author

Michel Lagneau, Mar 12 2011

Keywords

Comments

Every repunit prime (A004022) is here. There are 113 terms of A046107, having periods of up to 256, that are here. The only known unique-period prime (A007615) not here is the one having period 92092. Is this sequence finite? - T. D. Noe, Mar 13 2011

Examples

			4649 is in the sequence because 1/4649 = 0.00021510002151000215.... contain
  only the digits 0, 1, 2 and 5.
		

Crossrefs

Cf. A187372.
Cf. A352023 (does not contain digit 9)

Programs

  • Mathematica
    Join[{2, 3, 5}, Select[Prime[Range[4, 10000]], Length[Union[RealDigits[1/#][[1, 1]]]] < 10 &]]
  • Python
    from sympy import n_order, nextprime
    from itertools import islice
    def A187614_gen(): # generator of terms
        yield from (2,3,5)
        p = 7
        while True:
            if len(set('0'+str(10**(n_order(10, p))//p))) < 10:
                yield p
            p = nextprime(p)
    A187614_list = list(islice(A187614_gen(),20)) # Chai Wah Wu, Mar 03 2022

Extensions

Extended by T. D. Noe, Mar 12 2011

A161509 The unique primitive prime factor of 2^n-1 for the n in A161508.

Original entry on oeis.org

3, 7, 5, 31, 127, 17, 73, 11, 13, 8191, 43, 151, 257, 131071, 19, 524287, 41, 337, 683, 241, 2731, 262657, 331, 2147483647, 65537, 599479, 43691, 174763, 61681, 5419, 2796203, 4432676798593, 87211, 15790321, 2305843009213693951, 715827883
Offset: 1

Views

Author

T. D. Noe, Jun 17 2009

Keywords

Comments

For these primes p, the binary expansion of 1/p has a unique period length. The binary analog of A007615.

Crossrefs

Cf. A144755 (sorted).

Programs

  • Mathematica
    Reap[Do[c=Cyclotomic[n,2]; q=c/GCD[c,n]; If[PrimePowerQ[q], Sow[FactorInteger[q][[1,1]]]],{n,100}]][[2,1]]

A204847 Primitive cofactor of n-th repunit A002275(n).

Original entry on oeis.org

1, 11, 111, 101, 11111, 91, 1111111, 10001, 333667, 9091, 11111111111, 9901, 1111111111111, 909091, 90090991, 100000001, 11111111111111111, 999001, 1111111111111111111, 99009901, 900900990991, 826446281, 11111111111111111111111, 99990001, 100001000010000100001
Offset: 1

Views

Author

N. J. A. Sloane, Jan 19 2012

Keywords

Comments

Except for a(1) = 1 and a(3) = 111, this is the Zsigmondy numbers for a = 10, b = 1: Zs(n, 10, 1) is the greatest divisor of 10^n - 1^n that is coprime to 10^m - 1^m for all positive integers m < n. The prime terms are called unique primes or unique period primes (A007615).
Differs from A019328 for n = 1, 9, 22, 27, 42, ... - Jianing Song, Apr 30 2018

Crossrefs

Programs

  • PARI
    lista(nn) = {vf = []; vfs = []; for (n=1, nn, if (n==1, print1(n, ", "), f = factor((10^n-1)/9)[,1]; vkeep = []; for (k = 1, #f~, if (!vecsearch(vfs, f[k]), vkeep = concat(vkeep, f[k]));); print1(prod(j=1, #vkeep, vkeep[j]), ", "); vf = concat(vf, vkeep); vfs = Set(vf);););} \\ Michel Marcus, May 18 2018

Formula

Equals A002275(n)/(product of terms in n-th row of A204845).

Extensions

a(11)-a(24) from Jianing Song, Apr 30 2018
a(25) from Jinyuan Wang, May 02 2021

A247071 Numbers n such that 2^n-1 has only one primitive prime factor, sorted according to the magnitude of the corresponding prime.

Original entry on oeis.org

2, 4, 3, 10, 12, 8, 18, 5, 20, 14, 9, 7, 15, 24, 16, 30, 21, 22, 26, 42, 13, 34, 40, 32, 54, 17, 38, 27, 19, 33, 46, 56, 90, 78, 62, 31, 80
Offset: 1

Views

Author

Eric Chen, Nov 16 2014

Keywords

Comments

Periods associated with A144755 in base 2. The binary analog of A051627.

Examples

			2^12 - 1 = 4095 = 3 * 3 * 5 * 7 * 13, but none of 3, 5, 7 is a primitive prime factor, so the only primitive prime factor of 2^12 - 1 is 13.
		

Crossrefs

Programs

  • Mathematica
    nmax = 65536; primesPeriods = Reap[Do[p = Cyclotomic[n, 2]/GCD[n, Cyclotomic[n, 2]]; If[PrimeQ[p], Print[n]; Sow[{p, n}]], {n, 1, nmax}]][[2, 1]]; Sort[primesPeriods][[All, 2]]

Formula

a(n) = A002326((A144755(n+1)-1)/2). - Max Alekseyev, Feb 11 2024

Extensions

Sequence trimmed to the established terms of A144755 by Max Alekseyev, Feb 11 2024
Showing 1-7 of 7 results.