Displaying 1-10 of 16 results found.
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
COMMENTS
The numbers in A007498 sorted according to the magnitude of the corresponding prime. - T. D. Noe, Sep 08 2005
EXAMPLE
The decimal expansion of 1/101 is 0.00990099..., having a period of 4 and it is the only prime with that period.
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 *)
EXTENSIONS
Corrected a(45)=3750 and extended by Ray Chandler, Oct 13 2008
Indices n such that A019328(n) = Phi(n,10) is prime, where Phi is a cyclotomic polynomial.
+10
25
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
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
MATHEMATICA
Select[Range[1000], PrimeQ[Cyclotomic[#, 10]] &] (* T. D. Noe, Mar 03 2012 *)
PROG
(PARI) for( i=1, 999, isprime( polcyclo(i, 10)) && print1( i", "))
EXTENSIONS
a(51)-a(91) from Ray Chandler, Maksym Voznyy et al. (cf. Phi_n(10) link), ca. 2009
The periodic part of the decimal expansion of 1/n. Any initial 0's are to be placed at end of cycle.
+10
22
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
COMMENTS
a(n) = n iff n = 3 or 6 (see De Koninck & Mercier reference). - Bernard Schott, Dec 02 2020
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.
EXAMPLE
1/28 = .03571428571428571428571428571428571428571... and digit-cycle is 571428, so a(28)=571428.
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 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
Indices k such that A020509(k)=Phi[k](-10) is prime, where Phi is a cyclotomic polynomial.
+10
20
4, 5, 7, 12, 19, 24, 31, 36, 38, 46, 48, 53, 67, 75, 78, 120, 186, 196, 293, 320, 327, 369, 634, 641, 713, 770, 931, 1067, 1172, 1194, 1404, 1452, 1752, 1812, 1836, 1844, 1875, 1890, 2062, 2137, 2177, 2232, 2264, 3011, 3042, 3261, 3341, 4775, 5334, 6685
COMMENTS
"Unique [period] primes" ( A040017) are often of the form Phi[k](10) or Phi[k](-10).
Two cyclotomic polynomial identities tightly connect this sequence to A138940: 1) Phi_2k(x) = Phi_k(-x) for odd integer k > 1. 2) Phi_4k(x) = Phi_2k(x^2) for all positive integer k. - Ray Chandler, Apr 30 2017
MATHEMATICA
Select[Range[1000], PrimeQ[Cyclotomic[#, -10]] &]
PROG
(PARI) for( i=1, 999, is/*pseudo*/prime( polcyclo(i, -10)) &&& print1( i", ")) /* for PARI < 2.4.2 use ...subst(polcyclo(i, x), x, -10)... */
Number of primitive prime factors of 10^n-1.
+10
9
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
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).
MATHEMATICA
pp={}; Table[f=Transpose[FactorInteger[10^n-1]][[1]]; p=Complement[f, pp]; pp=Union[pp, p]; Length[p], {n, 66}]
CROSSREFS
Cf. A007138 (smallest primitive prime factor of 10^n-1), A102347 (number of distinct prime factors of 10^n-1), A046107.
EXTENSIONS
Terms to a(276) in b-file from T. D. Noe, Jun 01 2010
Primes which divide none of overpseudoprimes to base 2 ( A141232).
+10
9
2, 3, 5, 7, 11, 13, 17, 19, 31, 41, 43, 73, 127, 151, 241, 257, 331, 337, 683, 2731, 5419, 8191, 43691, 61681, 65537, 87211, 131071, 174763, 262657, 524287, 599479, 2796203, 15790321, 18837001, 22366891, 715827883, 2147483647, 4278255361
COMMENTS
Odd prime p is in the sequence iff A064078( A002326((p-1)/2))=p. For example, for p=127 we have A002326((127-1)/2)=7 and A064078(7)=127. Thus p=127 is in the sequence.
Primes p such that the binary expansion of 1/p has a unique period length; that is, no other prime has the same period. Sequence A161509 sorted. - T. D. Noe, Apr 13 2010
Since A161509 has terms of varying magnitude, sorting any finite initial segment of A161509 cannot provide a guarantee that there are no other terms missed in between. Any prime p not (yet) appearing in A161509 should be tested via A064078( A002326((p-1)/2))=p to conclude whether it belongs to the current sequence. - Max Alekseyev, Feb 10 2024
EXAMPLE
Overpseudoprimes to base 2 are odd, then a(1)=2.
MATHEMATICA
b=2; t={}; Do[c=Cyclotomic[n, b]; q=c/GCD[n, c]; If[PrimePowerQ[q], p=FactorInteger[q][[1, 1]]; If[p<10^12, AppendTo[t, p]; Print[{n, p}]]], {n, 1000}]; t=Sort[t] (* T. D. Noe, Apr 13 2010 *)
PROG
(PARI) { is_a144755(p) = my(q, m, g); q=znorder(Mod(2, p)); m=2^q-1; fordiv(q, d, if(d<q, while((g=gcd(m, 2^d-1))>1, m\=g))); m==p; } \\ Max Alekseyev, Feb 10 2024
Primes with unique period length (the periods are given in A007498).
(Formerly M2890)
+10
8
3, 11, 37, 101, 333667, 9091, 9901, 909091, 1111111111111111111, 11111111111111111111111, 99990001, 999999000001, 909090909090909091, 900900900900990990990991, 9999999900000001, 909090909090909090909090909091, 900900900900900900900900900900990990990990990990990990990991
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.
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.
EXAMPLE
3 is the only prime p such that decimal expansion of 1/p has (nontrivial) period exactly 1.
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 *)
Bases in which 3 is a unique-period prime.
+10
5
2, 4, 5, 8, 10, 11, 17, 23, 26, 28, 35, 47, 53, 71, 80, 82, 95, 107, 143, 161, 191, 215, 242, 244, 287, 323, 383, 431, 485, 575, 647, 728, 730, 767, 863, 971, 1151, 1295, 1457, 1535, 1727, 1943, 2186, 2188, 2303, 2591, 2915, 3071, 3455, 3887
COMMENTS
A prime p is called a unique-period prime in base b if there is no other prime q such that the period length of the base-b expansion of its reciprocal, 1/p, is equal to the period length of the reciprocal of q, 1/q.
A prime p is a unique-period prime in base b if and only if Zs(b, 1, ord(b,p)) = p^k, k >= 1. Here Zs(b, 1, d) is the greatest divisor of b^d - 1 that is coprime to b^m - 1 for all positive integers m < d, and ord(b,p) is the multiplicative order of b modulo p.
b is a term if and only if: (a) b = 3^t + 1, t >= 1; (b) b = 2^s*3^t - 1, s >= 0, t >= 1.
For every odd prime p, p is a unique-period prime in base b if b = p^t + 1, t >= 1 or b = 2^s*p^t - 1, s >= 0, t >= 1. These are trivial bases in which p is a unique-period prime, with ord(b,p) = 1 or 2. By Faltings's theorem, there are only finitely many nontrivial bases in which p is also a unique-period prime, with ord(b,p) >= 3. For p = 3, there are no nontrivial bases, since ord(3,b) <= 2.
EXAMPLE
If b = 3^t + 1, t >= 1, then b - 1 only has prime factor 3, so 3 is a unique-period prime in base b.
If b = 2^s*3^t - 1, t >= 1, then the prime factors of b^2 - 1 are 3 and prime factors of b - 1 = 2^s*3^t - 2, 3 is the only new prime factor so 3 is a unique-period prime in base b.
PROG
(PARI)
p = 3;
gpf(n)=if(n>1, vecmax(factor(n)[, 1]), 1);
test(n, q)=while(n%p==0, n/=p); if(q>1, while(n%q==0, n/=q)); n==1;
for(n=2, 10^6, if(gcd(n, p)==1, if(test(polcyclo(znorder(Mod(n, p)), n), gpf(znorder(Mod(n, p)))), print1(n, ", "))));
CROSSREFS
Cf. A040017 (unique primes in base 10), A144755 (unique primes in base 2).
Bases in which 5 is a unique-period prime.
+10
5
2, 3, 4, 6, 7, 9, 19, 24, 26, 39, 49, 79, 99, 124, 126, 159, 199, 249, 319, 399, 499, 624, 626, 639, 799, 999, 1249, 1279, 1599, 1999, 2499, 2559, 3124, 3126, 3199, 3999, 4999, 5119, 6249, 6399, 7999, 9999, 10239, 12499, 12799, 15624, 15626, 15999, 19999, 20479
COMMENTS
A prime p is called a unique-period prime in base b if there is no other prime q such that the period length of the base-b expansion of its reciprocal, 1/p, is equal to the period length of the reciprocal of q, 1/q.
A prime p is a unique-period prime in base b if and only if Zs(b, 1, ord(b,p)) = p^k, k >= 1. Here Zs(b, 1, d) is the greatest divisor of b^d - 1 that is coprime to b^m - 1 for all positive integers m < d, and ord(b,p) is the multiplicative order of b modulo p.
b is a term if and only if: (a) b = 5^t + 1, t >= 1; (b) b = 2^s*5^t - 1, s >= 0, t >= 1; (c) b = 2, 3, 7.
For every odd prime p, p is a a unique-period prime in base b if b = p^t + 1, t >= 1 or b = 2^s*p^t - 1, s >= 0, t >= 1. These are trivial bases in which p is a unique-period prime, with ord(b,p) = 1 or 2. By Faltings's theorem, there are only finitely many nontrivial bases in which p is also a unique-period prime, with ord(b,p) >= 3. For p = 5, the nontrivial bases are 2, 3, 7.
EXAMPLE
1/5 has period length 4 in base 2. Note that 3 and 5 are the only prime factors of 2^4 - 1 = 15, but 1/3 has period length 2, so 5 is a unique-period prime in base 2.
1/5 has period length 4 in base 3. Note that 2 and 5 are the only prime factors of 3^4 - 1 = 80, but 1/2 has period length 1, so 5 is a unique-period prime in base 3.
1/5 has period length 4 in base 7. Note that 2, 3 and 5 are the only prime factors of 7^4 - 1 = 2400, but 1/2 and 1/3 both have period length 1, so 5 is a unique-period prime in base 7.
PROG
(PARI)
p = 5;
gpf(n)=if(n>1, vecmax(factor(n)[, 1]), 1);
test(n, q)=while(n%p==0, n/=p); if(q>1, while(n%q==0, n/=q)); n==1;
for(n=2, 10^6, if(gcd(n, p)==1, if(test(polcyclo(znorder(Mod(n, p)), n), gpf(znorder(Mod(n, p)))), print1(n, ", "))));
Bases in which 7 is a unique-period prime.
+10
5
2, 3, 4, 5, 6, 8, 13, 18, 19, 27, 48, 50, 55, 97, 111, 195, 223, 342, 344, 391, 447, 685, 783, 895, 1371, 1567, 1791, 2400, 2402, 2743, 3135, 3583, 4801, 5487, 6271, 7167, 9603, 10975, 12543, 14335, 16806, 16808, 19207, 21951, 25087, 28671, 33613, 38415, 43903, 50175
COMMENTS
A prime p is called a unique-period prime in base b if there is no other prime q such that the period length of the base-b expansion of its reciprocal, 1/p, is equal to the period length of the reciprocal of q, 1/q.
A prime p is a unique-period prime in base b if and only if Zs(b, 1, ord(b,p)) = p^k, k >= 1. Here Zs(b, 1, d) is the greatest divisor of b^d - 1 that is coprime to b^m - 1 for all positive integers m < d, and ord(b,p) is the multiplicative order of b modulo p.
b is a term if and only if: (a) b = 7^t + 1, t >= 1; (b) b = 2^s*7^t - 1, s >= 0, t >= 1; (c) b = 2, 3, 4, 5, 18, 19.
For every odd prime p, p is a unique-period prime in base b if b = p^t + 1, t >= 1 or b = 2^s*p^t - 1, s >= 0, t >= 1. These are trivial bases in which p is a unique-period prime, with ord(b,p) = 1 or 2. By Faltings's theorem, there are only finitely many nontrivial bases in which p is also a unique-period prime, with ord(b,p) >= 3. For p = 7, the nontrivial bases are 2, 3, 4, 5, 18, 19.
EXAMPLE
1/7 has period length 3 in base 2. Note that 7 is the only prime factor of 2^3 - 1 = 7, so 7 is a unique-period prime in base 2.
1/7 has period length 3 in base 4. Note that 3, 7 are the only prime factors of 4^3 - 1 = 63, but 1/3 has period length 1, so 7 is a unique-period prime in base 4.
1/7 has period length 3 in base 18. Note that 7, 17 are the only prime factors of 18^3 - 1 = 5831, but 1/17 has period length 1, so 7 is a unique-period prime in base 18.
(1/7 has period length 6 in base 3, 5, 19. Similar demonstrations can be found.)
PROG
(PARI)
p = 7;
gpf(n)=if(n>1, vecmax(factor(n)[, 1]), 1);
test(n, q)=while(n%p==0, n/=p); if(q>1, while(n%q==0, n/=q)); n==1;
for(n=2, 10^6, if(gcd(n, p)==1, if(test(polcyclo(znorder(Mod(n, p)), n), gpf(znorder(Mod(n, p)))), print1(n, ", "))));
CROSSREFS
Cf. A040017 (unique-period primes in base 10), A144755 (unique-period primes in base 2).
Search completed in 0.002 seconds
|