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!)
A342421 a(n) = Sum_{k=1..n} (n/gcd(k,n))^(gcd(k,n) - 1). 4
1, 2, 3, 5, 5, 13, 7, 21, 25, 41, 11, 135, 13, 113, 271, 297, 17, 875, 19, 1573, 1765, 1145, 23, 9215, 2521, 4265, 13627, 18539, 29, 71371, 31, 67729, 119329, 65825, 76931, 637061, 37, 262505, 1064935, 1381637, 41, 4432817, 43, 4207855, 11169629, 4194833, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = Sum_{d|n} phi(d^(n/d)) = Sum_{d|n} phi(d) * d^(n/d-1).
If p is prime, a(p) = p.
MATHEMATICA
a[n_] := Sum[(n/GCD[k, n])^(GCD[k, n] - 1), {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Mar 11 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, (n/gcd(k, n))^(gcd(k, n)-1));
(PARI) a(n) = sumdiv(n, d, eulerphi(d^(n/d)));
(PARI) a(n) = sumdiv(n, d, eulerphi(d)*d^(n/d-1));
CROSSREFS
Sequence in context: A156834 A079024 A357000 * A319631 A097453 A079125
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 11 2021
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 April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)