A265812

35 views
Skip to first unread message

Dave Consiglio

unread,
May 17, 2026, 12:09:51 PMMay 17
to seq...@googlegroups.com
Hello all,

I am wondering why 3 is not the first term of this sequence. Seems to me that 3/2 = 1.5 is the best first approximation of pi, followed by 5/2, 7/2, 17/5, etc. It's not a very good approximation of pi, but it's the best one so far.

This change would prepend a 2 on A265813 as well.

Thoughts? Am I missing something?

Dave Consiglio

Daniel Mondot

unread,
May 17, 2026, 1:30:41 PMMay 17
to seq...@googlegroups.com
I am wondering the opposite. Why is 5/2 an approximation of pi at all? I would expect approximations to be at least between 3 and 4 and get increasingly closer.
You could argue that 1.5 is less than 50% of pi, and therefore not a useful approximation at all. On the other hand, limiting the numerator and denominator to prime numbers isn't really useful to get good approximations, so the whole sequence is more an interesting exercise than anything useful. in that light perhaps you are right.

D.

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/CAE7Bzuee%3DJB1T1UE_D4Obh2LptXWC39U8pAec1VT00bMRQezvw%40mail.gmail.com.

Allan Wechsler

unread,
May 17, 2026, 2:15:34 PMMay 17
to seq...@googlegroups.com
To answer Dave Consiglio's first question, my reading is that 3/2 is not a "best prime approximation" to pi, because 5/2 is a better approximation, so 3/2 would violate the p vs. p' rule. 5/2 also violates the rule, because 7/2 is still better. So I am, with Daniel, wondering why 5 is listed here; it must be for 5/2 (because larger denominators force the fraction farther from the target), but 7/2 is better than 5. 7 is definitely in, because 7/2 is closer to pi than any other p/2.

For a denominator of 3, the candidates are 8/3 and 10/3, but neither 8 nor 10 are prime, and 7/3 and 11/3 are farther from pi than the current champion, 7/2.

For a denominator of 5, the closest prime fractions bracketing pi are 13/5 and 17/5, and sure enough, 17/5 is closer to pi than 7/2, so it takes over as champion.

For a denominator of 7, the prime fraction brackets are 19/7 and 23/7, and 23/7 is better than 17/5, so it takes over.

So according to the given rules, it seems to me that the 5 is spurious, and the first three entries should be 7, 17, 23.

The facile recommendation would be to change the data of the sequence by dropping the initial 5.

But we have a philosophy that says that if the data and the given definition are incompatible, but the data has a clear alternate explanation, that we give priority to the data and edit the definitions. Especially in a case like this one, where a half-dozen sequences were submitted at once using the same Mathematica code, it behooves us to analyze the code, see what it's actually doing, and strongly consider altering the definition to agree with what the code is actually producing. If the code is doing something incoherent or completely mathematically uninteresting, only then would we consider fixing the data (and the code) to conform with the current definition. I have not analyzed the Mathematica code (my Mathematica skills are wobbly), but it feels like somebody should. The problem is not that we are counting 1 as prime; if that were the case, the first approximation would be 3/1 and it would knock out 7/2 and 17/5 from consideration.

Adding back sequences with the original definitions would be a matter of taste, assuming the existing data has a satisfying and correct definition.

-- Allan

Dave Consiglio

unread,
May 17, 2026, 5:08:22 PMMay 17
to seq...@googlegroups.com
Strictly speaking, 3/2 is an approximation of pi, albeit a terrible one. But if we're starting with the lease prime numerator and denominator, I think it is where we should start (unless we want to include equal numerator and denominator, in which case 2/2 would technically be first). 

The description as it stands seems to require the inclusion of 3/2. If we stipulate that the terms include only the best numerator for a given denominator, the we should start with 7/2. 

Which is better is subject to debate of course. But I think we all agree that if 5/2 is included then there is no reason not to include 3/2. 

Personally, I now think that the sequence should start with 7/2 and the description be changed, but I can see the other side of it. 




Misha Lavrov

