Article 6VC94 The Buenos Aires constant

The Buenos Aires constant

by
John
from John D. Cook on (#6VC94)

The Buenos Aires constant is 2.92005097731613...

What's so special about this number? Let's see when we use it to initialize the following Python script.

s = 2.920050977316134for _ in range(10): i = int(s) print(i) s = i*(1 + s - i)

What does this print?

 2, 3, 5, 7, 11, 13, 17, 19, 23, 29

If we started with the exact Buenos Aires constant and carried out our operations exactly, the procedure above would generate all prime numbers. In actual IEEE 754 arithmetic, it breaks down around Douglas Adams' favorite number.

The Buenos Aires constant is defined by the infinite sum

buenos_aires.svg

As you can tell, the primes are baked into the definition of , so the series can't generate new primes.

I used mpmath to calculate to 100 decimal places:

2.920050977316134712092562917112019468002727899321426719772682533107733772127766124190178112317583742

This required carrying out the series defining for the first 56 primes. When I carried out the iteration above also to 100 decimal places, it failed on the 55th prime. So basically I got about as many primes out of the computation as I put into it.

Reference: Beyond Pi and e: a Collection of Constants. James Grime, Kevin Knudson, Pamela Pierce, Ellen Veomett, Glen Whitney. Math Horizons, Vol. 29, No. 1 (September 2021), pp. 8-12

The post The Buenos Aires constant first appeared on John D. Cook.
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments