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.

A345371 Number of squarefree divisors of n whose square does not divide n.

This page as a plain text file.
%I A345371 #8 Oct 13 2023 06:52:48
%S A345371 0,1,1,0,1,3,1,0,0,3,1,2,1,3,3,0,1,2,1,2,3,3,1,2,0,3,0,2,1,7,1,0,3,3,
%T A345371 3,0,1,3,3,2,1,7,1,2,2,3,1,2,0,2,3,2,1,2,3,2,3,3,1,6,1,3,2,0,3,7,1,2,
%U A345371 3,7,1,0,1,3,2,2,3,7,1,2,0,3,1,6,3,3,3,2,1,6,3,2,3
%N A345371 Number of squarefree divisors of n whose square does not divide n.
%H A345371 Amiram Eldar, <a href="/A345371/b345371.txt">Table of n, a(n) for n = 1..10000</a>
%F A345371 a(n) = Sum_{d|n} mu(d)^2 * c(n/d^2), where c(n) = ceiling(n) - floor(n).
%F A345371 a(n) = A034444(n) - A323308(n). - _Amiram Eldar_, Oct 13 2023
%e A345371 a(30) = Sum_{d|30} mu(d)^2 * c(30/d^2) = 1*0 + 1*1 + 1*1 + 1*1 + 1*1 + 1*1 + 1*1 + 1*1 = 7.
%t A345371 a[n_] := DivisorSum[n, 1 &, SquareFreeQ[#] && ! Divisible[n, #^2] &]; Array[a, 100] (* _Amiram Eldar_, Oct 13 2023 *)
%o A345371 (PARI) a(n) = {my(e = factor(n)[, 2]); 1 << #e - vecprod(apply(x -> min(x, 2), e));} \\ _Amiram Eldar_, Oct 13 2023
%Y A345371 Cf. A008683 (mu), A034444, A323308, A344137.
%K A345371 nonn,easy
%O A345371 1,6
%A A345371 _Wesley Ivan Hurt_, Jun 16 2021