OFFSET
1,3
LINKS
Michel Marcus, Table of n, a(n) for n = 1..10000
MATHEMATICA
a[n_] := Module[{k = 1}, While[Divisible[n, k], k++]; k--; n/k - k]; Array[a, 100] (* Amiram Eldar, Jan 07 2022 *)
PROG
(PARI) a4(n) = my(m=1); while ((n % m) == 0, m++); m - 1; \\ A055874
a(n) = my(x=a4(n)); n/x - x;
(Python)
def a(n):
m = 2
while n%m == 0: m += 1
return n//(m-1) - (m-1)
print([a(n) for n in range(1, 76)]) # Michael S. Branicky, Jan 07 2022
CROSSREFS
KEYWORD
sign
AUTHOR
Michel Marcus, Jan 07 2022, after a suggestion from Charles Kusniec
STATUS
approved