-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
enhancementImprovement that is not a featureImprovement that is not a feature
Description
The FormulaGenerator often generates simple auxiliary functions that call recursive functions. Here is program that generates such a formula:
; A266709: Coefficient of x in minimal polynomial of the continued fraction [2,1^n,2,1,1,...], where 1^n means n ones.
; Formula: a(n) = b(n+2), b(n) = 2*b(n-1)+2*b(n-2)-b(n-3), b(3) = -25, b(2) = -7, b(1) = -5, b(0) = 1
mov $2,1
add $0,2
lpb $0
sub $0,1
add $1,$2
add $5,$1
add $1,$2
mov $3,$5
sub $3,6
mov $4,$2
mov $2,$3
mov $5,1
add $5,$4
lpe
mov $0,$2It would be nice to simplify the formula to a(n) = 2*a(n-1)+2*a(n-2)-a(n-3) with adjusted initial terms. Then we can get rid of the auxiliary helper functions.
Copilot
Metadata
Metadata
Assignees
Labels
enhancementImprovement that is not a featureImprovement that is not a feature