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-10 of 37 results. Next

A127259 Sequence arising from the factorization of F(n)=A002605 and L(n)=A080040 F(0)=0, F(1)=1, F(n)=2*F(n-1)+2*F(n-2), L(0)=2, L(1)=2, L(n)=2*L(n-1)+2*L(n-2).

Original entry on oeis.org

2, 1, 10, 8, 76, 6, 568, 56, 424, 44, 31648, 52, 236224, 328, 2320, 3104, 13160704, 408, 98232832, 2896, 129088, 18272, 5472827392, 3088, 537496576, 136384, 71911936, 161344, 2275853910016, 3856, 16987204845568
Offset: 1

Views

Author

Miklos Kristof, Mar 26 2007

Keywords

Examples

			F(12)=a(1)*a(2)*a(3)*a(4)*a(6)*a(12)=2*1*10*8*6*52=49920
F(9)=a(2)*a(6)*a(18)= 1*6*408=2448
L(12)=a(8)*a(24)=56*3088=172928
L(21)=a(1)*a(3)*a(7)*a(21)=2*10*568*129088=1466439680
		

Crossrefs

Programs

  • Maple
    with(numtheory): a[1]:=2:a[2]:=1:for n from 3 to 60 do a[n]:=round(evalf((sqrt(3)-1)^degree(cyclotomic(n,x),x)*cyclotomic(n,2+sqrt(3)),30)) od: seq(a[n],n=1..60);

Formula

(sqrt(3)-1)^degree(cyclotomic(n,x),x)*cyclotomic(n,2+sqrt(3)) L(n)=2*F(n-1)+F(n+1) F(2n)=Product(d|2n) a(d), F(2n+1)=Product(d|2n+1) a(2d). L(2n+1)=Product(d|2n+1, a(d)), for k>0: L(2^k*(2n+1))=Product(d|2n+1, a(2^(k+1)*d)). for odd prime p, a(p)=L(p)/2, a(2p)=f(p) a(1)=2, a(2)=1; a(2^(k+1))=L(2^k);

A174510 Continued fraction expansion for exp( Sum_{n>=1} 1/(n*A080040(n)) ), where A080040(n) = (1+sqrt(3))^n + (1-sqrt(3))^n.

Original entry on oeis.org

1, 1, 3, 1, 9, 13, 1, 37, 51, 1, 141, 193, 1, 529, 723, 1, 1977, 2701, 1, 7381, 10083, 1, 27549, 37633, 1, 102817, 140451, 1, 383721, 524173, 1, 1432069, 1956243, 1, 5344557, 7300801, 1, 19946161, 27246963, 1, 74440089, 101687053, 1, 277814197
Offset: 0

Views

Author

Paul D. Hanna, Mar 21 2010

Keywords

Examples

			Let L = Sum_{n>=1} 1/(n*A080040(n)) or, more explicitly,
L = 1/2 + 1/(2*8) + 1/(3*20) + 1/(4*56) + 1/(5*152) + 1/(6*416) +...
so that L = 0.5855329921665857283309456463364081071245363598803...
then exp(L) = 1.7959479567807442397990076546690432122217738278933...
equals the continued fraction given by this sequence:
exp(L) = [1;1,3,1,9,13,1,37,51,1,141,193,1,529,723,1,...]; i.e.,
exp(L) = 1 + 1/(1 + 1/(3 + 1/(1 + 1/(9 + 1/(13 + 1/(1 +...)))))).
Compare these partial quotients to A080040(n)/2^[n/2], n=1,2,3,...:
[2,4,10,14,38,52,142,194,530,724,1978,2702,7382,10084,27550,...],
where A080040 begins:
[2,8,20,56,152,416,1136,3104,8480,23168,63296,172928,472448,...].
		

Crossrefs

Programs

  • PARI
    {a(n)=local(L=sum(m=1,2*n+1000,1./(m*round((1+sqrt(3))^m+(1-sqrt(3))^m))));contfrac(exp(L))[n]}

Formula

a(3n-3) = 1, a(3n-2) = A080040(2n-1)/2^(n-1) - 1, a(3n-1) = A080040(2n)/2^n - 1, for n>=1 [conjecture].
a(n) = 5*a(n-3)-5*a(n-6)+a(n-9). G.f.: -(x^2-x+1)*(x^6-2*x^5-2*x^4-2*x^3+4*x^2+2*x+1) / ((x-1)*(x^2+x+1)*(x^6-4*x^3+1)). [Colin Barker, Jan 20 2013]

A002605 a(n) = 2*(a(n-1) + a(n-2)), a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, 6, 16, 44, 120, 328, 896, 2448, 6688, 18272, 49920, 136384, 372608, 1017984, 2781184, 7598336, 20759040, 56714752, 154947584, 423324672, 1156544512, 3159738368, 8632565760, 23584608256, 64434348032, 176037912576, 480944521216, 1313964867584
Offset: 0

Views

Author

Keywords

Comments

