|
|
A082066
|
|
Greatest common prime-divisor of sigma_1(n)=A000203(n) and sigma_2(n)=A001157(n); a(n)=1 if no common prime-divisor exists.
|
|
7
|
|
|
1, 1, 2, 7, 2, 2, 2, 5, 13, 2, 2, 7, 2, 2, 2, 31, 2, 13, 2, 7, 2, 2, 2, 5, 31, 2, 5, 7, 2, 2, 2, 7, 2, 2, 2, 13, 2, 5, 2, 5, 2, 2, 2, 7, 13, 2, 2, 31, 19, 31, 2, 7, 2, 5, 2, 5, 5, 5, 2, 7, 2, 2, 13, 127, 2, 2, 2, 7, 2, 2, 2, 13, 2, 2, 31, 7, 2, 2, 2, 31, 11, 2, 2, 7, 2, 2, 5, 5, 2, 13, 2, 7, 2, 2, 2, 7, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
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_] := DivisorSigma[1, n]; f2[x_] := DivisorSigma[2, x] Table[Max[Intersection[ba[f1[w]], ba[f2[w]]]], {w, 1, 128}]
(* Second program: *)
Table[Last[Apply[Intersection, FactorInteger[Map[DivisorSigma[#, n] &, {1, 2}]][[All, All, 1]]] /. {} -> {1}], {n, 109}] (* Michael De Vlieger, May 22 2017 *)
|
|
PROG
|
(PARI) gpf(n)=if(n>1, my(f=factor(n)[, 1]); f[#f], 1)
(Python)
from sympy import primefactors, gcd, divisor_sigma
def a006530(n): return 1 if n==1 else primefactors(n)[-1]
def a(n): return a006530(gcd(divisor_sigma(n), divisor_sigma(n, 2))) # Indranil Ghosh, May 22 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Changed "was found" to "exists" in definition. - N. J. A. Sloane, Jan 29 2022
|
|
STATUS
|
approved
|
|
|
|