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-10 of 11 results. Next

A007615 Primes with unique period length (the periods are given in A007498).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Additional terms are Phi(n,10)/gcd(n,Phi(n,10)) for the n in A007498, where Phi(n,10) is the n-th cyclotomic polynomial evaluated at 10.

Examples

			3 is the only prime p such that decimal expansion of 1/p has (nontrivial) period exactly 1.
		

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

Programs

  • Mathematica
    nmax = 50; periods = Reap[ Do[ p = Cyclotomic[n, 10] / GCD[n, Cyclotomic[n, 10]]; If[ PrimeQ[p], Sow[n]], {n, 1, nmax}]][[2, 1]]; Cyclotomic[#, 10] / GCD[#, Cyclotomic[#, 10]]& /@ periods // Prepend[#, 3]& (* Jean-François Alcover, Mar 28 2013 *)

Formula

a(n) = A061075(A007498(n)). - Max Alekseyev, Oct 16 2010
a(n) = A006530(A019328(A007498(n))). - Ray Chandler, May 10 2017

A138940 Indices n such that A019328(n) = Phi(n,10) is prime, where Phi is a cyclotomic polynomial.

Original entry on oeis.org

2, 4, 10, 12, 14, 19, 23, 24, 36, 38, 39, 48, 62, 93, 106, 120, 134, 150, 196, 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, 5877, 6022
Offset: 1

Views

Author

M. F. Hasler, Apr 03 2008

Keywords

Comments

Unique period primes (A040017) are often of the form Phi(k,10) or Phi(k,-10).
Terms of this sequence which are the square of a prime, a(n)=p^2, are such that A252491(p) is prime. Apart from a(2)=2^2, there is no such term up to 26570. - M. F. Hasler, Jan 09 2015

Crossrefs

Cf. Subsequence of A007498, contains A004023.

Programs

  • Mathematica
    Select[Range[1000], PrimeQ[Cyclotomic[#, 10]] &] (* T. D. Noe, Mar 03 2012 *)
  • PARI
    for( i=1,999, isprime( polcyclo(i,10)) && print1( i","))

Extensions

a(28)-a(43) from Robert Price, Mar 03 2012
a(44)-a(50) from Robert Price, Apr 14 2012
a(51)-a(91) from Ray Chandler, Maksym Voznyy et al. (cf. Phi_n(10) link), ca. 2009
a(92)-a(93) from Serge Batalov, Mar 28 2015

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

A112505 Number of primitive prime factors of 10^n-1.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 3, 1, 2, 2, 2, 2, 1, 2, 3, 3, 1, 1, 3, 2, 2, 3, 5, 3, 3, 5, 2, 3, 3, 1, 3, 1, 1, 2, 4, 3, 4, 3, 2, 4, 2, 1, 2, 3, 4, 2, 4, 2, 4, 2, 3, 2, 2, 3, 7, 1, 5, 4, 2, 2, 3, 3, 3, 2, 2, 3, 3, 3, 3, 2, 4, 4, 6, 2, 5, 2, 3, 2, 3, 3, 3, 2, 5, 3, 7, 3, 1, 3, 5, 4, 3, 2, 4, 4
Offset: 1

Views

Author

T. D. Noe, Sep 08 2005

Keywords

Comments

Also the number of primes whose reciprocal is a repeating decimal of length n. The number of numbers in each row of table A046107.
By Zsigmondy's theorem, a(n) >= 1. When a(n)=1, the corresponding prime is called a unique prime (see A007498, A040017 and A051627).

Crossrefs

Cf. A007138 (smallest primitive prime factor of 10^n-1), A102347 (number of distinct prime factors of 10^n-1), A046107.

Programs

  • Mathematica
    pp={}; Table[f=Transpose[FactorInteger[10^n-1]][[1]]; p=Complement[f, pp]; pp=Union[pp, p]; Length[p], {n, 66}]

Extensions

Terms to a(276) in b-file from T. D. Noe, Jun 01 2010
a(277)-a(322) in b-file from Ray Chandler, May 01 2017
a(323)-a(352) in b-file from Max Alekseyev, Apr 28 2022

A161508 Numbers k such that 2^k-1 has only one primitive prime factor.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 27, 30, 31, 32, 33, 34, 38, 40, 42, 46, 49, 54, 56, 61, 62, 65, 69, 77, 78, 80, 85, 86, 89, 90, 93, 98, 107, 120, 122, 126, 127, 129, 133, 145, 147, 150, 158, 165, 170, 174, 184, 192, 195, 202, 208
Offset: 1

Views

Author

T. D. Noe, Jun 17 2009

Keywords

Comments

Also, numbers k such that A086251(k) = 1.
Also, numbers k such that A064078(k) is a prime power.
The corresponding primitive primes are listed in A161509.
The binary expansion of 1/p has period k and this is the only prime with such a period. The binary analog of A007498.
This sequence has many terms in common with A072226. A072226 has the additional term 6; but it does not have terms 18, 20, 21, 54, 147, 342, 602, and 889 (less than 10000).
All known terms that are not in A072226 belong to A333973.

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], PrimePowerQ[Cyclotomic[ #,2]/GCD[Cyclotomic[ #,2],# ]]&]
  • PARI
    is_A161508(n) = my(t=polcyclo(n,2)); isprimepower(t/gcd(t,n)); \\ Charles R Greathouse IV, Nov 17 2014

A051627 Periods associated with A040017.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The numbers in A007498 sorted according to the magnitude of the corresponding prime. - T. D. Noe, Sep 08 2005

Examples

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

Programs

  • Mathematica
    nmax = 10000; primesPeriods = Reap[Do[p = Cyclotomic[n, 10]/GCD[n, Cyclotomic[n, 10]]; If[PrimeQ[p], Print[n]; Sow[{p, n}]], {n, 1, nmax}]][[2, 1]]; Sort[primesPeriods][[All, 2]] // Prepend[#, 1]& // Take[#, 58]& (* Jean-François Alcover, Mar 29 2013 *)

Formula

a(n) = A002371(A000720(A040017(n))). - Max Alekseyev, Oct 14 2022

Extensions

More terms from Jud McCranie
More terms from T. D. Noe, Sep 08 2005
Corrected a(45)=3750 and extended by Ray Chandler, Oct 13 2008

A046108 Decimal period of 1/b(n), where b(n) is A046107.

Original entry on oeis.org

1, 2, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 11, 12, 13, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 20, 20, 21, 21, 21, 22, 22, 22, 23, 24, 25, 25, 25, 26, 26, 27, 27, 28, 28, 28, 29, 29, 29, 29, 29, 30, 30, 30, 31, 31, 31, 32, 32, 32, 32, 32, 33, 33, 34, 34, 34, 35, 35
Offset: 1

Views

Author

Keywords

Crossrefs

A084368 Numbers k such that prime(k) does not contain the digit 1.

Original entry on oeis.org

1, 2, 3, 4, 9, 10, 12, 14, 15, 16, 17, 19, 21, 22, 23, 24, 25, 48, 49, 50, 51, 52, 55, 56, 57, 59, 61, 62, 63, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 84, 85, 86, 87, 88, 90, 91, 92, 93, 95, 96, 97, 99, 101, 102, 103, 104, 106, 107, 108, 109, 111, 117, 118, 119, 120
Offset: 1

Views

Author

Zak Seidov, Jun 23 2003

Keywords

Examples

			99 is a term because prime(99) = 523 is unit-free.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[120], Count[ IntegerDigits[ Prime[ # ]], 1] == 0 & ]
    Select[Range[120],DigitCount[Prime[#],10,1]==0&] (* Harvey P. Dale, Jun 20 2023 *)

Extensions

Edited and extended by Robert G. Wilson v, Jun 24 2003

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-10 of 11 results. Next