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!)
A024816 Antisigma(n): Sum of the numbers less than n that do not divide n. 116
0, 0, 2, 3, 9, 9, 20, 21, 32, 37, 54, 50, 77, 81, 96, 105, 135, 132, 170, 168, 199, 217, 252, 240, 294, 309, 338, 350, 405, 393, 464, 465, 513, 541, 582, 575, 665, 681, 724, 730, 819, 807, 902, 906, 957, 1009, 1080, 1052, 1168, 1182, 1254, 1280, 1377, 1365 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(n) is the sum of proper non-divisors of n, the row sum in triangle A173541. - Omar E. Pol, May 25 2010
a(n) is divisible by A000203(n) iff n is in A076617. - Bernard Schott, Apr 12 2022
LINKS
FORMULA
a(n) = n*(n+1)/2 - sigma(n) = A000217(n) - A000203(n).
a(n) = A024916(n-1) - A153485(n), n > 1. - Omar E. Pol, Jun 24 2014
From Wesley Ivan Hurt, Jul 16 2014, Dec 28 2015: (Start)
a(n) = Sum_{i=1..n} i * ( ceiling(n/i) - floor(n/i) ).
a(n) = Sum_{k=1..n} (n mod k) + (-n mod k). (End)
G.f.: x/(1 - x)^3 - Sum_{k>=1} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Sep 18 2017
From Omar E. Pol, Mar 21 2021: (Start)
a(n) = A244048(n) + A004125(n).
a(n) = A153485(n-1) + A004125(n), n >= 2. (End)
a(p) = (p-2)*(p+1)/2 for p prime. - Bernard Schott, Apr 12 2022
EXAMPLE
a(12)=50 as 5+7+8+9+10+11 = 50 (1,2,3,4,6 not included as they divide 12).
MAPLE
A024816 := proc(n)
n*(n+1)/2-numtheory[sigma](n) ;
end proc: # R. J. Mathar, Aug 03 2013
MATHEMATICA
Table[n(n + 1)/2 - DivisorSigma[1, n], {n, 55}] (* Robert G. Wilson v *)
Table[Total[Complement[Range[n], Divisors[n]]], {n, 60}] (* Harvey P. Dale, Sep 23 2012 *)
With[{nn=60}, #[[1]]-#[[2]]&/@Thread[{Accumulate[Range[nn]], DivisorSigma[ 1, Range[nn]]}]] (* Harvey P. Dale, Nov 22 2014 *)
PROG
(PARI) a(n)=n*(n+1)/2-sigma(n) \\ Charles R Greathouse IV, Mar 19 2012
(Haskell)
a024816 = sum . a173541_row -- Reinhard Zumkeller, Feb 19 2014
(Magma) [n*(n+1) div 2- SumOfDivisors(n): n in [1..60]]; // Vincenzo Librandi, Dec 29 2015
(Python)
from sympy import divisor_sigma
def A024816(n): return (n*(n+1)>>1)-divisor_sigma(n) # Chai Wah Wu, Apr 28 2023
(SageMath)
def A024816(n): return sum(k for k in (0..n-1) if not k.divides(n))
print([A024816(n) for n in srange(1, 55)]) # Peter Luschny, Nov 14 2023
CROSSREFS
Cf. A342344 (for a symmetric representation).
Sequence in context: A092593 A368680 A231365 * A196443 A007316 A163905
KEYWORD
easy,nonn,nice
AUTHOR
Paul Jobling (paul.jobling(AT)whitecross.com)
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 19 02:03 EDT 2024. Contains 371782 sequences. (Running on oeis4.)