Sometimes patterns can lead you astray. For example, it’s known that

is a good approximation to the number of primes less than or equal to Numerical evidence suggests that is always greater than For example,

and

But in 1914, Littlewood heroically showed that in fact, changes sign infinitely many times!

This raised the question: when does first exceed ? In 1933, Littlewood’s student Skewes showed, assuming the Riemann hypothesis, that it must do so for some less than or equal to

Later, in 1955, Skewes showed *without* the Riemann hypothesis that must exceed for some smaller than

By now this bound has been improved enormously. We now know the two functions cross somewhere near but we don’t know if this is the first crossing!

All this math is quite deep. Here is something less deep, but still fun.

You can show that

and so on.

It’s a nice pattern. But this pattern doesn’t go on forever! It lasts a very, very long time… but not forever.

More precisely, the identity

holds when

but not for all At some point it stops working and never works again. In fact, it definitely fails for all

### The explanation

The integrals here are a variant of the Borwein integrals:

where the pattern continues until

but then fails:

I never understood this until I read Greg Egan’s explanation, based on the work of Hanspeter Schmid. It’s all about convolution, and Fourier transforms:

Suppose we have a rectangular pulse, centred on the origin, with a height of 1/2 and a half-width of 1.

Now, suppose we keep taking moving averages of this function, again and again, with the average computed in a window of half-width 1/3, then 1/5, then 1/7, 1/9, and so on.

There are a couple of features of the original pulse that will persist completely unchanged for the first few stages of this process, but then they will be abruptly lost at some point.

The first feature is that F(0) = 1/2. In the original pulse, the point (0,1/2) lies on a plateau, a perfectly constant segment with a half-width of 1. The process of repeatedly taking the moving average will nibble away at this plateau, shrinking its half-width by the half-width of the averaging window. So, once the sum of the windows’ half-widths exceeds 1, at 1/3+1/5+1/7+…+1/15, F(0) will suddenly fall below 1/2, but up until that step it will remain untouched.

In the animation below, the plateau where F(x)=1/2 is marked in red.

The second feature is that F(–1)=F(1)=1/4. In the original pulse, we have a step at –1 and 1, but if we define F here as the average of the left-hand and right-hand limits we get 1/4, and once we apply the first moving average we simply have 1/4 as the function’s value.

In this case, F(–1)=F(1)=1/4 will continue to hold so long as the points (–1,1/4) and (1,1/4) are surrounded by regions where the function has a suitable symmetry: it is equal to an odd function, offset and translated from the origin to these centres. So long as that’s true for a region wider than the averaging window being applied, the average at the centre will be unchanged.

The initial half-width of each of these symmetrical slopes is 2 (stretching from the opposite end of the plateau and an equal distance away along the x-axis), and as with the plateau, this is nibbled away each time we take another moving average. And in this case, the feature persists until 1/3+1/5+1/7+…+1/113, which is when the sum first exceeds 2.

In the animation, the yellow arrows mark the extent of the symmetrical slopes.

OK, none of this is difficult to understand, but why should we care?

Because this is how Hanspeter Schmid explained the infamous Borwein integrals:

∫sin(t)/t dt = π/2

∫sin(t/3)/(t/3) × sin(t)/t dt = π/2

∫sin(t/5)/(t/5) × sin(t/3)/(t/3) × sin(t)/t dt = π/2…

∫sin(t/13)/(t/13) × … × sin(t/3)/(t/3) × sin(t)/t dt = π/2

But then the pattern is broken:

∫sin(t/15)/(t/15) × … × sin(t/3)/(t/3) × sin(t)/t dt < π/2

Here these integrals are from t=0 to t=∞. And Schmid came up with an even more persistent pattern of his own:

∫2 cos(t) sin(t)/t dt = π/2

∫2 cos(t) sin(t/3)/(t/3) × sin(t)/t dt = π/2

∫2 cos(t) sin(t/5)/(t/5) × sin(t/3)/(t/3) × sin(t)/t dt = π/2

…

∫2 cos(t) sin(t/111)/(t/111) × … × sin(t/3)/(t/3) × sin(t)/t dt = π/2But:

∫2 cos(t) sin(t/113)/(t/113) × … × sin(t/3)/(t/3) × sin(t)/t dt < π/2

The first set of integrals, due to Borwein, correspond to taking the Fourier transforms of our sequence of ever-smoother pulses and then evaluating F(0). The Fourier transform of the sinc function:

sinc(w t) = sin(w t)/(w t)

is proportional to a rectangular pulse of half-width w, and the Fourier transform of a product of sinc functions is the convolution of their transforms, which in the case of a rectangular pulse just amounts to taking a moving average.

Schmid’s integrals come from adding a clever twist: the extra factor of 2 cos(t) shifts the integral from the zero-frequency Fourier component to the sum of its components at angular frequencies –1 and 1, and hence the result depends on F(–1)+F(1)=1/2, which as we have seen persists for much longer than F(0)=1/2.

