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.

A344137 Sum of the squarefree divisors of n whose square does not divide n.

Original entry on oeis.org

0, 2, 3, 0, 5, 11, 7, 0, 0, 17, 11, 9, 13, 23, 23, 0, 17, 8, 19, 15, 31, 35, 23, 9, 0, 41, 0, 21, 29, 71, 31, 0, 47, 53, 47, 0, 37, 59, 55, 15, 41, 95, 43, 33, 20, 71, 47, 9, 0, 12, 71, 39, 53, 8, 71, 21, 79, 89, 59, 69, 61, 95, 28, 0, 83, 143, 67, 51, 95, 143, 71, 0, 73
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 16 2021

Keywords

Examples

			a(20) = Sum_{d|20} d * mu(d)^2 * c(20/d^2) = 1*1*0 + 2*1*0 + 4*0*1 + 5*1*1 + 10*1*1 + 20*0*1 = 15.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, # &, SquareFreeQ[#] && ! Divisible[n, #^2] &]; Array[a, 100] (* Amiram Eldar, Oct 13 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1] + 1) - prod(i = 1, #f~, if(f[i, 2] == 1, 1, f[i, 1] + 1));} \\ Amiram Eldar, Oct 13 2023

Formula

a(n) = Sum_{d|n} d * mu(d)^2 * c(n/d^2), where c(n) = ceiling(n) - floor(n).
a(n) = A048250(n) - A295295(n). - Amiram Eldar, Oct 13 2023