A057791 Sum[k^(n-k)], where sum is over positive integers, k, where k <= n and gcd(k,n) = 1.
1, 1, 3, 4, 22, 6, 209, 376, 1835, 2540, 49863, 94944, 1151914, 2190666, 12079274, 95722288, 1150653920, 3217888350, 47454745803, 130819911320, 846278385786, 8064305838350, 126356632390297, 288019285668096, 6861189820377586, 32739025597541220, 377062456413683219
Offset: 1
Keywords
Examples
a(8) = 1^7 + 3^5 + 5^3 + 7^1 = 376, since 1, 3, 5 and 7 are the positive integers relatively prime to 8 and <= 8.
Links
- John Tyler Rascoe, Table of n, a(n) for n = 1..200
Programs
-
PARI
A057791(n) = {sum(k=1,n,if(gcd(k,n)==1,k^(n-k)))} \\ John Tyler Rascoe, May 14 2025
Extensions
a(26) onwards from John Tyler Rascoe, May 14 2025