Post Reply 
Reflections on Valentin's 2023 Pi day special
03-22-2023, 09:11 AM
Post: #1
Reflections on Valentin's 2023 Pi day special
Once again Valentin has posed an interesting programming challenge based on an interesting mathematical finding.
[VA] SRC #013 - Pi Day 2023 Special

The link to Pi this time is in the counting of square-free integers (I've a feeling we called them quadratfrei in my day - anyhow, numbers which have repeated prime factors, as compared to those which don't.)

I did a little investigating of this, in BBC Basic, one of my preferred languages, and of course this is outside Valentin's rules of engagement.

What's different in my case, then, is having none of the augmented 71B's augmentations: no factoring or prime number functions. It's certain to come out slower.

My related challenges, then, would be
- to respond to Valentin's challenge using an unaugmented 71B, or a similarly ordinary Basic
- to find values of N which incidentally deliver unfairly close values of Pi

In particular, I'd like to see (or write) a program which does the accurate counting by inclusion-exclusion, rather than trial division by prime squares. It should be much faster, but will be more complicated.

I'd also quite like to port V's small-memory solution to an unaugmented Basic.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Reflections on Valentin's 2023 Pi day special - EdS2 - 03-22-2023 09:11 AM

User(s) browsing this thread: