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.

A162296 Sum of divisors of n that have a square factor.

This page as a plain text file.
%I A162296 #33 Apr 20 2023 14:55:16
%S A162296 0,0,0,4,0,0,0,12,9,0,0,16,0,0,0,28,0,27,0,24,0,0,0,48,25,0,36,32,0,0,
%T A162296 0,60,0,0,0,79,0,0,0,72,0,0,0,48,54,0,0,112,49,75,0,56,0,108,0,96,0,0,
%U A162296 0,96,0,0,72,124,0,0,0,72,0,0,0,183,0,0,100,80,0,0,0,168,117,0,0,128,0,0
%N A162296 Sum of divisors of n that have a square factor.
%C A162296 Note that 1 does not have a square factor. - _Antti Karttunen_, Nov 20 2017
%H A162296 Antti Karttunen, <a href="/A162296/b162296.txt">Table of n, a(n) for n = 1..16384</a>
%H A162296 <a href="/index/Su#sums_of_divisors">Index entries for sequences related to sums of divisors</a>.
%F A162296 a(n) + A048250(n) = A000203(n). - _Antti Karttunen_, Nov 20 2017
%F A162296 From _Amiram Eldar_, Oct 01 2022: (Start)
%F A162296 a(n) = 0 iff n is squarefree (A005117).
%F A162296 a(n) = n iff n is a square of a prime (A001248).
%F A162296 Sum_{k=1..n} a(k) ~ (Pi^2/12 - 1/2) * n^2. (End)
%e A162296 a(8) = 12 = 4 + 8.
%t A162296 Array[DivisorSum[#, # &, # (1 - MoebiusMu[#]^2) == # &] &, 86] (* _Michael De Vlieger_, Nov 20 2017 *)
%t A162296 a[1]=0; a[n_] := DivisorSigma[1, n] - Times@@(1+FactorInteger[n][[;; , 1]]); Array[a,86] (* _Amiram Eldar_, Dec 20 2018 *)
%o A162296 (PARI) a(n)=sumdiv(n,d,d*(1-moebius(d)^2)); v=vector(300,n,a(n))
%o A162296 (Python)
%o A162296 from math import prod
%o A162296 from sympy import factorint
%o A162296 def A162296(n):
%o A162296     f = factorint(n)
%o A162296     return prod((p**(e+1)-1)//(p-1) for p, e in f.items())-prod(p+1 for p in f) # _Chai Wah Wu_, Apr 20 2023
%Y A162296 Cf. A000203, A001248, A005117, A013929, A048250.
%K A162296 easy,nonn
%O A162296 1,4
%A A162296 _Joerg Arndt_, Jun 30 2009