login
A396897
a(n) = n divided by the largest ratio of consecutive divisors of n.
0
1, 1, 2, 1, 3, 1, 4, 3, 4, 1, 6, 1, 4, 5, 8, 1, 9, 1, 10, 7, 4, 1, 12, 5, 4, 9, 14, 1, 15, 1, 16, 9, 4, 7, 18, 1, 4, 9, 20, 1, 21, 1, 16, 15, 4, 1, 24, 7, 20, 9, 16, 1, 27, 11, 28, 9, 4, 1, 30, 1, 4, 21, 32, 13, 33, 1, 16, 9, 28, 1, 36, 1, 4, 25, 16, 11, 36, 1, 40, 27
OFFSET
2,3
COMMENTS
a(n) is always a positive integer: if d_{i+1}/d_i is the maximal ratio of consecutive divisors, then a(n) = (n/d_{i+1})*d_i, which is an integer since d_{i+1} divides n.
FORMULA
a(n) = n / max_i (d_{i+1}/d_i), where 1 = d_1 < ... < d_t = n are the divisors of n.
a(p) = 1 for prime p.
For squarefree n = p_1*p_2*...*p_k with p_1 < ... < p_k, a(n) = min_{0<=j<=k-1} (n/p_{j+1}) * Product_{i=1..j} p_i.
EXAMPLE
For n = 10 the divisors are 1, 2, 5, 10, with consecutive ratios 2, 5/2, 2; the largest is 5/2, so a(10) = 10/(5/2) = 4.
For n = 12 the divisors are 1, 2, 3, 4, 6, 12, with largest consecutive ratio 2, so a(12) = 12/2 = 6.
MATHEMATICA
a[n_]:=With[{d=Divisors[n]}, n/Max[Rest[d]/Most[d]]]; Array[a, 80, 2]
PROG
(PARI) a(n)=my(d=divisors(n)); n/vecmax(vector(#d-1, i, d[i+1]/d[i]));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric Fodge, Jun 09 2026
STATUS
approved