|
|
A126773
|
|
a(n) = largest divisor of n which is coprime to the largest proper divisor of n. (a(1)=1.).
|
|
5
|
|
|
1, 2, 3, 1, 5, 2, 7, 1, 1, 2, 11, 1, 13, 2, 3, 1, 17, 2, 19, 1, 3, 2, 23, 1, 1, 2, 1, 1, 29, 2, 31, 1, 3, 2, 5, 1, 37, 2, 3, 1, 41, 2, 43, 1, 1, 2, 47, 1, 1, 2, 3, 1, 53, 2, 5, 1, 3, 2, 59, 1, 61, 2, 1, 1, 5, 2, 67, 1, 3, 2, 71, 1, 73, 2, 3, 1, 7, 2, 79, 1, 1, 2, 83, 1, 5, 2, 3, 1, 89, 2, 7, 1, 3, 2, 5, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Also the denominator of the ratio of the largest proper divisor to the least prime divisor of n, which can be thought of as the ratio of the 2nd largest divisor to the 2nd least divisor of n. - Michel Marcus, Feb 27 2017
|
|
LINKS
|
|
|
FORMULA
|
For n >= 2: Let p =A020639(n) be the smallest prime dividing n. If p^2 divides n, then a(n)=1. Otherwise, a(n) = p.
|
|
EXAMPLE
|
The largest proper divisor of 30 is A032742(30) = 15. So a(30)= 2, because 2 is the largest divisor of 30 which is coprime to 15.
|
|
MAPLE
|
local p ;
if modp(n, p^2) = 0 then
1 ;
else
p ;
end if;
end proc:
|
|
MATHEMATICA
|
f[n_] := Block[{d = Divisors[n]}, If[n < 2, 1, Max @@ Select[d, GCD[ #, d[[ -2]]] == 1 &]]]; Array[f, 100] (* Ray Chandler, Feb 26 2007 *)
|
|
PROG
|
(PARI) a(n) = if (n==1, 1, my(d = divisors(n)); k = #d; while (gcd(d[k], d[#d-1]) != 1, k--); d[k]); \\ Michel Marcus, Feb 27 2017
(PARI) a(n) = if (n==1, 1, my(d = divisors(n)); denominator(d[#d-1]/d[2])); \\ Michel Marcus, Feb 27 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|