OFFSET
1,3
COMMENTS
Factor differences of n are all abs(p-q) where n = p*q, for positive integers p,q.
p is each divisor of n which is >= sqrt(n), in ascending order (A161908), and the resulting differences p-q are distinct and in ascending order.
Row n has length A038548(n).
Row n begins with smallest difference T(n,1) = A056737(n) and this is 0 iff n is a perfect square.
Row n ends with n-1 and this is the sole entry iff n is 1 or prime.
LINKS
Kevin Ryde, Table of n, a(n) for rows n=1..2500, flattened
Paul Erdős and Moshe Rosenfeld, The factor-difference set of integers, Acta Arithmetica, volume 79, number 4, 1997, pages 353-359.
FORMULA
T(n,k) = d - n/d where d = A161908(n,k).
EXAMPLE
Triangle begins:
k=1
n=1: 0
n=2: 1
n=3: 2
n=4: 0, 3
n=5: 4
n=6: 1, 5
n=7: 6
n=8: 2, 7
n=9: 0, 8
PROG
(PARI) row(n) = my(v=divisors(n)); (v-Vecrev(v))[#v\2+1..#v];
CROSSREFS
KEYWORD
nonn,easy,tabf
AUTHOR
Kevin Ryde, Dec 21 2023
STATUS
approved