This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A024816 #94 Nov 14 2023 16:51:09 %S A024816 0,0,2,3,9,9,20,21,32,37,54,50,77,81,96,105,135,132,170,168,199,217, %T A024816 252,240,294,309,338,350,405,393,464,465,513,541,582,575,665,681,724, %U A024816 730,819,807,902,906,957,1009,1080,1052,1168,1182,1254,1280,1377,1365 %N A024816 Antisigma(n): Sum of the numbers less than n that do not divide n. %C A024816 a(n) is the sum of proper non-divisors of n, the row sum in triangle A173541. - _Omar E. Pol_, May 25 2010 %C A024816 a(n) is divisible by A000203(n) iff n is in A076617. - _Bernard Schott_, Apr 12 2022 %H A024816 N. J. A. Sloane, <a href="/A024816/b024816.txt">Table of n, a(n) for n = 1..10000</a> %F A024816 a(n) = n*(n+1)/2 - sigma(n) = A000217(n) - A000203(n). %F A024816 a(n) = A024916(n-1) - A153485(n), n > 1. - _Omar E. Pol_, Jun 24 2014 %F A024816 From _Wesley Ivan Hurt_, Jul 16 2014, Dec 28 2015: (Start) %F A024816 a(n) = Sum_{i=1..n} i * ( ceiling(n/i) - floor(n/i) ). %F A024816 a(n) = Sum_{k=1..n} (n mod k) + (-n mod k). (End) %F A024816 G.f.: x/(1 - x)^3 - Sum_{k>=1} k*x^k/(1 - x^k). - _Ilya Gutkovskiy_, Sep 18 2017 %F A024816 From _Omar E. Pol_, Mar 21 2021: (Start) %F A024816 a(n) = A244048(n) + A004125(n). %F A024816 a(n) = A153485(n-1) + A004125(n), n >= 2. (End) %F A024816 a(p) = (p-2)*(p+1)/2 for p prime. - _Bernard Schott_, Apr 12 2022 %e A024816 a(12)=50 as 5+7+8+9+10+11 = 50 (1,2,3,4,6 not included as they divide 12). %p A024816 A024816 := proc(n) %p A024816 n*(n+1)/2-numtheory[sigma](n) ; %p A024816 end proc: # _R. J. Mathar_, Aug 03 2013 %t A024816 Table[n(n + 1)/2 - DivisorSigma[1, n], {n, 55}] (* _Robert G. Wilson v_ *) %t A024816 Table[Total[Complement[Range[n],Divisors[n]]],{n,60}] (* _Harvey P. Dale_, Sep 23 2012 *) %t A024816 With[{nn=60},#[[1]]-#[[2]]&/@Thread[{Accumulate[Range[nn]],DivisorSigma[ 1,Range[nn]]}]] (* _Harvey P. Dale_, Nov 22 2014 *) %o A024816 (PARI) a(n)=n*(n+1)/2-sigma(n) \\ _Charles R Greathouse IV_, Mar 19 2012 %o A024816 (Haskell) %o A024816 a024816 = sum . a173541_row -- _Reinhard Zumkeller_, Feb 19 2014 %o A024816 (Magma) [n*(n+1) div 2- SumOfDivisors(n): n in [1..60]]; // _Vincenzo Librandi_, Dec 29 2015 %o A024816 (Python) %o A024816 from sympy import divisor_sigma %o A024816 def A024816(n): return (n*(n+1)>>1)-divisor_sigma(n) # _Chai Wah Wu_, Apr 28 2023 %o A024816 (SageMath) %o A024816 def A024816(n): return sum(k for k in (0..n-1) if not k.divides(n)) %o A024816 print([A024816(n) for n in srange(1, 55)]) # _Peter Luschny_, Nov 14 2023 %Y A024816 Cf. A000203 (sigma), A000217, A004125, A023896, A024916, A066760, A076617, A153485, A173539, A173540, A173541, A244048, A352810, A352811. %Y A024816 Cf. A342344 (for a symmetric representation). %K A024816 easy,nonn,nice %O A024816 1,3 %A A024816 Paul Jobling (paul.jobling(AT)whitecross.com)