login
Number of primitive prime factors of 10^n-1.
9

%I #15 Apr 28 2022 18:26:46

%S 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,

%T 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,

%U 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

%N Number of primitive prime factors of 10^n-1.

%C Also the number of primes whose reciprocal is a repeating decimal of length n. The number of numbers in each row of table A046107.

%C By Zsigmondy's theorem, a(n) >= 1. When a(n)=1, the corresponding prime is called a unique prime (see A007498, A040017 and A051627).

%H <a href="/A112505/b112505.txt">Table of n, a(n) for n = 1..352</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimitivePrimeFactor.html">Primitive Prime Factor</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ZsigmondyTheorem.html">Zsigmondy Theorem</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/UniquePrime.html">Unique Prime</a>

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

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

%K hard,nonn

%O 1,5

%A _T. D. Noe_, Sep 08 2005

%E Terms to a(276) in b-file from _T. D. Noe_, Jun 01 2010

%E a(277)-a(322) in b-file from _Ray Chandler_, May 01 2017

%E a(323)-a(352) in b-file from _Max Alekseyev_, Apr 28 2022