|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|