A082069 Smallest common prime-divisor of n and Sigma_2(n) = A001157(n); a(n) = 1 if no common prime-divisor exists.
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 5, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 5, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 7, 1, 5, 2, 1, 2, 1, 2, 1, 1, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 5
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
Crossrefs
Programs
-
Mathematica
ffi[x_] := Flatten[FactorInteger[x]]; lf[x_] := Length[FactorInteger[x]]; ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; f1[x_] := n; f2[x_] := DivisorSigma[2, x]; Table[Min[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}] (* Second program: *) Array[If[CoprimeQ[#1, #2], 1, Min@ Apply[Intersection, Map[FactorInteger[#][[All, 1]] &, {#1, #2}]]] & @@ {#, DivisorSigma[2, #]} &, 105] (* Michael De Vlieger, Nov 03 2017 *)
-
PARI
A020639(n) = if(1==n,n,vecmin(factor(n)[, 1])); A082069(n) = A020639(gcd(sigma(n,2), n)); \\ Antti Karttunen, Nov 03 2017
Formula
Extensions
Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022