login
a(n) = Product_{d|n, d>1} (d - 1).
6

%I #27 Nov 02 2024 09:14:21

%S 1,1,2,3,4,10,6,21,16,36,10,330,12,78,112,315,16,1360,18,2052,240,210,

%T 22,53130,96,300,416,6318,28,146160,30,9765,640,528,816,1570800,36,

%U 666,912,560196,40,639600,42,27090,39424,990,46,37456650,288,42336,1600,45900,52,1874080,2160

%N a(n) = Product_{d|n, d>1} (d - 1).

%H Amiram Eldar, <a href="/A377484/b377484.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = Product_{k=2..A000005(n)} (A027750(n,k) - 1).

%F a(p^n) = Product_{k=1..n} (p^k - 1), where p is prime, and n an integer.

%F a(2^n) = A005329(n).

%F a(3^n) = A027871(n).

%F a(5^n) = A027872(n).

%F a(7^n) = A027875(n).

%F a(11^n) = A027879(n).

%F From _Amiram Eldar_, Nov 02 2024: (Start)

%F a(n) = n-1 if and only if n is in A175787 (i.e., n = 4 or n is prime).

%F a(n) == 1 (mod 2) if and only if n is a power of 2 (A000079). (End)

%e a(12) = (2-1)*(3-1)*(4-1)*(6-1)*(12-1) = 1*2*3*5*11 = 330.

%p with(numtheory): seq(mul(d-1, d in divisors(n) minus {1}), n=1..80);

%t a[n_] := Times @@ (Rest@ Divisors[n] - 1); Array[a, 60] (* _Amiram Eldar_, Nov 01 2024 *)

%o (PARI) a(n) = my(d=divisors(n)); prod(k=2, #d, d[k]-1); \\ _Michel Marcus_, Oct 30 2024

%Y Cf. A007955, A020696.

%Y Cf. A000079, A005329, A027871, A027872, A027875, A027879, A175787.

%K nonn,easy

%O 1,3

%A _Ridouane Oudra_, Oct 29 2024