login
A326297
If n = Product (p_j^k_j) then a(n) = Product ((p_j - 1)^(k_j - 1)).
7
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 4, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 6, 4, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 6, 2, 4
OFFSET
1,9
FORMULA
a(n) = A003958(n) / abs(A023900(n)) = abs(A325126(n)) / A007947(n).
Dirichlet g.f.: Product_{p prime} (1 + 1/(p^s - p + 1)). - Amiram Eldar, Dec 07 2023
a(n) = A003958(n)/A173557(n). - Ridouane Oudra, Oct 29 2024
EXAMPLE
a(98) = a(2 * 7^2) = (2 - 1)^(1 - 1) * (7 - 1)^(2 - 1) = 6.
MAPLE
seq(mul((p-1)^(padic[ordp](n, p)-1), p in numtheory[factorset](n)), n =1..100); # Ridouane Oudra, Oct 29 2024
MATHEMATICA
a[n_] := If[n == 1, 1, Times @@ ((#[[1]] - 1)^(#[[2]] - 1) & /@ FactorInteger[n])]; Table[a[n], {n, 1, 100}]
PROG
(PARI) a(n) = my(f=factor(n)); for (k=1, #f~, f[k, 1]--; f[k, 2]--); factorback(f); \\ Michel Marcus, Mar 03 2020
(Python)
from math import prod
from sympy import factorint
def a(n): return prod((p-1)**(e-1) for p, e in factorint(n).items())
print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Aug 30 2021
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Mar 03 2020
STATUS
approved