A060680 Smallest difference between consecutive divisors of n.
1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 2, 1, 22, 1, 4, 1, 2, 1, 28, 1, 30, 1, 2, 1, 2, 1, 36, 1, 2, 1, 40, 1, 42, 1, 2, 1, 46, 1, 6, 1, 2, 1, 52, 1, 4, 1, 2, 1, 58, 1, 60, 1, 2, 1, 4, 1, 66, 1, 2, 1, 70, 1, 72, 1, 2, 1, 4, 1, 78, 1, 2, 1, 82, 1, 4, 1, 2, 1, 88, 1, 6, 1, 2, 1, 4
Offset: 2
Keywords
Examples
For n = 35, divisors = {1,5,7,35}; differences = {4,2,28}; a(35) = smallest difference = 2.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 2..10000
- Antal Balog, Paul Erdős and Gérald Tenenbaum, On Arithmetic Functions Involving Consecutive Divisors, In: Analytical Number Theory, pp. 77-90, Birkhäuser, Basel, 1990.
Programs
-
Haskell
a060680 = minimum . a193829_row -- Reinhard Zumkeller, Jun 25 2015
-
Maple
read("transforms") : A060680 := proc(n) sort(convert(numtheory[divisors](n),list)) ; DIFF(%) ; min(op(%)) ; end proc: seq(A060680(n),n=2..60) ; # R. J. Mathar, May 23 2018
-
Mathematica
a[n_] := Min@@(Drop[d=Divisors[n], 1]-Drop[d, -1]); (* Second program: *) a[n_] := Min[Differences[Divisors[n]]]; Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Oct 16 2024 *)
-
PARI
a(n) = {my(m = n, d1); fordiv(n, d, if(d > 1 && d - d1 < m, m = d - d1); d1 = d); m;} \\ Amiram Eldar, Mar 17 2025
Formula
a(2n+1) = A060684(n).
Extensions
Corrected by David W. Wilson, May 04 2001
Edited by Dean Hickerson, Jan 22 2002
Comments