cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A090390 Repeatedly multiply (1,0,0) by ([1,2,2],[2,1,2],[2,2,3]); sequence gives leading entry.

Original entry on oeis.org

1, 1, 9, 49, 289, 1681, 9801, 57121, 332929, 1940449, 11309769, 65918161, 384199201, 2239277041, 13051463049, 76069501249, 443365544449, 2584123765441, 15061377048201, 87784138523761, 511643454094369, 2982076586042449, 17380816062160329, 101302819786919521, 590436102659356801
Offset: 0

Views

Author

Vim Wenders, Jan 30 2004

Keywords

Comments

The values of a and b in (a,b,c)*A give all (positive integer) solutions to Pell equation a^2 - 2*b^2 = -1; the values of c are A000129(2n)
Binomial transform of A086348. - Johannes W. Meijer, Aug 01 2010
All values of a(n) are squares. sqrt(a(n+1)) = A001333(n). The ratio a(n+1)/a(n) converges to 3 + 2*sqrt(2). - Richard R. Forberg, Aug 14 2013

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 60 at p. 123.

Crossrefs

Programs

  • Haskell
    a090390 n = a090390_list !! n
    a090390_list = 1 : 1 : 9 : zipWith (-) (map (* 5) $
       tail $ zipWith (+) (tail a090390_list) a090390_list) a090390_list
    -- Reinhard Zumkeller, Aug 17 2013
    
  • Magma
    [Evaluate(DicksonFirst(n,-1),2)^2/4: n in [0..40]]; // G. C. Greubel, Aug 21 2022
    
  • Maple
    a:= n-> (<<1|0|0>>. <<1|2|2>, <2|1|2>, <2|2|3>>^n)[1, 1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 17 2013
  • Mathematica
    CoefficientList[Series[(1-4x-x^2)/((1+x)(1-6x+x^2)),{x, 0, 30}], x] (* Harvey P. Dale, May 20 2012 *)
    LinearRecurrence[{5,5,-1}, {1,1,9}, 30] (* Harvey P. Dale, May 20 2012 *)
    Table[(ChebyshevT[n,3]+(-1)^n)/2, {n,0,30}] (* Eric W. Weisstein, Apr 17 2018 *)
    (LucasL[Range[0, 40], 2]/2)^2 (* G. C. Greubel, Aug 21 2022 *)
  • PARI
    a(n)=polcoeff((1-4*x-x^2)/((1+x)*(1-6*x+x^2))+x*O(x^n),n)
    
  • PARI
    a(n)=if(n<0,0,([1,2,2;2,1,2;2,2,3]^n)[1,1])
    
  • PARI
    Vec( (1-4*x-x^2)/((1+x)*(1-6*x+x^2)) + O(x^66) ) \\ Joerg Arndt, Aug 16 2013
    
  • Perl
    use Math::Matrix; use Math::BigInt; $a = new Math::Matrix ([ 1, 2, 2], [ 2, 1, 2], [ 2, 2, 3]); $p = new Math::Matrix ([1, 0, 0]); $p->print(); for ($i=1; $i<20;$i++) { $p = $p->multiply($a); $p->print(); }
    
  • SageMath
    [lucas_number2(n,2,-1)^2/4 for n in (0..40)] # G. C. Greubel, Aug 21 2022

Formula

G.f.: (1-4*x-x^2)/((1+x)*(1-6*x+x^2)).
a(n) = A001333(n)^2
(a, b, c) = (1, 0, 0). Recursively multiply (a, b, c)*( [1, 2, 2], [2, 1, 2], [2, 2, 3] ).
M^n * [ 1 1 1] = [a(n+1) q a(n)], where M = the 3 X 3 matrix [4 4 1 / 2 1 0 / 1 0 0]. E.g. M^5 * [1 1 1] = [9801 4059 1681] where 9801 = a(6), 1681 = a(5). Similarly, M^n * [1 0 0] generates A079291 (Pell number squares). - Gary W. Adamson, Oct 31 2004
a(n) = (((1+sqrt(2))^(2*n) + (1-sqrt(2))^(2*n)) + 2*(-1)^n)/4 - Lambert Klasen (lambert.klasen(AT)gmx.net), Oct 09 2005
a(n) = (A001541(n) + (-1)^n)/2. - R. J. Mathar, Nov 20 2009
a(n) = 5*a(n-1) + 5*a(n-2) - a(n-3), with a(0)=1, a(1)=1, a(2)=9. - Harvey P. Dale, May 20 2012
(a(n)) = tesseq(- .5'j + .5'k - .5j' + .5k' - 2'ii' + 'jj' - 'kk' + .5'ij' + .5'ik' + .5'ji' + 'jk' + .5'ki' + 'kj' + e), apart from initial term. - Creighton Dement, Nov 16 2004
a(n) = A302946(n)/4. - Eric W. Weisstein, Apr 17 2018
E.g.f.: exp(-x)*(1 + exp(4*x)*cosh(2*sqrt(2)*x))/2. - Stefano Spezia, Aug 03 2024

A015537 Expansion of x/(1 - 5*x - 4*x^2).

Original entry on oeis.org

0, 1, 5, 29, 165, 941, 5365, 30589, 174405, 994381, 5669525, 32325149, 184303845, 1050819821, 5991314485, 34159851709, 194764516485, 1110461989261, 6331368012245, 36098688018269, 205818912140325, 1173489312774701, 6690722212434805
Offset: 0

Views

Author

Keywords

Comments

First differences give A122690(n) = {1, 4, 24, 136, 776, 4424, 25224, ...}. Partial sums of a(n) are {0, 1, 6, 35, 200, ...} = (A123270(n) - 1)/8. - Alexander Adamchuk, Nov 03 2006
For n >= 2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 5's along the main diagonal, and 2's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 19 2011
Pisano period lengths: 1, 1, 8, 1, 4, 8, 48, 1, 24, 4, 40, 8, 42, 48, 8, 2, 72, 24, 360, 4, ... - R. J. Mathar, Aug 10 2012

Crossrefs

Programs

  • GAP
    a:=[0,1];; for n in [3..30] do a[n]:=5*a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, Dec 26 2019
  • Magma
    [n le 2 select n-1 else 5*Self(n-1)+4*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 12 2012
    
  • Maple
    seq( simplify((2/I)^(n-1)*ChebyshevU(n-1, 5*I/4)), n=0..20); # G. C. Greubel, Dec 26 2019
  • Mathematica
    LinearRecurrence[{5,4}, {0,1}, 30] (* Vincenzo Librandi, Nov 12 2012 *)
    Table[2^(n-1)*Fibonacci[n, 5/2], {n, 0, 30}] (* G. C. Greubel, Dec 26 2019 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(x/(1-5*x-4*x^2))) \\ G. C. Greubel, Jan 01 2018
    
  • Sage
    [lucas_number1(n,5,-4) for n in range(0, 22)] # Zerinvary Lajos, Apr 24 2009
    

Formula

a(n) = 5*a(n-1) + 4*a(n-2).
a(n) = Sum_{k=0..floor((n-1)/2)} C(n-k-1, k)*4^k*5^(n-2*k-1). - Paul Barry, Apr 23 2005
a(n) = Sum_{k=0..(n-1)} A122690(k). - Alexander Adamchuk, Nov 03 2006
a(n) = 2^(n-1)*Fibonacci(n, 5/2) = (2/i)^(n-1)*ChebyshevU(n-1, 5*i/4). - G. C. Greubel, Dec 26 2019

A052961 Expansion of (1 - 3*x) / (1 - 5*x + 3*x^2).

Original entry on oeis.org

1, 2, 7, 29, 124, 533, 2293, 9866, 42451, 182657, 785932, 3381689, 14550649, 62608178, 269388943, 1159120181, 4987434076, 21459809837, 92336746957, 397304305274, 1709511285499, 7355643511673, 31649683701868, 136181487974321, 585958388766001, 2521247479907042
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

a(n) is the number of tilings of a 2 X n rectangle using integer dimension tiles at least one of whose dimensions is 1, so allowable dimensions are 1 X 1, 1 X 2, 1 X 3, 1 X 4, ..., and 2 X 1. - David Callan, Aug 27 2014
a(n+1) counts closed walks on K_2 containing one loop on the index vertex and four loops on the other vertex. Equivalently the (1,1)entry of A^(n+1) where the adjacency matrix of digraph is A=(1,1;1,4). - _David Neil McGrath, Nov 05 2014
A production matrix for the sequence is M =
1, 1, 0, 0, 0, 0, 0, ...
1, 0, 4, 0, 0, 0, 0, ...
1, 0, 0, 4, 0, 0, 0, ...
1, 0, 0, 0, 4, 0, 0, ...
1, 0, 0, 0, 0, 4, 0, ...
1, 0, 0, 0, 0, 0, 4, ...
...
Take powers of M and extract the upper left term, getting the sequence starting (1, 1, 2, 7, 29, 124, ...). - Gary W. Adamson, Jul 22 2016
From Gary W. Adamson, Jul 29 2016: (Start)
The sequence is N=1 in an infinite set obtained from matrix powers of [(1,N); (1,4)], extracting the upper left terms.
The infinite set begins:
N=1 (A052961): 1, 2, 7, 29 124, 533, 2293, ...
N=2 (A052984): 1, 3, 13, 59, 269, 1227, 5597, ...
N=3 (A004253): 1, 4, 19, 91, 436, 2089, 10009, ...
N=4 (A000351): 1, 5, 25, 125, 625, 3125, 15625, ...
N=5 (A015449): 1, 6, 31, 161, 836, 4341, 22541, ...
N=6 (A124610): 1, 7, 37, 199, 1069, 5743, 30853, ...
N=7 (A111363): 1, 8, 43, 239, 1324, 7337, 40653, ...
N=8 (A123270): 1, 9, 49, 281, 1601, 9129, 52049, ...
N=9 (A188168): 1, 10, 55, 325, 1900, 11125, 65125, ...
N=10 (A092164): 1, 11, 61, 371, 2221, 13331, 79981, ...
... (End)

Crossrefs

Programs

  • GAP
    a:=[1,2];; for n in [3..30] do a[n]:=5*a[n-1]-3*a[n-2]; od; a; # G. C. Greubel, Oct 23 2019
  • Magma
    I:=[1,2]; [n le 2 select I[n] else 5*Self(n-1)-3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 17 2014
    
  • Maple
    spec:= [S,{S = Sequence(Union(Prod(Sequence(Union(Z,Z,Z)),Z),Z))}, unlabeled ]: seq(combstruct[count ](spec,size = n), n = 0..20);
    seq(coeff(series((1-3*x)/(1-5*x+3*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 23 2019
  • Mathematica
    CoefficientList[Series[(1-3x)/(1-5x+3x^2),{x,0,30}],x] (* or *) LinearRecurrence[{5,-3},{1,2},30] (* Harvey P. Dale, Nov 23 2013 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-3*x)/(1-5*x+3*x^2)) \\ G. C. Greubel, Oct 23 2019
    
  • Sage
    def A052961_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((1-3*x)/(1-5*x+3*x^2)).list()
    A052961_list(30) # G. C. Greubel, Oct 23 2019
    

Formula

G.f.: (1-3*x)/(1-5*x+3*x^2).
a(n) = 5*a(n-1) - 3*a(n-2), with a(0) = 1, a(1) = 2.
a(n) = Sum_{alpha=RootOf(1-5*z+3*z^2)} (-1 + 9*alpha)*alpha^(-1-n)/13.
E.g.f.: (1 + sqrt(13) + (sqrt(13)-1) * exp(sqrt(13)*x)) / (2*sqrt(13) * exp(((sqrt(13)-5)*x)/2)). - Vaclav Kotesovec, Feb 16 2015
a(n) = A116415(n) - 3*A116415(n-1). - R. J. Mathar, Feb 27 2019

A095344 Length of n-th string generated by a Kolakoski(9,1) rule starting with a(1)=1.

Original entry on oeis.org

1, 1, 9, 9, 49, 81, 281, 601, 1729, 4129, 11049, 27561, 71761, 182001, 469049, 1197049, 3073249, 7861441, 20154441, 51600201, 132217969, 338618769, 867490649, 2221965721, 5691928321, 14579791201, 37347504489, 95666669289, 245056687249, 627723364401
Offset: 1

Views

Author

Benoit Cloitre, Jun 03 2004

Keywords

Comments

Each string is derived from the previous string using the Kolakoski(9,1) rule and the additional condition: "string begins with 1 if previous string ends with 9 and vice versa". The strings are 1 -> 9 -> 111111111 -> 919191919 -> 11111111191111111119... -> ... and each one contains 1,1,9,9,31,... elements.

Crossrefs

Programs

  • GAP
    a:=[1,1,9];; for n in [4..35] do a[n]:=5*a[n-2]+4*a[n-3]; od; a; # G. C. Greubel, Dec 26 2019
  • Haskell
    a095344 n = a095344_list !! (n-1)
    a095344_list = tail xs where
       xs = 1 : 1 : 1 : zipWith (-) (map (* 5) $ zipWith (+) (tail xs) xs) xs
    -- Reinhard Zumkeller, Aug 16 2013
    
  • Magma
    R:=PowerSeriesRing(Integers(), 35); Coefficients(R!( x*(1+x+ 4*x^2)/((1+x)*(1-x-4*x^2)) )); // G. C. Greubel, Dec 26 2019
    
  • Maple
    seq(simplify(2*(-1)^n -(2/I)^n*(ChebyshevU(n, I/4) -2*I*ChebyshevU(n-1, I/4)) ), n = 1..35); # G. C. Greubel, Dec 26 2019
  • Mathematica
    Table[2*(-1)^n - 2^n*(Fibonacci[n+1, 1/2] - 2*Fibonacci[n, 1/2]), {n,35}] (* G. C. Greubel, Dec 26 2019 *)
    LinearRecurrence[{0,5,4},{1,1,9},40] (* Harvey P. Dale, Oct 12 2022 *)
  • PARI
    Vec(x*(1+x+4*x^2)/((1+x)*(1-x-4*x^2)) + O(x^50)) \\ Colin Barker, Apr 20 2016
    
  • PARI
    vector(35, n, round( 2*(-1)^n - (2/I)^n*(polchebyshev(n, 2, I/4) -2*I*polchebyshev(n-1, 2, I/4)) )) \\ G. C. Greubel, Dec 26 2019
    
  • Sage
    def A095344_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+x+4*x^2)/((1+x)*(1-x-4*x^2)) ).list()
    a=A095344_list(35); a[1:] # G. C. Greubel, Dec 26 2019
    

Formula

a(1) = a(2) = 1; for n>1, a(n) = a(n-1) + 4*a(n-2) - 4*(-1)^n.
G.f.: x*(1 + x + 4*x^2)/((1 + x)*(1 - x - 4*x^2)). - Colin Barker, Mar 25 2012
a(n) = 5*a(n-2) + 4*a(n-3). - Colin Barker, Mar 25 2012
a(n) = 2*(-1)^n + (2^(-1-n)*(-(-7+sqrt(17))*(1+sqrt(17))^n - (1-sqrt(17))^n*(7+sqrt(17))))/sqrt(17). - Colin Barker, Apr 20 2016
a(n) = 2*(-1)^n - 2^n*(Fibonacci(n+1, 1/2) - 2*Fibonacci(n, 1/2)) = 2*(-1)^n - (2/I)^n*(ChebyshevU(n, I/4) - 2*I*ChebyshevU(n-1, I/4)). - G. C. Greubel, Dec 26 2019

A188168 a(0) = a(1) = 1; a(n) = 5*a(n-1) + 5*a(n-2).

Original entry on oeis.org

1, 1, 10, 55, 325, 1900, 11125, 65125, 381250, 2231875, 13065625, 76487500, 447765625, 2621265625, 15345156250, 89832109375, 525886328125, 3078592187500, 18022392578125, 105504923828125, 617636582031250, 3615707529296875, 21166720556640625
Offset: 0

Views

Author

Harvey P. Dale, Mar 23 2011

Keywords

Comments

First differences give {0,9,45,270,1575,9225,54000,316125,1850625,10833750,63421875,371278125, . . .}

Crossrefs

Cf. A123270.

Programs

  • Mathematica
    Transpose[NestList[Flatten[{Rest[#],ListCorrelate[{5,5},#]}]&, {1,1},40]][[1]]
    LinearRecurrence[{5,5},{1,1},30] (* Harvey P. Dale, Nov 19 2024 *)

Formula

G.f.: (4x-1)/(5x^2+5x-1)
a(n) = 1/5 2^-n (-(5-3 Sqrt[5])^n (2+Sqrt[5])+(-2+Sqrt[5]) (5+3 Sqrt[5])^n)
Showing 1-5 of 5 results.