The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,9
LINKS
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
EXAMPLE
a(98) = a(2 * 7^2) = (2 - 1)^(1 - 1) * (7 - 1)^(2 - 1) = 6.
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
Sequence in context: A290106 A359433 A349340 * A060128 A330751 A327407
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Mar 03 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 12:10 EDT 2024. Contains 373105 sequences. (Running on oeis4.)