A238981 Sum of n-th powers of unitary divisors of n (d such that d divides n, gcd(d, n/d) = 1).
1, 5, 28, 257, 3126, 47450, 823544, 16777217, 387420490, 10009766650, 285311670612, 8916117756914, 302875106592254, 11112685048647250, 437893920912786408, 18446744073709551617, 827240261886336764178, 39346558169931834836690, 1978419655660313589123980
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..387
Programs
-
Mathematica
a[n_, k_] := Sum[If[GCD[i, n] == i && GCD[i, n/i] == 1, i^k, 0], {i, n}]; Table[a[n, n], {n, 1, 24}] a[1] = 1; a[n_] := Times @@ (1 + First[#]^(n * Last[#]) &/@ FactorInteger[n]); Array[a, 19] (* Amiram Eldar, Aug 10 2019 *)
-
PARI
a(n) = sumdiv(n, d, d^n*(gcd(d, n/d) == 1)); \\ Michel Marcus, Mar 19 2014
Formula
For prime p, a(p) = p^p + 1; A125137 is a subsequence. - Michel Marcus, Nov 20 2015
a(n) = Sum_{d|n, gcd(d,n/d)=1} d^n. - Wesley Ivan Hurt, Apr 28 2023