OFFSET
0,3
LINKS
FORMULA
a(0)=1, a(1)=1, a(n) = a(n-1) + 25*a(n-2) for n>1. - Philippe Deléham, Sep 19 2009
a(n) = (1/2 + sqrt(101)/202)*(1/2 + sqrt(101)/2)^(n-1) + (1/2 - sqrt(101)/202)*(1/2 - sqrt(101)/2)^(n-1). - Antonio Alberto Olivares, Jun 06 2011
MATHEMATICA
m =5; p[x_] := -1 - x/m + x^2; q[x_] := ExpandAll[x^2*p[1/x]]; Table[ SeriesCoefficient[Series[x/q[x], {x, 0, 30}], n]*m^(n - 1), {n, 0, 30}]
Join[{a=1, b=1}, Table[c=1*b+25*a; a=b; b=c, {n, 60}]] (* Vladimir Joseph Stephan Orlovsky, Feb 01 2011 *)
CoefficientList[Series[1/(1-x-25x^2), {x, 0, 30}], x] (* or *) LinearRecurrence[ {1, 25}, {1, 1}, 30] (* Harvey P. Dale, Dec 23 2014 *)
PROG
(C++)
// generates 9 terms in the sequence A122999 in OEIS
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <iomanip>
using namespace std;
int main(int argc, char *argv[])
{
for (int i=1; i < 10; i++)
{ double j; j = (1.0/2.0+sqrt(101)/202.0)*pow((1.0/2.0+sqrt(101.0)/2.0), i-1)+(1.0/2.0-sqrt(101)/202.0)*pow((1.0/2.0-sqrt(101.0)/2.0), i-1);
std::cout << i << ' ' << j << endl; }
return EXIT_SUCCESS;
} // Antonio Alberto Olivares, Jun 06 2011
(Maxima) makelist(coeff(taylor(1/(1-x-25*x^2), x, 0, n), x, n), n, 0, 20); /* Bruno Berselli, Jun 06 2011 */
(PARI) Vec(O(x^99)+(1-x-25*x^2)^-1) \\ Charles R Greathouse IV, Jun 06, 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 22 2006
EXTENSIONS
Edited by N. J. A. Sloane, Sep 26 2006
Definition corrected by R. J. Mathar, Jan 15 2009
STATUS
approved