[seqfan] Re: Sum( floor( k^2/n ), k=1..n)

Neil Sloane njasloane at gmail.com
Fri Aug 9 01:15:51 CEST 2013


Re computing A014817: One way to attack such problems is to look for a
transformation of the sequence which is easier to compute.
I tried a few things w/o success.
I did add the partial sums and the first differences - A227841, A227842 -
in case they occur in some other context.


On Wed, Aug 7, 2013 at 9:45 PM, Charles Greathouse <
charles.greathouse at case.edu> wrote:

> A014817 is defined as in the title. You can also sum in the opposite
> direction:
> a(n) = n^2 - sum_{m=1..n} floor(sqrt(n*m-1))
>
> But neither of these are efficient, taking n calculations (exponential in
> the length of n). Is there a better way to compute this sum (and the
> related ones in A166387, A166375, and A165993)? I keep having images of
> Dirichlet's hyperbola method but can't quite work out how to do it
> efficiently here.
>
> Maybe it's not hard and I'm just not looking at it right?
>
> Charles Greathouse
> Analyst/Programmer
> Case Western Reserve University
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>



-- 
Dear Friends, I have now retired from AT&T. New coordinates:

Neil J. A. Sloane, President, OEIS Foundation
11 South Adelaide Avenue, Highland Park, NJ 08904, USA
Phone: 732 828 6098; home page: http://NeilSloane.com
Email: njasloane at gmail.com



More information about the SeqFan mailing list