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.
%I A345320 #30 Jul 08 2025 00:31:12 %S A345320 0,2,3,4,5,11,7,12,9,17,11,25,13,23,23,24,17,35,19,39,31,35,23,57,25, %T A345320 41,36,53,29,71,31,56,47,53,47,79,37,59,55,87,41,95,43,81,74,71,47, %U A345320 117,49,87,71,95,53,116,71,117,79,89,59,165,61,95,100,112,83,143,67,123,95,143,71,183,73,113,118,137,95,167,79,179,108,125,83 %N A345320 Sum of the divisors of n whose square does not divide n. %C A345320 Inverse Möbius transform of n+n^(1/2)*((-1)^tau(n)-1)/2. - _Wesley Ivan Hurt_, Jul 07 2025 %H A345320 Harvey P. Dale, <a href="/A345320/b345320.txt">Table of n, a(n) for n = 1..1000</a> %F A345320 a(n) = Sum_{k=1..n} k * (ceiling(n/k^2) - floor(n/k^2)) * (1 - ceiling(n/k) + floor(n/k)). %F A345320 a(n) = A000203(n) - A069290(n). - _Rémy Sigrist_, Jun 14 2021 %F A345320 a(n) = Sum_{d|n} (d+d^(1/2)*((-1)^tau(d)-1)/2). - _Wesley Ivan Hurt_, Jul 07 2025 %e A345320 a(16) = 24; The divisors of 16 whose square does not divide 16 are 8 and 16. The sum of the divisors is then 8 + 16 = 24. %t A345320 Table[Sum[k (Ceiling[n/k^2] - Floor[n/k^2]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 80}] %t A345320 sdnd[n_]:=Total[Select[Divisors[n],Mod[n,#^2]!=0&]]; Array[sdnd,100] (* _Harvey P. Dale_, Jul 07 2025 *) %o A345320 (PARI) a(n) = sumdiv(n, d, if (n % d^2, d)); \\ _Michel Marcus_, Jun 13 2021 %o A345320 (Python) %o A345320 from math import prod %o A345320 from sympy import factorint %o A345320 def A345320(n): %o A345320 f = factorint(n).items() %o A345320 return (prod(p**(q+1)-1 for p, q in f) - prod(p**(q//2+1)-1 for p, q in f))//prod(p-1 for p, q in f) # _Chai Wah Wu_, Jun 14 2021 %Y A345320 Cf. A000005 (tau), A000203 (sigma), A056595, A069290. %K A345320 nonn %O A345320 1,2 %A A345320 _Wesley Ivan Hurt_, Jun 13 2021