

A122411


a(n) = sum of primes p's for those k's, 2 <= k <= n, where GCD(k,n) = p^j >1. (a(1) = 0.).


3



0, 2, 3, 4, 5, 7, 7, 8, 9, 13, 11, 14, 13, 19, 22, 16, 17, 21, 19, 26, 32, 31, 23, 28, 25, 37, 27, 38, 29, 38, 31, 32, 52, 49, 58, 42, 37, 55, 62, 52, 41, 56, 43, 62, 66, 67, 47, 56, 49, 65, 82, 74, 53, 63, 94, 76, 92, 85, 59, 76, 61, 91, 96, 64, 112, 92, 67, 98, 112, 106, 71
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537


EXAMPLE

The integers k, 2 <= k <= 12, where GCD(k,12) = a power of a prime are 2,3,4,8,9 and 10. GCD(2,12) = 2^1, GCD(3,12) = 3^1, GCD(4,12) = 2^2, GCD(8, 12) = 2^2, GCD(9,12) = 3^1 and GCD(10,12) = 2^1. The sum of the prime bases of the primepowers is 2+3+2+2+3+2 = 14. So a(12) = 14.


MATHEMATICA

f[n_] := Plus @@ First /@ Flatten[Select[FactorInteger[GCD[Range[n], n]], Length[ # ] == 1 &], 1]; Table[f[n], {n, 80}] (*Chandler*)


PROG

(PARI) A122411(n) = { my(p=0); sum(k=2, n, if(isprimepower(gcd(n, k), &p), p, 0)); }; \\ Antti Karttunen, Feb 25 2018


CROSSREFS

Cf. A122410.
Sequence in context: A291784 A291934 A291785 * A117174 A237824 A227972
Adjacent sequences: A122408 A122409 A122410 * A122412 A122413 A122414


KEYWORD

nonn


AUTHOR

Leroy Quet, Sep 02 2006


EXTENSIONS

Corrected and extended by Ray Chandler, Sep 06 2006


STATUS

approved



