OFFSET
0,5
COMMENTS
a(n) is the smallest prime factor that divides both the decimal repunit (10^n-1)/9 and at least one other smaller decimal number consisting of only 0's and 1's.
a(n)=1 iff n is a term in A385537 (indices of repunits coprime with all other binary vectors of the same length).
EXAMPLE
a(3) = 1 because 111 = 3*37 is coprime with all other nonzero binary vectors of length 3, which are 001, 010, 011, 100, 101, 110. None of them is divisible by 3 or 37.
a(4) = 11 because 11 is the smallest prime factor of 1111 which it shares, for example, with the binary vector 0011.
MATHEMATICA
F[d_] := Min[Select[Table[Min[Transpose[FactorInteger[GCD[FromDigits[IntegerDigits[i, 2]], (10^d-1)/9]]][[1]]], {i, 1, 2^d-2}], # > 1 &]];
Table[If[# < \[Infinity], #, 1] &[F[n]], {n, 0, 25}]
PROG
(PARI) a(n) = my(x=(10^n-1)/9, m=oo, b=0, z); for (i=1, 2^n-2, my(y=fromdigits(binary(i))); if ((z=gcd(y, x)) != 1, b=1; m = min(m, vecmin(factor(z)[, 1])); ); ); if (b, m, 1); \\ Michel Marcus, Jul 03 2025
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Dmytro Inosov, Jul 03 2025
STATUS
approved
