axiom-developer
[Top][All Lists]

[Axiom-developer] [Guessing formulas for sequences]

 From: kratt6 Subject: [Axiom-developer] [Guessing formulas for sequences] Date: Tue, 22 Mar 2005 03:50:05 -0600

Changes
http://page.axiom-developer.org/zope/mathaction/GuessingFormulasForSequences/diff
--

??changed:
-working. Another bug, #8 messes up the output by missing some parenthesis.
Preliminary
working. Another bug, #8 messes up the output by missing some parenthesis.
Preliminary

??changed:
-Finally, please feel free to try this package in the SandBox!
Finally, please feel free to try this package in the SandBox! If you would like
to use
this program at your own computer, you need the source of

- RINTERPA and RINTERP from [Rational Interpolation]

- PCDEN from [CommonDenominator for polynomials]

- GUESS, GUESSINT and GUESSP from [Guess]

If you find the package useful, please let me know!

Unfortunately, on MathAction this does not work yet, so we need to use

\begin{axiom}
guessPRec(n, [1, 1, 2, 3, 5, 8, 13, 21, 34], n+->n)$GuessInteger \end{axiom} ++added: )set output algebra on ++added: )set output algebra off ??changed: -fitting function has been found. fitting function has been found. Finally, the last parameter is a nonnegative integer that specifies how many levels of recursion will be tried. I.e., if the last parameter is zero, no operator will be applied, if it is one, the package applies one, and so on. In the example above, the sequence is first differenced, then successive quotients are formed. ??changed: -l1:=[1,1,1+q,1+q+q^2,1+q+q^2+q^3+q^4,1+q+q^2+q^3+2*q^4+q^5+q^6] -l2:=[1+q+q^2+q^3+2*q^4+2*q^5+2*q^6+q^7+q^8+q^9] -l3:=[(1+q^4+q^6)*(1+q+q^2+q^3+q^4+q^5+q^6)] -l4:=[(1+q^4)*(1+q+q^2+q^3+q^4+q^5+2*q^6+2*q^7+2*q^8+2*q^9+q^10+q^11+q^12)] -l:=append(append(append(l1,l2),l3),l4) -guessPRec(n, l1, n+->q^n)$GuessPolynomial
l:=[1, 1, 1+q, 1+q+q^2, 1+q+q^2+q^3+q^4, 1+q+q^2+q^3+2*q^4+q^5+q^6,
1+q+q^2+q^3+2*q^4+2*q^5+2*q^6+q^7+q^8+q^9,
(1+q^4+q^6)*(1+q+q^2+q^3+q^4+q^5+q^6),
(1+q^4)*(1+q+q^2+q^3+q^4+q^5+2*q^6+2*q^7+2*q^8+2*q^9+q^10+q^11+q^12)];
(guessPRec(n, l, n+->q^n)\$GuessPolynomial).1

--