cp's OEIS Frontend

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.

A076543 a(n) = Sum_{k=1..n} k*sqf(k) where sqf(k)=1 if k is squarefree and sqf(k)=-1 otherwise.

Original entry on oeis.org

1, 3, 6, 2, 7, 13, 20, 12, 3, 13, 24, 12, 25, 39, 54, 38, 55, 37, 56, 36, 57, 79, 102, 78, 53, 79, 52, 24, 53, 83, 114, 82, 115, 149, 184, 148, 185, 223, 262, 222, 263, 305, 348, 304, 259, 305, 352, 304, 255, 205, 256, 204, 257, 203, 258, 202, 259, 317, 376, 316, 377
Offset: 1

Views

Author

Zak Seidov, Oct 19 2002

Keywords

Comments

Surprisingly, first 12 terms are also in A074170.

Crossrefs

Cf. A074170.

Programs

  • Mathematica
    Accumulate[Table[If[SquareFreeQ[n],n,-n],{n,70}]] (* Harvey P. Dale, Mar 18 2015 *)
  • PARI
    a(n) = sum(k = 1, n, if (issquarefree(k), k, -k)); \\ Michel Marcus, Oct 02 2013