[seqfan] Re: Rounding in A075465

Harvey P. Dale hpd at hpdale.org
Fri Oct 2 17:10:16 CEST 2015

	It may be of some passing interest that Mathematica's "Round" function does not always round down in the case of a tie.  Instead, the documentation says that "Round rounds numbers of the form x.5 toward the nearest even integer."  That means (1) that Mathematica rounds up or down, in the case of a tie, to whichever is the nearest even integer, and (2) that if one wants to control the rounding in Mathematica to be consistent one has to write a separate function to do it correctly.

-----Original Message-----
From: SeqFan [mailto:seqfan-bounces at list.seqfan.eu] On Behalf Of Neil Sloane
Sent: Friday, October 2, 2015 8:08 AM
To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu>
Subject: [seqfan] Re: Rounding in A075465

Unless Zak responds otherwise, I suggest we add a comment saying:

In case of a tie, round down.

That is consistent with the data, and is the usual convention anyway.

Best regards

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

On Fri, Oct 2, 2015 at 2:55 AM, <israel at math.ubc.ca> wrote:

> A075465 is "Rounded average of first n primes", but nowhere does it 
> say what type of rounding is used in case of a tie (i.e. when the 
> actual average is half an odd integer). Since the Data gives a(2) = 2, 
> 5/2 is being rounded to 2 rather than 3. That could indicate that ties 
> are rounded down, or that ties are rounded to the nearest even 
> integer. The next places the issue will arise in this sequence are 
> a(1810) (which could be 7265 or
> 7266) and and a(2458) (10285 or 10286).
> Cheers, Robert
> _______________________________________________
> Seqfan Mailing list - http://list.seqfan.eu/


Seqfan Mailing list - http://list.seqfan.eu/

More information about the SeqFan mailing list