Individually, both this sequence and A028859 are convergents to 1 + sqrt(3). Mutually, both sequences are convergents to 2 + sqrt(3) and 1 + sqrt(3)/2. - Klaus E. Kastberg (kastberg(AT)hotkey.net.au), Nov 04 2001
The number of (s(0), s(1), ..., s(n+1)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| <= 1 for i = 1, 2, ..., n + 1, s(0) = 2, s(n+1) = 3. - Herbert Kociemba, Jun 02 2004
The same sequence may be obtained by the following process. Starting a priori with the fraction 1/1, the denominators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 4 times the bottom to get the new top. The limit of the sequence of fractions is sqrt(4). - Cino Hilliard, Sep 25 2005
The Hankel transform of this sequence is [1, 2, 0, 0, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Nov 21 2007
[1, 3; 1, 1]^n *[1, 0] = [A026150(n), a(n)]. - Gary W. Adamson, Mar 21 2008
(1 + sqrt(3))^n = A026150(n) + a(n)*sqrt(3). - Gary W. Adamson, Mar 21 2008
a(n+1) is the number of ways to tile a board of length n using red and blue tiles of length one and two. - Geoffrey Critzer, Feb 07 2009
Starting with offset 1 = INVERT transform of the Jacobsthal sequence, A001045: (1, 1, 3, 5, 11, 21, ...). - Gary W. Adamson, May 12 2009
Starting with "1" = INVERTi transform of A007482: (1, 3, 11, 39, 139, ...). - Gary W. Adamson, Aug 06 2010
An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 85, 277, 337 and 340, lead to this sequence (without the leading 0). For the central square these vectors lead to the companion sequence A026150, without the first leading 1. - Johannes W. Meijer, Aug 15 2010
The sequence 0, 1, -2, 6, -16, 44, -120, 328, -896, ... (with alternating signs) is the Lucas U(-2,-2)-sequence. - R. J. Mathar, Jan 08 2013
a(n+1) counts n-walks (closed) on the graph G(1-vertex;1-loop,1-loop,2-loop,2-loop). - David Neil McGrath, Dec 11 2014
Number of binary strings of length 2*n - 2 in the regular language (00+11+0101+1010)*. - Jeffrey Shallit, Dec 14 2015
For n >= 1, a(n) equals the number of words of length n - 1 over {0, 1, 2, 3} in which 0 and 1 avoid runs of odd lengths. - Milan Janjic, Dec 17 2015
a(n+1) is the number of compositions of n into parts 1 and 2, both of two kinds. - Gregory L. Simay, Sep 20 2017
Number of associative, quasitrivial, and order-preserving binary operations on the n-element set {1, ..., n} that have neutral elements. - J. Devillet, Sep 28 2017
(1 + sqrt(3))^n = A026150(n) + a(n)*sqrt(3), for n >= 0; integers in the real quadratic number field Q(sqrt(3)). - Wolfdieter Lang, Feb 10 2018
Starting with 1, 2, 6, 16, ..., number of permutations of length n>0 avoiding the partially ordered pattern (POP) {1>3, 1>4} of length 4. That is, number of length n permutations having no subsequences of length 4 in which the first element is larger than the third and fourth elements. - Sergey Kitaev, Dec 09 2020
a(n) is the number of tilings of a 2 X n board missing one corner cell, with 1 X 1 and L-shaped tiles (where the L-shaped tiles cover 3 squares). Compare to A127864. - Greg Dresden and Yilin Zhu, Jul 17 2025

References

  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, p. 16.

Crossrefs

First differences are given by A026150.
a(n) = A073387(n, 0), n>=0 (first column of triangle).
Equals (1/3) A083337. First differences of A077846. Pairwise sums of A028860 and abs(A077917).
a(n) = A028860(n)/2 apart from the initial terms.
Row sums of A081577 and row sums of triangle A156710.
The following sequences (and others) belong to the same family: A001333, A000129, A026150, A046717, A015518, A084057, A063727, A002533, A002532, A083098, A083099, A083100, A015519.
Cf. A175289 (Pisano periods).
Cf. A002530.
Cf. A127864.

Programs

  • Haskell
    a002605 n = a002605_list !! n
    a002605_list =
       0 : 1 : map (* 2) (zipWith (+) a002605_list (tail a002605_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    [Floor(((1 + Sqrt(3))^n - (1 - Sqrt(3))^n)/(2*Sqrt(3))): n in [0..30]]; // Vincenzo Librandi, Aug 18 2011
    
  • Magma
    [n le 2 select n-1 else 2*Self(n-1) + 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 07 2018
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=2*a[n-1]+2*a[n-2]od: seq(a[n], n=0..33); # Zerinvary Lajos, Dec 15 2008
    a := n -> `if`(n<3, n, 2^(n-1)*hypergeom([1-n/2, (1-n)/2], [1-n], -2));
    seq(simplify(a(n)), n=0..29); # Peter Luschny, Dec 16 2015
  • Mathematica
    Expand[Table[((1 + Sqrt[3])^n - (1 - Sqrt[3])^n)/(2Sqrt[3]), {n, 0, 30}]] (* Artur Jasinski, Dec 10 2006 *)
    a[n_]:=(MatrixPower[{{1,3},{1,1}},n].{{1},{1}})[[2,1]]; Table[a[n],{n,-1,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *)
    LinearRecurrence[{2, 2}, {0, 1}, 30] (* Robert G. Wilson v, Apr 13 2013 *)
    Round@Table[Fibonacci[n, Sqrt[2]] 2^((n - 1)/2), {n, 0, 20}] (* Vladimir Reshetnikov, Oct 15 2016 *)
    nxt[{a_,b_}]:={b,2(a+b)}; NestList[nxt,{0,1},30][[All,1]] (* Harvey P. Dale, Sep 17 2022 *)
  • PARI
    Vec(x/(1-2*x-2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Jun 10 2011
    
  • PARI
    A002605(n)=([2,2;1,0]^n)[2,1] \\ M. F. Hasler, Aug 06 2018
    
  • Sage
    [lucas_number1(n,2,-2) for n in range(0, 30)] # Zerinvary Lajos, Apr 22 2009
    
  • Sage
    a = BinaryRecurrenceSequence(2,2)
    print([a(n) for n in (0..29)])  # Peter Luschny, Aug 29 2016
    

Formula

a(n) = (-I*sqrt(2))^(n-1)*U(n-1, I/sqrt(2)) where U(n, x) is the Chebyshev U-polynomial. - Wolfdieter Lang
G.f.: x/(1 - 2*x - 2*x^2).
From Paul Barry, Sep 17 2003: (Start)
E.g.f.: x*exp(x)*(sinh(sqrt(3)*x)/sqrt(3) + cosh(sqrt(3)*x)).
a(n) = (1 + sqrt(3))^(n-1)*(1/2 + sqrt(3)/6) + (1 - sqrt(3))^(n-1)*(1/2 - sqrt(3)/6), for n>0.
Binomial transform of 1, 1, 3, 3, 9, 9, ... Binomial transform is A079935. (End)
a(n) = Sum_{k=0..floor(n/2)} binomial(n - k, k)*2^(n - k). - Paul Barry, Jul 13 2004
a(n) = A080040(n) - A028860(n+1). - Creighton Dement, Jan 19 2005
a(n) = Sum_{k=0..n} A112899(n,k). - Philippe Deléham, Nov 21 2007
a(n) = Sum_{k=0..n} A063967(n,k). - Philippe Deléham, Nov 03 2006
a(n) = ((1 + sqrt(3))^n - (1 - sqrt(3))^n)/(2*sqrt(3)).
a(n) = Sum_{k=0..n} binomial(n, 2*k + 1) * 3^k.
Binomial transform of expansion of sinh(sqrt(3)x)/sqrt(3) (0, 1, 0, 3, 0, 9, ...). E.g.f.: exp(x)*sinh(sqrt(3)*x)/sqrt(3). - Paul Barry, May 09 2003
a(n) = (1/3)*Sum_{k=1..5} sin(Pi*k/2)*sin(2*Pi*k/3)*(1 + 2*cos(Pi*k/6))^n, n >= 1. - Herbert Kociemba, Jun 02 2004
a(n+1) = ((3 + sqrt(3))*(1 + sqrt(3))^n + (3 - sqrt(3))*(1 - sqrt(3))^n)/6. - Al Hakanson (hawkuu(AT)gmail.com), Jun 29 2009
Antidiagonals sums of A081577. - J. M. Bergot, Dec 15 2012
G.f.: Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(4*k + 2 + 2*x)/(x*(4*k + 4 + 2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 30 2013
a(n) = 2^(n - 1)*hypergeom([1 - n/2, (1 - n)/2], [1 - n], -2) for n >= 3. - Peter Luschny, Dec 16 2015
Sum_{k=0..n} a(k)*2^(n-k) = a(n+2)/2 - 2^n. - Greg Dresden, Feb 11 2022
a(n) = 2^floor(n/2) * A002530(n). - Gregory L. Simay, Sep 22 2022
From Peter Bala, May 08 2024: (Start)
G.f.: x/(1 - 2*x - 2*x^2) = Sum_{n >= 0} x^(n+1) *( Product_{k = 1..n} (k + 2*x + 1)/(1 + k*x) )
Also x/(1 - 2*x - 2*x^2) = Sum_{n >= 0} (2*x)^n *( x*Product_{k = 1..n} (m*k + 2 - m + x)/(1 + 2*m*k*x) ) for arbitrary m (both series are telescoping). (End)
a(n) = A127864(n-1) + A127864(n-2). - Greg Dresden and Yilin Zhu, Jul 17 2025

Extensions

Edited by N. J. A. Sloane, Apr 15 2009

A026150 a(0) = a(1) = 1; a(n+2) = 2*a(n+1) + 2*a(n).

Original entry on oeis.org

1, 1, 4, 10, 28, 76, 208, 568, 1552, 4240, 11584, 31648, 86464, 236224, 645376, 1763200, 4817152, 13160704, 35955712, 98232832, 268377088, 733219840, 2003193856, 5472827392, 14952042496, 40849739776
Offset: 0

Views

Author

Keywords

Comments

a(n+1)/A002605(n) converges to sqrt(3). - Mario Catalani (mario.catalani(AT)unito.it), Apr 22 2003
a(n+1)/a(n) converges to 1 + sqrt(3) = 2.732050807568877293.... - Philippe Deléham, Jul 03 2005
Binomial transform of expansion of cosh(sqrt(3)x) (A000244 with interpolated zeros); inverse binomial transform of A001075. - Philippe Deléham, Jul 04 2005
The same sequence may be obtained by the following process. Starting a priori with the fraction 1/1, the numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 3 times the bottom to get the new top. The limit of the sequence of fractions is sqrt(3). - Cino Hilliard, Sep 25 2005
Inverse binomial transform of A001075: (1, 2, 7, 26, 97, 362, ...). - Gary W. Adamson, Nov 23 2007
Starting (1, 4, 10, 28, 76, ...), the sequence is the binomial transform of [1, 3, 3, 9, 9, 27, 27, 81, 81, ...], and inverse binomial transform of A001834: (1, 5, 19, 71, 265, ...). - Gary W. Adamson, Nov 30 2007
[1, 3; 1, 1]^n * [1,0] = [a(n), A002605(n)]. - Gary W. Adamson, Mar 21 2008
(1 + sqrt(3))^n = a(n) + A002605(n)*(sqrt(3)). - Gary W. Adamson, Mar 21 2008
Equals right border of triangle A143908. Also, starting (1, 4, 10, 28, ...) = row sums of triangle A143908 and INVERT transform of (1, 3, 3, 3, ...). - Gary W. Adamson, Sep 06 2008
a(n) is the number of compositions of n when there are 1 type of 1 and 3 types of other natural numbers. - Milan Janjic, Aug 13 2010
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 85, 277, 337 and 340, lead to this sequence (without the first leading 1). For the corner squares these vectors lead to the companion sequence A002605 (without the leading 0). - Johannes W. Meijer, Aug 15 2010
Pisano period lengths: 1, 1, 1, 1, 24, 1, 48, 1, 3, 24, 10, 1, 12, 48, 24, 1,144, 3,180, 24, ... - R. J. Mathar, Aug 10 2012
(1 + sqrt(3))^n = a(n) + A002605(n)*sqrt(3), for n >= 0; integers in the real quadratic number field Q(sqrt(3)). - Wolfdieter Lang, Feb 10 2018
a(n) is also the number of solutions for cyclic three-dimensional stable matching instances with master preference lists of size n (Escamocher and O'Sullivan 2018). - Guillaume Escamocher, Jun 15 2018
Starting from a(1), first differences of A005665. - Ivan N. Ianakiev, Nov 22 2019
Number of 3-permutations of n elements avoiding the patterns 231, 312. See Bonichon and Sun. - Michel Marcus, Aug 19 2022

Examples

			G.f. = 1 + x + 4*x^2 + 10*x^3 + 28*x^4 + 76*x^5 + 208*x^6 + 568*x^7 + ...
		

References

  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, see p. 16.

Crossrefs

First differences of A002605.
The following sequences (and others) belong to the same family: A001333, A000129, A026150, A002605, A046717, A015518, A084057, A063727, A002533, A002532, A083098, A083099, A083100, A015519.

Programs

  • Haskell
    a026150 n = a026150_list !! n
    a026150_list = 1 : 1 : map (* 2) (zipWith (+) a026150_list (tail
    a026150_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    [n le 2 select 1 else 2*Self(n-1) + 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 07 2018
  • Maple
    with(combstruct):ZL0:=S=Prod(Sequence(Prod(a, Sequence(b))), a):ZL1:=Prod(begin_blockP, Z, end_blockP):ZL2:=Prod(begin_blockLR, Z, Sequence(Prod(mu_length, Z), card>=1), end_blockLR): ZL3:=Prod(begin_blockRL, Sequence(Prod(mu_length, Z), card>=1), Z, end_blockRL):Q:=subs([a=Union(ZL2,ZL2,ZL2), b=ZL1], ZL0), begin_blockP=Epsilon, end_blockP=Epsilon, begin_blockLR=Epsilon, end_blockLR=Epsilon, begin_blockRL=Epsilon, end_blockRL=Epsilon, mu_length=Epsilon:temp15:=draw([S, {Q}, unlabelled], size=15):seq(count([S, {Q}, unlabelled], size=n)/3, n=2..27); # Zerinvary Lajos, Mar 08 2008
  • Mathematica
    Expand[Table[((1 + Sqrt[3])^n + (1 - Sqrt[3])^n)/(2), {n, 0, 30}]] (* Artur Jasinski, Dec 10 2006 *)
    LinearRecurrence[{2, 2}, {1, 1}, 30] (* T. D. Noe, Mar 25 2011 *)
    Round@Table[LucasL[n, Sqrt[2]] 2^(n/2 - 1), {n, 0, 20}] (* Vladimir Reshetnikov, Oct 15 2016 *)
  • Maxima
    a(n) := if n<=1 then 1 else 2*a(n-1)+2*a(n-2);
    makelist(a(n),n,0,20); /* Emanuele Munarini, Apr 14 2017 */
    
  • PARI
    {a(n) = if( n<0, 0, real((1 + quadgen(12))^n))};
    
  • Sage
    from sage.combinat.sloane_functions import recur_gen2; it = recur_gen2(1,1,2,2); [next(it) for i in range(30)] # Zerinvary Lajos, Jun 25 2008
    
  • Sage
    [lucas_number2(n,2,-2)/2 for n in range(0, 26)] # Zerinvary Lajos, Apr 30 2009
    

Formula

a(n) = (1/2)*((1 + sqrt(3))^n + (1 - sqrt(3))^n). - Benoit Cloitre, Oct 28 2002
G.f.: (1 - x)/(1 - 2*x - 2*x^2).
a(n) = a(n-1) + A083337(n-1). A083337(n)/a(n) converges to sqrt(3). - Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003
From Paul Barry, May 15 2003: (Start)
a(n) = Sum_{k=0..floor(n/2)} C(n, 2k)*3^k;
E.g.f.: exp(x)*cosh(sqrt(3)x). (End)
a(n) = Sum_{k=0..n} A098158(n,k)*3^(n - k). - Philippe Deléham, Dec 26 2007
a(n) = upper left and lower right terms of [1, 1; 3, 1]^n. (1 + sqrt(3))^n = a(n) + A083337(n)/(sqrt(3)). - Gary W. Adamson, Mar 12 2008
a(n) = A080040(n)/2. - Philippe Deléham, Nov 19 2008
If p[1] = 1, and p[i] = 3, (i > 1), and if A is Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i <= j), A[i,j] = -1, (i = j + 1), and A[i,j] = 0 otherwise. Then, for n >= 1, a(n) = det A. - Milan Janjic, Apr 29 2010
a(n) = 2 * A052945(n-1). - Vladimir Joseph Stephan Orlovsky, Mar 24 2011
a(n) = round((1 + sqrt(3))^n/2) for n > 0. - Bruno Berselli, Feb 04 2013
G.f.: G(0)/2, where G(k)= 1 + 1/(1 - x*(3*k - 1)/(x*(3*k + 2) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 25 2013
a(n) = (-sqrt(2)*i)^n*T(n,sqrt(2)*i/2), with i = sqrt(-1) and the Chebyshev T-polynomials (A053120). - Wolfdieter Lang, Feb 10 2018

A030195 a(n) = 3*a(n-1) + 3*a(n-2), a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 3, 12, 45, 171, 648, 2457, 9315, 35316, 133893, 507627, 1924560, 7296561, 27663363, 104879772, 397629405, 1507527531, 5715470808, 21668995017, 82153397475, 311467177476, 1180861724853, 4476986706987, 16973545295520
Offset: 0

Views

Author

Keywords

Comments

Scaled Chebyshev U-polynomials evaluated at I*sqrt(3)/2.
Number of zeros in the substitution system {0 -> 1111100, 1 -> 10} at step n from initial string "1" (1 -> 10 -> 101111100 -> ...). - Ilya Gutkovskiy, Apr 10 2017
a(n+1) is the number of compositions of n having parts 1 and 2, both of three kinds. - Gregory L. Simay, Sep 21 2017
More generally, define a(n) = k*a(n-1) + k*a(n-2), a(0) = 0 and a(1) = 1. Then g.f. a(n) = 1/(1 - k*x - k*x^2) and a(n+1) is the number of compositions of n having parts 1 and 2, both of k kinds. - Gregory L. Simay, Sep 22 2017

Examples

			G.f. = x + 3*x^2 + 12*x^3 + 45*x^4 + 171*x^5 + 648*x^6 + 2457*x^7 + ...
		

Crossrefs

Programs

  • Haskell
    a030195 n = a030195_list !! n
    a030195_list =
       0 : 1 : map (* 3) (zipWith (+) a030195_list (tail a030195_list))
    -- Reinhard Zumkeller, Oct 14 2011
    
  • Magma
    I:=[0,1]; [n le 2 select I[n] else 3*Self(n-1) + 3*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 24 2018
  • Mathematica
    CoefficientList[Series[1/(1-3x-3x^2), {x, 0, 25}], x] (* Zerinvary Lajos, Mar 22 2007 *)
    LinearRecurrence[{3, 3}, {0, 1}, 24] (* Or *)
    RecurrenceTable[{a[n] == 3 a[n - 1] + 3 a[n - 2], a[0] == 0, a[1] == 1}, a, {n, 0, 23}] (* Robert G. Wilson v, Aug 18 2012 *)
  • PARI
    {a(n) = n--; polchebyshev(n, 2, I*sqrt(3)/2) * (-I*sqrt(3))^n};
    
  • Sage
    [lucas_number1(n,3,-3) for n in range(0, 25)] # Zerinvary Lajos, Apr 22 2009
    

Formula

a(n+1) = (-I*sqrt(3))^n*U(n, I*sqrt(3)/2).
G.f.: x / (1 - 3*x - 3*x^2).
a(n+1) = Sum_{k=0..floor(n/2)} 3^(n-k)*binomial(n-k, k). - Emeric Deutsch, Nov 14 2001
a(n) = (p^n - q^n)/sqrt(21); p = (3 + sqrt 21)/2, q = (3 - sqrt 21)/2. - Gary W. Adamson, Jul 02 2003
For n > 0, a(n) = Sum_{k=0..n-1} (2^k)*A063967(n-1,k). - Gerald McGarvey, Jul 23 2006
a(n+1) = Sum_{k=0..n} 2^k*A063967(n,k). - Philippe Deléham, Nov 03 2006

Extensions

Edited by Ralf Stephan, Aug 02 2004
I simplified the definition. As a result the offsets in some of the formulas may need to shifted by 1. - N. J. A. Sloane, Apr 01 2006
Formulas shifted to match offset. - Charles R Greathouse IV, Jan 31 2011

A028859 a(n+2) = 2*a(n+1) + 2*a(n); a(0) = 1, a(1) = 3.

Original entry on oeis.org

1, 3, 8, 22, 60, 164, 448, 1224, 3344, 9136, 24960, 68192, 186304, 508992, 1390592, 3799168, 10379520, 28357376, 77473792, 211662336, 578272256, 1579869184, 4316282880, 11792304128, 32217174016, 88018956288, 240472260608, 656982433792, 1794909388800, 4903783645184, 13397386067968
Offset: 0

Views

Author

Keywords

Comments

Number of words of length n without adjacent 0's from the alphabet {0,1,2}. For example, a(2) counts 01,02,10,11,12,20,21,22. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 12 2001
Individually, both this sequence and A002605 are convergents to 1+sqrt(3). Mutually, both sequences are convergents to 2+sqrt(3) and 1+sqrt(3)/2. - Klaus E. Kastberg (kastberg(AT)hotkey.net.au), Nov 04 2001 [Can someone clarify what is meant by the obscure second phrase, "Mutually..."? - M. F. Hasler, Aug 06 2018]
Add a loop at two vertices of the graph C_3=K_3. a(n) counts walks of length n+1 between these vertices. - Paul Barry, Oct 15 2004
Prefaced with a 1 as (1 + x + 3x^2 + 8x^3 + 22x^4 + ...) = 1 / (1 - x - 2x^2 - 3x^3 - 5x^4 - 8x^5 - 13x^6 - 21x^7 - ...). - Gary W. Adamson, Jul 28 2009
Equals row 2 of the array in A180165, and the INVERTi transform of A125145. - Gary W. Adamson, Aug 14 2010
Pisano period lengths: 1, 1, 3, 1, 24, 3, 48, 1, 9, 24, 10, 3, 12, 48, 24, 1, 144, 9, 180, 24, .... - R. J. Mathar, Aug 10 2012
Also the number of independent vertex sets and vertex covers in the n-centipede graph. - Eric W. Weisstein, Sep 21 2017
From Gus Wiseman, May 19 2020: (Start)
Conjecture: Also the number of length n + 1 sequences that cover an initial interval of positive integers and whose non-adjacent parts are weakly decreasing. For example, (3,2,3,1,2) has non-adjacent pairs (3,3), (3,1), (3,2), (2,1), (2,2), (3,2), all of which are weakly decreasing, so is counted under a(11). The a(1) = 1 through a(3) = 8 sequences are:
(1) (11) (111)
(12) (121)
(21) (211)
(212)
(221)
(231)
(312)
(321)
The case of compositions is A333148, or A333150 for strict compositions, or A333193 for strictly decreasing parts. A version for ordered set partitions is A332872. Standard composition numbers of these compositions are A334966. Unimodal normal sequences are A227038. See also: A001045, A001523, A032020, A100471, A100881, A115981, A329398, A332836, A332872.
(End)
Number of 2-compositions of n+1 restricted to parts 1 and 2 (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020
The number of ternary strings of length n not containing 00. Complement of A186244. - R. J. Mathar, Feb 13 2022

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (see p. 73).

Crossrefs

Cf. A155020 (same sequence with term 1 prepended).
Cf. A002605.

Programs

  • Haskell
    a028859 n = a028859_list !! n
    a028859_list =
       1 : 3 : map (* 2) (zipWith (+) a028859_list (tail a028859_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Maple
    a[0]:=1:a[1]:=3:for n from 2 to 24 do a[n]:=2*a[n-1]+2*a[n-2] od: seq(a[n],n=0..24); # Emeric Deutsch
  • Mathematica
    a[n_]:=(MatrixPower[{{1,3},{1,1}},n].{{2},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    Table[2^(n - 1) Hypergeometric2F1[(1 - n)/2, -n/2, -n, -2], {n, 20}] (* Eric W. Weisstein, Jun 14 2017 *)
    LinearRecurrence[{2, 2}, {1, 3}, 20] (* Eric W. Weisstein, Jun 14 2017 *)
  • PARI
    a(n)=([1,3;1,1]^n*[2;1])[2,1] \\ Charles R Greathouse IV, Mar 27 2012
    
  • PARI
    A028859(n)=([1,1]*[2,2;1,0]^n)[1] \\ M. F. Hasler, Aug 06 2018

Formula

a(n) = a(n-1) + A052945(n) = A002605(n) + A002605(n-1).
G.f.: -(x+1)/(2*x^2+2*x-1).
a(n) = [(1+sqrt(3))^(n+2)-(1-sqrt(3))^(n+2)]/(4*sqrt(3)). - Emeric Deutsch, Feb 01 2005
If p[i]=fibonacci(i+1) and if A is the Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)= det A. - Milan Janjic, May 08 2010
a(n) = 3^n - A186244(n). - Toby Gottfried, Mar 07 2013
E.g.f.: exp(x)*(cosh(sqrt(3)*x) + 2*sinh(sqrt(3)*x)/sqrt(3)). - Stefano Spezia, Mar 02 2024

Extensions

Definition completed by M. F. Hasler, Aug 06 2018

A002531 a(2*n) = a(2*n-1) + a(2*n-2), a(2*n+1) = 2*a(2*n) + a(2*n-1); a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 5, 7, 19, 26, 71, 97, 265, 362, 989, 1351, 3691, 5042, 13775, 18817, 51409, 70226, 191861, 262087, 716035, 978122, 2672279, 3650401, 9973081, 13623482, 37220045, 50843527, 138907099, 189750626, 518408351, 708158977, 1934726305
Offset: 0

Views

Author

Keywords

Comments

Numerators of continued fraction convergents to sqrt(3), for n >= 1.
For the denominators see A002530.
Consider the mapping f(a/b) = (a + 3*b)/(a + b). Taking a = b = 1 to start with and carrying out this mapping repeatedly on each new (reduced) rational number gives the convergents 1/1, 2/1, 5/3, 7/4, 19/11, ... converging to sqrt(3). Sequence contains the numerators. - Amarnath Murthy, Mar 22 2003
In the Murthy comment if we take a = 0, b = 1 then the denominator of the reduced fraction is a(n+1). A083336(n)/a(n+1) converges to sqrt(3). - Mario Catalani (mario.catalani(AT)unito.it), Apr 26 2003
If signs are disregarded, all terms of A002316 appear to be elements of this sequence. - Creighton Dement, Jun 11 2007
2^(-floor(n/2))*(1 + sqrt(3))^n = a(n) + A002530(n)*sqrt(3); integers in the real quadratic number field Q(sqrt(3)). - Wolfdieter Lang, Feb 10 2018
Let T(n) = A000034(n), U(n) = A002530(n), V(n) = a(n), x(n) = U(n)/V(n). Then T(n*m) * U(n+m) = U(n)*V(m) + U(m)*V(n), T(n*m) * V(n+m) = 3*U(n)*U(m) + V(m)*V(n), x(n+m) = (x(n) + x(m))/(1 + 3*x(n)*x(m)). - Michael Somos, Nov 29 2022

Examples

			1 + 1/(1 + 1/(2 + 1/(1 + 1/2))) = 19/11 so a(5) = 19.
Convergents are 1, 2, 5/3, 7/4, 19/11, 26/15, 71/41, 97/56, 265/153, 362/209, 989/571, 1351/780, 3691/2131, ... = A002531/A002530.
G.f. = 1 + x + 2*x^2 + 5*x^3 + 7*x^4 + 19*x^5 + 26*x^6 + 71*x^7 + ... - _Michael Somos_, Mar 22 2022
		

References

  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 181.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. Tarn, Approximations to certain square roots and the series of numbers connected therewith, Mathematical Questions and Solutions from the Educational Times, 1 (1916), 8-12.

Crossrefs

Bisections are A001075 and A001834.
Cf. A002530 (denominators), A048788.
Cf. A002316.

Programs

  • GAP
    a:=[1,1,2,5];; for n in [5..40] do a[n]:=4*a[n-2]-a[n-4]; od; a; # G. C. Greubel, Nov 16 2018
  • Magma
    m:=40; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (1 +x-2*x^2+x^3)/(1-4*x^2+x^4))); // G. C. Greubel, Nov 16 2018
    
  • Maple
    A002531 := proc(n) option remember; if n=0 then 0 elif n=1 then 1 elif n=2 then 1 elif type(n,odd) then A002531(n-1)+A002531(n-2) else 2*A002531(n-1)+A002531(n-2) fi; end; [ seq(A002531(n), n=0..50) ];
    with(numtheory): tp := cfrac (tan(Pi/3),100): seq(nthnumer(tp,i), i=-1..32 ); # Zerinvary Lajos, Feb 07 2007
    A002531:=(1+z-2*z**2+z**3)/(1-4*z**2+z**4); # Simon Plouffe; see his 1992 dissertation
  • Mathematica
    Insert[Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[3], n]]], {n, 1, 40}], 1, 1] (* Stefan Steinerberger, Apr 01 2006 *)
    Join[{1},Numerator[Convergents[Sqrt[3],40]]] (* Harvey P. Dale, Jan 23 2012 *)
    CoefficientList[Series[(1 + x - 2 x^2 + x^3)/(1 - 4 x^2 + x^4), {x, 0, 30}], x] (* Vincenzo Librandi, Nov 01 2014 *)
    LinearRecurrence[{0, 4, 0, -1}, {1, 1, 2, 5}, 35] (* Robert G. Wilson v, Feb 11 2018 *)
    a[ n_] := ChebyshevT[n, Sqrt[-1/2]]*Sqrt[2]^Mod[n,2]/I^n //Simplify; (* Michael Somos, Mar 22 2022 *)
    a[ n_] := If[n<0, (-1)^n*a[-n], SeriesCoefficient[ (1 + x - 2*x^2 + x^3) / (1 - 4*x^2 + x^4), {x, 0, n}]]; (* Michael Somos, Sep 23 2024 *)
  • PARI
    a(n)=contfracpnqn(vector(n,i,1+(i>1)*(i%2)))[1,1]
    
  • PARI
    apply( {A002531(n,w=quadgen(12))=real((2+w)^(n\/2)*if(bittest(n, 0), w-1, 1))}, [0..30]) \\ M. F. Hasler, Nov 04 2019
    
  • PARI
    {a(n) = if(n<0, (-1)^n*a(-n), polcoeff( (1 + x - 2*x^2 + x^3) / (1 - 4*x^2 + x^4) + x*O(x^n), n))}; /* Michael Somos, Sep 23 2024 */
    
  • Sage
    s=((1+x-2*x^2+x^3)/(1-4*x^2+x^4)).series(x,40); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 16 2018
    

Formula

G.f.: (1 + x - 2*x^2 + x^3)/(1 - 4*x^2 + x^4).
a(2*n) = a(2*n-1) + a(2*n-2), a(2*n+1) = 2*a(2*n) + a(2*n-1), n > 0.
a(2*n) = (1/2)*((2 + sqrt(3))^n+(2 - sqrt(3))^n); a(2*n) = A003500(n)/2; a(2*n+1) = round(1/(1 + sqrt(3))*(2 + sqrt(3))^n). - Benoit Cloitre, Dec 15 2002
a(n) = ((1 + sqrt(3))^n + (1 - sqrt(3))^n)/(2*2^floor(n/2)). - Bruno Berselli, Nov 10 2011
a(n) = A080040(n)/(2*2^floor(n/2)). - Ralf Stephan, Sep 08 2013
a(2*n) = (-1)^n*T(2*n,u) and a(2*n+1) = (-1)^n*1/u*T(2*n+1,u), where u = sqrt(-1/2) and T(n,x) denotes the Chebyshev polynomial of the first kind. - Peter Bala, May 01 2012
a(n) = (-sqrt(2)*i)^n*T(n, sqrt(2)*i/2)*2^(-floor(n/2)) = A026150(n)*2^(-floor(n/2)), n >= 0, with i = sqrt(-1) and the Chebyshev T polynomials (A053120). - Wolfdieter Lang, Feb 10 2018
From Franck Maminirina Ramaharo, Nov 14 2018: (Start)
a(n) = ((1 - sqrt(2))*(-1)^n + 1 + sqrt(2))*(((sqrt(2) - sqrt(6))/2)^n + ((sqrt(6) + sqrt(2))/2)^n)/4.
E.g.f.: cosh(sqrt(3/2)*x)*(sqrt(2)*sinh(x/sqrt(2)) + cosh(x/sqrt(2))). (End)
a(n) = (-1)^n*a(-n) for all n in Z. - Michael Somos, Mar 22 2022
a(n) = 4*a(n-2) - a(n-4). - Boštjan Gec, Sep 21 2023

Extensions

Name edited (as by discussion in A002530) by M. F. Hasler, Nov 04 2019

A125145 a(n) = 3a(n-1) + 3a(n-2). a(0) = 1, a(1) = 4.

Original entry on oeis.org

1, 4, 15, 57, 216, 819, 3105, 11772, 44631, 169209, 641520, 2432187, 9221121, 34959924, 132543135, 502509177, 1905156936, 7222998339, 27384465825, 103822392492, 393620574951, 1492328902329, 5657848431840, 21450532002507
Offset: 0

Views

Author

Tanya Khovanova, Jan 11 2007

Keywords

Comments

Number of aa-avoiding words of length n on the alphabet {a,b,c,d}.
Equals row 3 of the array shown in A180165, the INVERT transform of A028859 and the INVERTi transform of A086347. - Gary W. Adamson, Aug 14 2010
From Tom Copeland, Nov 08 2014: (Start)
This array is one of a family related by compositions of C(x)= [1-sqrt(1-4x)]/2, an o.g.f. for A000108; its inverse Cinv(x) = x(1-x); and the special Mobius transformation P(x,t) = x / (1+t*x) with inverse P(x,-t) in x. Cf. A091867.
O.g.f.: G(x) = P[P[P[-Cinv(-x),-1],-1],-1] = P[-Cinv(-x),-3] = x*(1+x)/[1-3x(1-x)]= x*A125145(x).
Ginv(x) = -C[-P(x,3)] = [-1 + sqrt(1+4x/(1+3x))]/2 = x*A104455(-x).
G(-x) = -x(1-x) * [ 1 - 3*[x*(1+x)] + 3^2*[x*(1+x)]^2 - ...] , and so this array is related to finite differences in the row sums of A030528 * Diag((-3)^1,3^2,(-3)^3,..). (Cf. A146559.)
The inverse of -G(-x) is C[-P(-x,3)]= [1 - sqrt(1-4x/(1-3x))]/2 = x*A104455(x). (End)
Number of 3-compositions of n+1 restricted to parts 1 and 2 (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020

Crossrefs

Cf. A028859 = a(n+2) = 2 a(n+1) + 2 a(n); A086347 = On a 3 X 3 board, number of n-move routes of chess king ending at a given side cell. a(n) = 4a(n-1) + 4a(n-2).
Cf. A128235.
Cf. A180165, A028859, A086347. - Gary W. Adamson, Aug 14 2010

Programs

  • Haskell
    a125145 n = a125145_list !! n
    a125145_list =
       1 : 4 : map (* 3) (zipWith (+) a125145_list (tail a125145_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    I:=[1,4]; [n le 2 select I[n] else 3*Self(n-1)+3*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Nov 10 2014
  • Maple
    a[0]:=1: a[1]:=4: for n from 2 to 27 do a[n]:=3*a[n-1]+3*a[n-2] od: seq(a[n],n=0..27); # Emeric Deutsch, Feb 27 2007
    A125145 := proc(n)
        option remember;
        if n <= 1 then
            op(n+1,[1,4]) ;
        else
            3*(procname(n-1)+procname(n-2)) ;
        end if;
    end proc: # R. J. Mathar, Feb 13 2022
  • Mathematica
    nn=23;CoefficientList[Series[(1+x)/(1-3x-3x^2),{x,0,nn}],x] (* Geoffrey Critzer, Feb 09 2014 *)
    LinearRecurrence[{3,3},{1,4},30] (* Harvey P. Dale, May 01 2022 *)

Formula

G.f.: (1+z)/(1-3z-3z^2). - Emeric Deutsch, Feb 27 2007
a(n) = (5*sqrt(21)/42 + 1/2)*(3/2 + sqrt(21)/2)^n + (-5*sqrt(21)/42 + 1/2)*(3/2 - sqrt(21)/2)^n. - Antonio Alberto Olivares, Mar 20 2008
a(n) = A030195(n)+A030195(n+1). - R. J. Mathar, Feb 13 2022
E.g.f.: exp(3*x/2)*(21*cosh(sqrt(21)*x/2) + 5*sqrt(21)*sinh(sqrt(21)*x/2))/21. - Stefano Spezia, Aug 04 2022
a(n) = (((3 + sqrt(21)) / 2)^(n+2) - ((3 - sqrt(21)) / 2)^(n+2)) / (3 * sqrt(21)). - Werner Schulte, Dec 17 2024

A028860 a(n+2) = 2*a(n+1) + 2*a(n); a(0) = -1, a(1) = 1.

Original entry on oeis.org

-1, 1, 0, 2, 4, 12, 32, 88, 240, 656, 1792, 4896, 13376, 36544, 99840, 272768, 745216, 2035968, 5562368, 15196672, 41518080, 113429504, 309895168, 846649344, 2313089024, 6319476736, 17265131520, 47169216512, 128868696064, 352075825152, 961889042432, 2627929735168
Offset: 0

Views

Author

Keywords

Comments

a(n+1) is the top left entry of the n-th power of the 3 X 3 matrix [0, 1, 1; 1, 1, 1; 1, 1, 1]. - R. J. Mathar, Feb 04 2014
(A002605, a(.+1)) is the canonical basis of the space of linear recurrent sequences with signature (2, 2), i.e., any sequence s(n) = 2(s(n-1) + s(n-2)) is given by s = s(0)*A002605 + s(1)*a(.+1). - M. F. Hasler, Aug 06 2018

Crossrefs

Programs

  • GAP
    a:=[-1,1];; for n in [3..30] do a[n]:=2*a[n-1]+2*a[n-2]; od; a; # Muniru A Asiru, Aug 07 2018
    
  • Haskell
    a028860 n = a028860_list !! n
    a028860_list =
       -1 : 1 : map (* 2) (zipWith (+) a028860_list (tail a028860_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    I:=[-1,1]; [n le 2 select I[n] else 2*Self(n-1)+2*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 13 2018
    
  • Maple
    seq(coeff(series((3*x-1)/(1-2*x-2*x^2), x,n+1),x,n),n=0..30); # Muniru A Asiru, Aug 07 2018
  • Mathematica
    (With a different offset) M = {{0, 2}, {1, 2}} v[1] = {0, 1} v[n_] := v[n] = M.v[n - 1] a = Table[Abs[v[n][[1]]], {n, 1, 50}] (* Roger L. Bagula, May 29 2005 *)
    LinearRecurrence[{2,2},{-1,1},40] (* Harvey P. Dale, Dec 13 2012 *)
    CoefficientList[Series[(-3 x + 1)/(2 x^2 + 2 x - 1), {x, 0, 27}], x] (* Robert G. Wilson v, Aug 07 2018 *)
  • PARI
    apply( A028860(n)=([2,2;1,0]^n)[2,]*[1,-1]~, [0..30]) \\ 15% faster than (A^n*[1,-1]~)[2]. - M. F. Hasler, Aug 06 2018
    
  • SageMath
    A028860 = BinaryRecurrenceSequence(2,2,-1,1)
    [A028860(n) for n in range(51)] # G. C. Greubel, Dec 08 2022

Formula

a(n) = 4*A028859(n-4), for n > 3.
From R. J. Mathar, Nov 27 2008: (Start)
G.f.: -(1 - 3*x)/(1 - 2*x - 2*x^2).
a(n) = 3*A002605(n-1) - A002605(n). (End)
a(n) = det A, where A is the Hessenberg matrix of order n+1 defined by: A[i,j] = p(j - i + 1) (i <= j), A[i,j] = -1 (i = j + 1), A[i,j] = 0 otherwise, with p(i) = fibonacci(2i - 4). - Milan Janjic, May 08 2010, edited by M. F. Hasler, Aug 06 2018
a(n) = (2*sqrt(3) - 3)/6*(1 + sqrt(3))^n - (2*sqrt(3) + 3)/6*(1 - sqrt(3))^n. - Sergei N. Gladkovskii, Jul 18 2012
a(n) = 2*A002605(n-2) for n >= 2. - M. F. Hasler, Aug 06 2018
E.g.f.: exp(x)*(2*sqrt(3)*sinh(sqrt(3)*x) - 3*cosh(sqrt(3)*x))/3. - Franck Maminirina Ramaharo, Nov 11 2018

Extensions

Edited by N. J. A. Sloane, Apr 11 2009
Edited and initial values added in definition by M. F. Hasler, Aug 06 2018

A189732 a(1)=1, a(2)=5, a(n) = a(n-1) + 5*a(n-2).

Original entry on oeis.org

1, 5, 10, 35, 85, 260, 685, 1985, 5410, 15335, 42385, 119060, 330985, 926285, 2581210, 7212635, 20118685, 56181860, 156775285, 437684585, 1221561010, 3409983935, 9517788985, 26567708660, 74156653585, 206995196885, 577778464810, 1612754449235, 4501646773285
Offset: 1

Views

Author

Harvey P. Dale, Apr 26 2011

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,5},{1,5},40]
  • Maxima
    a[1]:1$ a[2]:5$ a[n]:=a[n-1]+5*a[n-2]$ makelist(a[n], n, 1, 29);  /* Bruno Berselli, May 24 2011 */
    
  • PARI
    a(n)=([0,1; 5,1]^(n-1)*[1;5])[1,1] \\ Charles R Greathouse IV, Oct 21 2022

Formula

G.f.: x*(1+4*x)/(1-x-5*x^2). - Bruno Berselli, May 24 2011
a(n+1) = Sum_{k=0..n} A119473(n,k)*4^k. - Philippe Deléham, Oct 05 2012
Showing 1-10 of 37 results. Next