Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaussian elimination not working for A001042 #311

Open
ckrause opened this issue Jan 4, 2024 · 0 comments
Open

Gaussian elimination not working for A001042 #311

ckrause opened this issue Jan 4, 2024 · 0 comments
Labels
enhancement Improvement that is not a feature

Comments

@ckrause
Copy link
Contributor

ckrause commented Jan 4, 2024

The currently generated formula for A001042 is:

a(n) = a(n-1)^2-a(n-1)+b(n-1), b(n) = -a(n-1)+b(n-1)

Note that by Gaussian elimination we should find a simpler formula for b(n):

a(n)-b(n) = a(n-1)^2 
b(n) = a(n)-a(n-1)^2

Substituting it in the main formula, we can further simplify to:

a(n) = a(n-1)^2-a(n-2)^2

Issue can be reproduced using:

./loda export -l debug A001042

Relevant code is here:
https://github.com/loda-lang/loda-cpp/blob/main/src/form/variant.cpp

@ckrause ckrause added the enhancement Improvement that is not a feature label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement that is not a feature
Projects
None yet
Development

No branches or pull requests

1 participant