login
A322373
Let d_i be the i-th divisor of n. Then a(n) is the largest k such that gcd(d_k, ..., d_tau(n)) = 1.
2
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 2, 1, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 1, 3, 1, 5, 1, 1, 2, 2, 2, 4, 1, 2, 2, 4, 1, 4, 1, 3, 3, 2, 1, 3, 1, 2, 2, 3, 1, 2, 2, 4, 2, 2, 1, 8, 1, 2, 3, 1, 2, 4, 1, 3, 2, 5, 1, 6, 1, 2, 2, 3, 2, 4, 1, 4, 1, 2, 1, 7, 2, 2, 2, 4, 1, 7, 2, 3, 2, 2, 2, 3, 1
OFFSET
1,6
LINKS
EXAMPLE
a(24) = 3 because the divisors of 24 are (1, 2, 3, 4, 6, 8, 12, 24) and from the fourth divisor onwards, d_i is divisible by 2 > 1 but d_3 = 3 is not so a(24) = 3.
MATHEMATICA
Array[LengthWhile[#, # == 1 &] &@ Reverse@ FoldList[GCD[#1, #2] &, Reverse@ Divisors@ #] &, 105] (* Michael De Vlieger, Dec 31 2018 *)
PROG
(PARI) a(n) = my(d=divisors(n), start = max(1, #d-1), g=d[start], i=start); while(g>1, start--; g=gcd(g, d[start])); start
CROSSREFS
Cf. A000005, A322374 (positions of records).
Sequence in context: A123529 A140747 A330757 * A332288 A335450 A372772
KEYWORD
nonn
AUTHOR
David A. Corneth, Dec 09 2018
STATUS
approved