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.

A285309 Sum of nonsquare divisors of n.

Original entry on oeis.org

0, 2, 3, 2, 5, 11, 7, 10, 3, 17, 11, 23, 13, 23, 23, 10, 17, 29, 19, 37, 31, 35, 23, 55, 5, 41, 30, 51, 29, 71, 31, 42, 47, 53, 47, 41, 37, 59, 55, 85, 41, 95, 43, 79, 68, 71, 47, 103, 7, 67, 71, 93, 53, 110, 71, 115, 79, 89, 59, 163, 61, 95, 94, 42, 83, 143, 67, 121, 95, 143, 71, 145, 73, 113, 98
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 16 2017

Keywords

Examples

			a(6) = 11 because 6 has 4 divisors {1, 2, 3, 6} among which 3 are nonsquares {2, 3, 6} therefore 2 + 3 + 6 = 11.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, # &, Mod[DivisorSigma[0, #], 2] == 0 &], {n, 1, 75}]
    nmax = 75; Rest[CoefficientList[Series[Sum[(k + Floor[1/2 + Sqrt[k]]) x^(k + Floor[1/2 + Sqrt[k]])/(1 - x^(k + Floor[1/2 + Sqrt[k]])), {k, 1, nmax}], {x, 0, nmax}], x]]
    Array[DivisorSum[#, # &, ! IntegerQ@ Sqrt@ # &] &, 75] (* Michael De Vlieger, Nov 23 2017 *)
  • PARI
    a(n) = sumdiv(n, d, if (!issquare(d), d)); \\ Michel Marcus, Apr 17 2017
    
  • Python
    import gmpy
    from sympy import divisors
    def a(n): return sum([d for d in divisors(n) if gmpy.is_square(d)==0]) # Indranil Ghosh, Apr 18 2017

Formula

G.f.: Sum_{k>=1} A000037(k)*x^A000037(k)/(1 - x^A000037(k)).
a(n) = A000203(n) - A035316(n).
a(A005117(n)) = A000203(A005117(n)) - 1.
a(p^(2*k-1)) = a(p^(2*k)) = p*(p^(2*k) - 1)/(p^2 - 1) for p is a prime and k >= 1.