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!)
A066760 a(n) = Sum_{1<=k<=n, k is not a divisor of n and k is not coprime to n} k. 5
0, 0, 0, 0, 0, 4, 0, 6, 6, 18, 0, 27, 0, 40, 37, 42, 0, 79, 0, 89, 74, 108, 0, 145, 45, 154, 96, 183, 0, 274, 0, 210, 184, 270, 163, 360, 0, 340, 257, 411, 0, 556, 0, 467, 418, 504, 0, 669, 140, 683, 439, 657, 0, 880, 369, 805, 548, 810, 0, 1183, 0, 928, 779, 930, 502 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
This function can be used to prove no p^k is perfect or multi-perfect.
LINKS
FORMULA
a(n) = 1 + n*(n+1)/2 - sigma(n) - n*phi(n)/2.
a(n) = 0 if and only if n = 1, 4 or a prime. - Robert G. Wilson v, Jul 31 2004
a(n) = 1 + A067392(n) - A000203(n). - Amiram Eldar, Dec 03 2023
a(n) = Sum_{k=1..n} k * (1 - floor(1/gcd(n,k))) * (ceiling(n/k) - floor(n/k)). - Wesley Ivan Hurt, Jan 06 2024
EXAMPLE
There are three integers that satisfy this definition for n = 12, namely 8, 9 and 10. These sum to 27, hence a(12) = 27.
MAPLE
f:= n -> 1 + n*(n+1)/2 - numtheory:-sigma(n) - n*numtheory:-phi(n)/2;
0, seq(f(n), n=2..100); # Robert Israel, Nov 02 2014
MATHEMATICA
Table[n(n + 1)/2 + 1 - EulerPhi[n] * n/2 - DivisorSigma[1, n], {n, 2, 65}] (* Robert G. Wilson v, Jul 31 2004 *)
Table[Sum[k * Boole[Not[Divisible[n, k]]] * Boole[GCD[n, k] > 1], {k, n - 1}], {n, 65}] (* Alonso del Arte, Nov 02 2014 *)
PROG
(PARI) a(n)=n*(n + 1 - eulerphi(n))\2 + 1 - sigma(n) \\ Charles R Greathouse IV, Nov 02 2014
(Magma) [0] cat [1 + n*(n+1)/2 - SumOfDivisors(n) - n*EulerPhi(n)/2: n in [2..70]]; // Vincenzo Librandi, Nov 03 2014
CROSSREFS
Sequence in context: A133995 A019629 A073759 * A102393 A228131 A370743
KEYWORD
nonn,easy
AUTHOR
Jon Perry, Jan 17 2002
EXTENSIONS
Offset corrected to 1 by Michael De Vlieger, Jul 05 2014
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 24 13:04 EDT 2024. Contains 371945 sequences. (Running on oeis4.)