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!)
A276984 Sum of squares of numbers less than n that do not divide n. 2
0, 0, 4, 9, 29, 41, 90, 119, 194, 255, 384, 440, 649, 765, 980, 1155, 1495, 1654, 2108, 2324, 2811, 3185, 3794, 4050, 4874, 5351, 6110, 6664, 7713, 8155, 9454, 10075, 11309, 12235, 13610, 14295, 16205, 17209, 18840, 19930, 22139, 23085, 25584, 26808, 29029, 30861, 33510, 34614, 37974, 39670 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
Dirichlet g.f.: (2 zeta(s-3) + 3*zeta(s-2) + zeta(s-1) - 6*zeta(s-2)*zeta(s))/6.
a(n) = n*(n + 1)*(2*n + 1)/6 - sigma_2(n).
a(n) = A000330(n) - A001157(n).
EXAMPLE
a(3) = 4 because 3 has 2 divisors {1,3} therefore 1 non-divisor {2} and 2^2 = 4;
a(4) = 9 because 4 has 3 divisors {1,2,4} therefore 1 non-divisor {3} and 3^2 = 9;
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.
MATHEMATICA
Table[n (n + 1) ((2 n + 1)/6) - DivisorSigma[2, n], {n, 1, 50}]
Table[Total[Complement[Range[n], Divisors[n]]^2], {n, 50}] (* Harvey P. Dale, May 10 2018 *)
PROG
(PARI) a(n) = n*(n + 1)*(2*n + 1)/6 - sigma(n, 2); \\ Michel Marcus, Sep 29 2016
CROSSREFS
Sequence in context: A192234 A069563 A352878 * A210969 A059345 A127768
KEYWORD
nonn,easy
AUTHOR
Ilya Gutkovskiy, Sep 29 2016
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 March 29 05:16 EDT 2024. Contains 371264 sequences. (Running on oeis4.)