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!)
A240086 a(n) = Sum_{prime p|n} phi(gcd(p, n/p)) where phi is Euler's totient function. 1
0, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 3, 1, 2, 2, 2, 1, 2, 4, 2, 2, 2, 1, 3, 1, 1, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 1, 2, 3, 2, 1, 2, 6, 5, 2, 2, 1, 3, 2, 2, 2, 2, 1, 3, 1, 2, 3, 1, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 5, 2, 2, 3, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 1, 4, 2, 2, 2, 2, 2, 2, 1, 7, 3, 5, 1, 3, 1, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
If n = p^2 for some prime p then a(n) = p - 1 and a(k) <= a(n) for k <= n. - Peter Luschny, Sep 05 2023
MAPLE
with(numtheory): a := n -> add(phi(igcd(d, n/d)), d = factorset(n)); seq(a(n), n=1..100);
MATHEMATICA
a[n_] := Sum[EulerPhi[GCD[p, n/p]], {p, FactorInteger[n][[;; , 1]]}]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Aug 29 2023 *)
PROG
(PARI) A240086(n) = sumdiv(n, p, (isprime(p)*eulerphi(gcd(p, n/p)))); \\ Antti Karttunen, Sep 23 2017
CROSSREFS
Sequence in context: A322862 A325225 A206719 * A322306 A359778 A305830
KEYWORD
nonn,easy
AUTHOR
Peter Luschny, Mar 31 2014
EXTENSIONS
More terms from Antti Karttunen, Sep 23 2017
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 4 22:04 EDT 2024. Contains 373102 sequences. (Running on oeis4.)