|
|
A162325
|
|
a(n) = the largest divisor of n such that this and every smaller divisor of n are all coprime to each other.
|
|
1
|
|
|
1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 5, 2, 17, 3, 19, 2, 7, 11, 23, 3, 5, 13, 3, 2, 29, 5, 31, 2, 11, 17, 7, 3, 37, 19, 13, 2, 41, 3, 43, 2, 5, 23, 47, 3, 7, 5, 17, 2, 53, 3, 11, 2, 19, 29, 59, 3, 61, 31, 7, 2, 13, 3, 67, 2, 23, 7, 71, 3, 73, 37, 5, 2, 11, 3, 79, 2, 3, 41, 83, 3, 17, 43, 29
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) = a prime for every n >= 2.
|
|
LINKS
|
|
|
EXAMPLE
|
The divisors of 28 are 1,2,4,7,14,28. Since 4 is not coprime with 2, but 2 is coprime with 1, then a(28) = 2.
|
|
MAPLE
|
with(numtheory): a:= proc(n) local l, j, s, h, k; l:= sort([divisors(n)[]]); s:= nops(l); for k while k<=s do h:= k; for j from k+1 to s do if igcd(l[k], l[j])=1 then h:=j else break fi od; s:= h od; l[s] end: seq(a(n), n=1..100); # Alois P. Heinz, Aug 04 2009
|
|
MATHEMATICA
|
a[n_] := Module[{l = Divisors[n], j, s, h, k}, s = Length[l]; For[k = 1, k <= s, k++, h = k; For[j = k + 1, j <= s, j++, If[GCD[l[[k]], l[[j]]] == 1, h = j, Break[]]]; s = h]; l[[s]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|