Finding $Z(N)=\sum_{i=1}^N i^2\left\lfloor \frac{N}{i^2} \right\rfloor$

187 Views Asked by At

I have been trying to find this summation faster, Is there any sequence that can be observed?

$$Z(N)=\sum_{i=1}^N i^2\left\lfloor \frac{N}{i^2} \right\rfloor$$

1

There are 1 best solutions below

3
On

This sequence is OEIS' A309125 with some interesting links like A035316 for the differences obtained with following Dirichlet generating function (and much more) : $$\zeta(s)\, \zeta(2s-2)$$ Details appear at $\,3.6\,$ (for $\,t=2$) in Richard Mathar's paper "Survey of Dirichlet Series of Multiplicative Arithmetic Functions".

Using the free pari/gp we may obtain these differences and (adding) your initial sequence :

 vz=vector(50,n,1)
 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...]
 vz2=vector(#vz,n,n*(sqrtint(n)^2==n))
 = [1, 0, 0, 4, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 16,...]
 d= dirmul(vz,vz2)
 = [1, 1, 1, 5, 1, 1, 1, 5, 10, 1, 1, 5, 1, 1, 1, 21, 1, 10, 1, 5, 1, 1, 1,...]
 s=0;vector(#vz,n,s+=d[n])
 = [1, 2, 3, 8, 9, 10, 11, 16, 26, 27, 28, 33, 34, 35, 36, 57, 58, 68, 69,...]