unread,
May 19, 2026, 2:33:25 PMMay 19
to seq...@googlegroups.com
The Mathematica code is combining the list of best lower bounds and best upper bounds, then sorting them from worst to best approximation to pi. Afterwards, it picks out the ones that are not followed by a fraction with smaller denominator (which, due to the sorting, would be a better approximation to pi).

Thus, a fraction p/q ends up on the list iff

(1) it is either the best lower bound on pi or the best upper bound on pi which is of the form prime/q, and
(2) there is no prime/prime fraction with a denominator less than q which is closer to pi.

Both 5/2 and 7/2 end up on the list because they are the best lower bound and the best upper bound on pi with denominator 2; the second condition is satisfied vacuously. We never check whether 5/2 or 7/2 is closer to pi; all that matters is that neither 5/2 nor 7/2 is beaten by a smaller prime denominator, and it's hard to beat 2 in the smaller-prime contest.

I can't imagine that there will be any later instance where two fractions with the same denominator would appear. If p/q < pi < p'/q, then the worse of the two approximations is off by more than 1/q. For both p/q and p'/q to appear on the list, no prime/prime fraction with denominator less than q could be within 1/q of pi, which is a big ask. 

Best,
Misha

Dave Consiglio

unread,
May 19, 2026, 3:00:40 PMMay 19
to seq...@googlegroups.com
Thanks for that info, Misha. The quick Python I wrote simply starts with num = 3 and dem = 2, increases the numerator until such time that the approximations get worse, then increases the denominator to the next prime and reiterates. That, to me, is how this sequence should exist as described - again, I have no idea why 3/2 is not included, since it is the best approximation of pi using a fraction of primes greater than the next best previous estimate (which, in this case, does not exist).

What do you think? Should these sequences be expanded to include 3/2? Shortened to remove 5/2? Redescribed? Left as is?

Dave

M F Hasler

unread,
May 19, 2026, 3:12:40 PMMay 19
to seq...@googlegroups.com
On Tue, May 19, 2026 at 2:33 PM Misha Lavrov <mish...@gmail.com> wrote:
The Mathematica code is combining the list of best lower bounds and best upper bounds,

But this sequence is not about lower or upper bounds, it's about closest fractions.
(There are two other sequences which are about lower and upper "best approximations".)
The given definition is that |x - p/q| is nonzero (!) and < any other |x - u/v| with primes u,v ; v < q
and <= |x - p'/q| for any other p' (There must be "<=" and not "<" because the author wants to have both in case of equality which can happen for rational x. That's acceptable, although the "convention" that the larger one should be listed first appears quite unnatural to me. [Maybe in order to be able to spot these cases from a(n) > a(n+1) ?])
[But actually, then once again we must exclude p'/q = x, otherwise there is no such p when p'/q would equal x which can happen: e.g. there is the corresponding sequence with x=1 where p=q=2 would be a "terminal" primes-only best approximation.]

For irrational x there can't be two "best approximations" with the same denominator: 
For any q and primes p != p',  one among |x - p/q| and |x - p'/q| is always strictly smaller and therefore the only term that qualifies.
Therefore a(1)=5 and the corresponding duplicate denominator a'(2)=2 had to be deleted
-M.

Dave Consiglio

unread,
May 19, 2026, 3:21:58 PMMay 19
to seq...@googlegroups.com
Hi M,

I think that's a really astute point - because there is the v < q and not v <= q in the description, that should preclude 5/2 as a member of this sequence. Honestly, if it were <=, then we might have to include 2/2, which again is technically an approximation of pi formed by the ratio of two primes.

So, should I suggest the edit for the sequence to remove 5/2? Any last thoughts?



--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.

Allan Wechsler

unread,
May 19, 2026, 3:40:47 PMMay 19
to seq...@googlegroups.com
The alternative to changing the data is to change the description and the title to more accurately represent where the given data actually comes from. Or maybe just add a comment saying that 5/2 doesn't exactly meet the stated criteria and is being retained for historical reasons. It's not very harmful, anybody searching for the correct sequence will find this one anyway.

-- Allan

Reply all
Reply to author
Forward
0 new messages