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 A276984 #23 Nov 19 2024 04:31:20 %S A276984 0,0,4,9,29,41,90,119,194,255,384,440,649,765,980,1155,1495,1654,2108, %T A276984 2324,2811,3185,3794,4050,4874,5351,6110,6664,7713,8155,9454,10075, %U A276984 11309,12235,13610,14295,16205,17209,18840,19930,22139,23085,25584,26808,29029,30861,33510,34614,37974,39670 %N A276984 Sum of squares of numbers less than n that do not divide n. %H A276984 Amiram Eldar, <a href="/A276984/b276984.txt">Table of n, a(n) for n = 1..10000</a> %F A276984 Dirichlet g.f.: (2 zeta(s-3) + 3*zeta(s-2) + zeta(s-1) - 6*zeta(s-2)*zeta(s))/6. %F A276984 a(n) = n*(n + 1)*(2*n + 1)/6 - sigma_2(n). %F A276984 a(n) = A000330(n) - A001157(n). %e A276984 a(3) = 4 because 3 has 2 divisors {1,3} therefore 1 non-divisor {2} and 2^2 = 4; %e A276984 a(4) = 9 because 4 has 3 divisors {1,2,4} therefore 1 non-divisor {3} and 3^2 = 9; %e A276984 a(5) = 29 because 5 has 2 divisors {1,5} therefore 3 non-divisors {2,3,4} and 2^2 + 3^2 + 4^2 = 29, etc. %t A276984 Table[n (n + 1) ((2 n + 1)/6) - DivisorSigma[2, n], {n, 1, 50}] %t A276984 Table[Total[Complement[Range[n],Divisors[n]]^2],{n,50}] (* _Harvey P. Dale_, May 10 2018 *) %o A276984 (PARI) a(n) = n*(n + 1)*(2*n + 1)/6 - sigma(n, 2); \\ _Michel Marcus_, Sep 29 2016 %Y A276984 Cf. A000330, A001157, A024816, A049820. %K A276984 nonn,easy %O A276984 1,3 %A A276984 _Ilya Gutkovskiy_, Sep 29 2016