• Hanspeter Schmid, Two curious integrals and a graphic proof,

Elem. Math.69(2014) 11–17.

I asked Greg if we could generalize these results to give even longer sequences of identities that eventually fail, and he showed me how: you can just take the Borwein integrals and replace the numbers 1, 1/3, 1/5, 1/7, … by some sequence of positive numbers

The integral

will then equal as long as but not when it exceeds 1. You can see a full explanation on Wikipedia:

• Wikipedia, Borwein integral: general formula.

As an example, I chose the integral

which equals if and only if

Thus, the identity holds if

However,

so the identity holds if

or

or

On the other hand, the identity fails if

so it fails if

However,

so the identity fails if

or

or

With a little work one could sharpen these estimates considerably, though it would take more work to find the *exact* value of at which

first fails.

There’s a typo in the definition of li(x)

Whoops! I’ll fix it, thanks.

I believe the first for which the pattern fails is:

15,341,178,777,673,149,429,167,740,440,969,249,338,310,889

The sum can be rewritten in terms of digamma functions:

which Mathematica can calculate with a Taylor series (or something similar), so it’s possible to evaluate it to sufficient precision to be sure that the value is greater than 1 for this , and less than 1 for .

And the Schmid integrals, with their extra factor of , will stick to the pattern until the sum first exceeds 2, at equal to:

412,388,856,479,291,008,968,946,990,055,780,778,304,566,005,151,152,521,580,673,941,188,473,456,899,173,626,864,612

Greg wrote:

That’s great! I should have read your comment before I tweeted about this today, so I could include the exact number. But I composed the tweet yesterday after merely working out an estimate.

I didn’t know that the digamma function

obeys

So, I didn’t know a good strategy to compute the exact number.

The explanation by Greg and Schmid is really insightful. Rademacher functions are step functions (the Fourier transform of the sinc function gets you back to the square wave) and the integral of the product of them over (0,1) is zero :

for any n

regarding patterns, I see this in the news:

“Famed mathematician claims proof of 160-year-old Riemann hypothesis:

https://www.newscientist.com/article/2180406-famed-mathematician-claims-proof-of-160-year-old-riemann-hypothesis/

Yes, and you can see my response on Twitter, but I don’t really want to talk about that here.

More relevant is the question of whether numerical evidence for the Riemann hypothesis is really convincing!

In 2000, Gourdon and Demichel showed that the first 10,000,000,000,000 nontrivial zeros of the Riemann zeta function lie on the line Re(z) = 1/2, just as the Riemann hypothesis claims. They also checked two billion much larger zeros.

Normally this would seem pretty convincing. But some argue otherwise! According to Wikipedia:

Emphasis mine.

I think there is a typo in the condition on . It should be .

You’re right—or I should write the integral as

[…] A mathematical pattern that fails after about 10^43 examples 5 by fanf2 | 0 comments on Hacker News. […]

Well, considering series which is always less than 1,

is always equal to

That’s a nice idea!

I think this could help: https://doi.org/10.1088/1751-8121/aa6f32

iop.org paywall BS? Really?

https://arxiv.org/abs/1610.09702 please!

As things stand, I read your discussion of how you found the bounds on the range of where your example first fails as saying, for example,

(i.e., that the first statement, and the second notionally opposed statement, have to hold). I think that it would be clearer with commas (which would, perhaps unfortunately, have to be part of the displayed math):

to emphasise that the ‘but’ is helping you narrow down the range of to be considered, not directly imposing a further condition on .

Good point! I’m glad someone is reading this stuff in a careful and critical way.

Instead of making one little comma carry such a heavy burden, I think I’ll deploy that wonderful word “However”.

The Borweins have been at this stuff for a while – see their 2007 paper with Robert Baillie, “Surprising Sinc Sums and Integrals” which sets out the Fourier theoretic background to the compelling visual explanations give by Greg Egan and Hanspeter Schmid.

In Fourier theoretic terms you are transforming, via convolutions, a unitbox signal which gets you to a sinc wave in the transform space. Along the way you get the “localisation –nonlocalisation effect” ie if something is concentrated in interval of length L then in the transform space it cannot be located in an interval essentially less than 1/L – Heisenberg uncertainty if you like, but really just a property of Fourier transforms. It is still surprising that the pattern breaks down and Hanspeter Schmid really nails it by referring to the erosion on the plateau of the box function in the convolution process. He has come at it from a signal processing angle I think.

As an aside Jonathan Borwein died in 2016 while at Newcastle University, Australia. He was a Fellow of the Australian Academy of Sciences.

if is at most 1 and is 0 if is bigger than 1. So you can let be any sequence that takes a long time to exceed 1, like to get a similar example.

It’s just a cheap variation of what you discussed in the post, and works for a simpler version of the same reason.

Yes, that’s nice!

The link for the animation is broken; I think it has an extra closing parenthesis.

As an irrelevant analogy this reminds me of somone who is driving a car , and who has a series of drinks, each smaller than the previous one, Eventually they may go off the road and stop.