Repunit

Author

Eric W. Weisstein
May 10, 2021

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/Repunit.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Repunit.html.

©2021 Wolfram Research, Inc. except for portions noted otherwise

Enumeration

<<MathWorld`Repunit`

Repunit/@Range[10]

Factorization Check

Table[Flatten[Table[#[[1]],{#[[2]]}]&/@FactorInteger[Repunit[n]]],{n,20}]

Length/@%

Table[PrimeOmega[(10^n-1)/9],{n,20}]

Table[Length[RepunitFactors[n]],{n,20}]

lst={};
Do[p=(10^n-1)/9;AppendTo[lst,Length[FactorInteger[p]]],{n,0,10}];lst

Table[PrimeNu[(10^n-1)/9],{n,20}]

Incomplete Factorizations

f=Flatten[Position[Table[Repunit[n] == Times @@ RepunitFactors[n],{n, 2,209}], False]] + 1

IntegerQ/@(r=((Repunit[#]/Times@@RepunitFactors[#])&/@f))

PrimeQ/@r

Off[General::"stop"];
FactorInteger[#,FactorComplete->False]&/@r

Check

RepunitCheck[{1,209},FactorComplete->False]