login
A163457
a(n) = the smallest divisor of n such that this and all greater divisors of n are non-coprime to each other.
1
2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 4, 13, 7, 5, 2, 17, 3, 19, 5, 7, 11, 23, 4, 5, 13, 3, 7, 29, 6, 31, 2, 11, 17, 7, 6, 37, 19, 13, 8, 41, 7, 43, 11, 9, 23, 47, 4, 7, 5, 17, 13, 53, 3, 11, 8, 19, 29, 59, 6, 61, 31, 9, 2, 13, 11, 67, 17, 23, 10, 71, 9, 73, 37, 5, 19, 11, 13, 79, 8, 3, 41, 83, 12, 17
OFFSET
2,1
LINKS
EXAMPLE
The divisors of 30 are 1,2,3,5,6,10,15,30. 5 is coprime to 6, so a(30) >= 6. Checking the greatest common divisors of all pairs of distinct divisors >= 6: GCD(6,30)=6, GCD(6,15)=3, GCD(6,10)=2, GCD(10,30)=10, GCD(10,15)=5, and GCD(15,30) = 15. Since all of these GCD's are >= 2, then a(30) = 6.
MAPLE
with(numtheory): a:= proc(n) local l, j, m, s, h, k; l:= sort([divisors(n) []]); m:= nops(l); h:= m; s:= 1; k:= m; do for j from k to s by -1 do if igcd (l[k], l[j])>1 then h:=j else break fi od; s:= h; k:= k-1; if k<s then break fi od; l[s] end: seq (a(n), n=2..100); # Alois P. Heinz, Aug 03 2009
MATHEMATICA
a[n_] := Module[{dd = Divisors[n], selQ}, selQ[d_] := Module[{sd = Select[ dd, # >= d&]}, FreeQ[GCD@@@Subsets[sd, {2}], 1]]; SelectFirst[dd, selQ]];
a /@ Range[2, 100] (* Jean-François Alcover, Nov 20 2020 *)
CROSSREFS
Cf. A162325.
Sequence in context: A331959 A109395 A145254 * A285708 A072593 A348907
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 28 2009
EXTENSIONS
More terms from Alois P. Heinz, Aug 03 2009
STATUS
approved