login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Product(n/k - k) where the product is over the divisors k of n and where 1 <= k <= sqrt(n).
2

%I #19 Aug 16 2020 10:00:53

%S 0,1,2,0,4,5,6,14,0,27,10,44,12,65,28,0,16,357,18,152,80,189,22,2300,

%T 0,275,156,972,28,2639,30,1736,256,495,68,0,36,629,380,12636,40,8569,

%U 42,6020,2112,945,46,215072,0,5635,700,11016,52,59625

%N Product(n/k - k) where the product is over the divisors k of n and where 1 <= k <= sqrt(n).

%C From _Robert Israel_, Jun 02 2019: (Start)

%C a(n) is divisible by n-1.

%C a(n) = 0 if and only if n is a square.

%C a(n) = n-1 if n is prime. (End)

%H Robert Israel, <a href="/A068333/b068333.txt">Table of n, a(n) for n = 1..10000</a>

%e a(8) = (8 - 1) (4 - 2) = 14 because 1 and 2 are the divisors of 8 which are <= sqrt(8).

%p f:= proc(n) local D,k;

%p D:= select(t -> t^2 <= n, numtheory:-divisors(n));

%p mul(n/k-k, k=D)

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Jun 02 2019

%t a[n_] := Product[If[1 <= k <= Sqrt[n], (n/k - k), 1], {k, Divisors[n]}];

%t Array[a, 100] (* _Jean-François Alcover_, Aug 16 2020 *)

%o (PARI) a(n) = my(p=1); fordiv(n, d, if (d^2 <= n, p *= n/d - d)); p; \\ _Michel Marcus_, Jun 02 2019

%K nonn,look

%O 1,3

%A _Leroy Quet_, Feb 27 2002