A365928 Smallest prime factor of f(n) = 10^(2*n) + (10^n - 1)/9.
101, 3, 7, 7, 3, 317, 40637, 3, 7, 7, 3, 1487, 101, 3, 7, 7, 3, 39855301, 641, 3, 7, 7, 3, 162340676822011484150719, 101, 3, 7, 7, 3, 121068683, 47, 3, 7, 7, 3, 107, 71, 3, 7, 7, 3, 67, 695841737, 3, 7, 7, 3, 47, 101, 3, 7, 7, 3, 8933, 677, 3, 7, 7, 3, 10305833206337
Offset: 1
Keywords
Examples
a(1) = 101, because f(1) = 101 is prime. a(2) = 3, because the smallest prime factor of f(2) = 10011 = 3 * 337 is 3.
Programs
-
Mathematica
a[n_]:=Min[First/@FactorInteger[10^(2*n)+(10^n-1)/9]]; Array[a,59] (* Stefano Spezia, Sep 24 2023 *)
-
PARI
a(n)=my(x=10^(2*n)+(10^n-1)/9);m=factor(x);return(m[1,1])
-
PARI
a(n) = my(x=10^(2*n)+(10^n-1)/9, k=10); if (ispseudoprime(x), return(x)); while (1, m=factor(x, k); if (m[1,1]
Michel Marcus, Sep 24 2023
Formula
a(3k + 2) = 3, a(6k + 3) = 7, a(6k + 4) = 7.
Extensions
a(60) from Jinyuan Wang, Sep 24 2023