|
| |
|
|
A067392
|
|
Sum of numbers <= n which have common prime factors with n.
|
|
4
| |
|
|
0, 2, 3, 6, 5, 15, 7, 20, 18, 35, 11, 54, 13, 63, 60, 72, 17, 117, 19, 130, 105, 143, 23, 204, 75, 195, 135, 238, 29, 345, 31, 272, 231, 323, 210, 450, 37, 399, 312, 500, 41, 651, 43, 550, 495, 575, 47, 792, 196, 775, 510, 754, 53, 999, 440, 924, 627, 899, 59
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,2
|
|
|
COMMENTS
| Sum of k <= n such that GCD(n,k) > 1.
Sum of cototatives of n, i.e. sum of integers up to n and co-composite (not coprime) to n.
a(1) = 0 since it has no common prime factor with itself (although it has a common factor with itself, e.g. 1)
|
|
|
FORMULA
| For n>=2, a(n)=n(n+1)/2 - n phi(n)/2.
Not multiplicative.
a(p) = p where p is a prime; a(2^k) = 2^(k-1)*{2^(k-1) + 1).
|
|
|
EXAMPLE
| n=24, a(n)=2+3+4+6+8+9+10+12+14+15+16+18+20+21+22+24=204.
|
|
|
MATHEMATICA
| a[n_] := Plus@@Select[Range[1, n], GCD[ #, n]>1&]
f[n_] := If[PrimeQ[n], n, k = Log[2, n]; If[ IntegerQ[k], 2^(k - 1)(2^(k - 1) + 1), (n/2)(n + 1 - EulerPhi[n])]]; Table[ f[n], {n, 2, 60}] (from RWGv)
|
|
|
PROG
| (PARI) A067392(n)={a=0; for(i=1, n, if(gcd(i, n)<>1, a=a+i)); a}
|
|
|
CROSSREFS
| Cf. A000203, A000217, A023896, A024816.
Sequence in context: A136183 A100211 A071257 * A066449 A098012 A066117
Adjacent sequences: A067389 A067390 A067391 * A067393 A067394 A067395
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| Labos E. (labos(AT)ana.sote.hu), Jan 22 2002
|
| |
|
|