Skip to content

Optimization of Counting Loop w/ Closed-form Formula - #23

Open
davis-matthew wants to merge 1 commit into
CPMD-code:mainfrom
davis-matthew:oeis-closed-form
Open

davis-matthew wants to merge 1 commit into
CPMD-code:mainfrom
davis-matthew:oeis-closed-form

Conversation

@davis-matthew

Copy link
Copy Markdown

Originally found by matching values against A113127, this takes the two cases of the loop's min and replaces each with closed-form formulas that are equivalent.

$$ \text{NCONST} = \begin{cases} \dfrac{N(N-1)}{2}, & N < 4 \\ 4N - 10, & N \ge 4 \end{cases} $$

@cla-bot

cla-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Matthew Davis.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot

cla-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

Thanks a lot for working on CPMD, we strongly value contributions from our users.

It appears that one of the commiters in the PR did not sign the CLA for contributors. To do so, you can open an issue to sign the CLA clicking here. More details can be found here.

You can then request a new CLA check by commenting "@cla-bot check" on this PR.

@davis-matthew

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Oct 17, 2026
@cla-bot

cla-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant