OFFSET
1,3
COMMENTS
From Robert Israel, Jun 02 2019: (Start)
a(n) is divisible by n-1.
a(n) = 0 if and only if n is a square.
a(n) = n-1 if n is prime. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(8) = (8 - 1) (4 - 2) = 14 because 1 and 2 are the divisors of 8 which are <= sqrt(8).
MAPLE
f:= proc(n) local D, k;
D:= select(t -> t^2 <= n, numtheory:-divisors(n));
mul(n/k-k, k=D)
end proc:
map(f, [$1..100]); # Robert Israel, Jun 02 2019
MATHEMATICA
a[n_] := Product[If[1 <= k <= Sqrt[n], (n/k - k), 1], {k, Divisors[n]}];
Array[a, 100] (* Jean-François Alcover, Aug 16 2020 *)
PROG
(PARI) a(n) = my(p=1); fordiv(n, d, if (d^2 <= n, p *= n/d - d)); p; \\ Michel Marcus, Jun 02 2019
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Feb 27 2002
STATUS
approved