login
Search: a080040 -id:a080040
     Sort: relevance | references | number | modified | created      Format: long | short | data
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).
+20
1
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,1
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);
EXAMPLE
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
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);
CROSSREFS
KEYWORD
nonn
AUTHOR
Miklos Kristof, Mar 26 2007
STATUS
approved
Continued fraction expansion for exp( Sum_{n>=1} 1/(n*A080040(n)) ), where A080040(n) = (1+sqrt(3))^n + (1-sqrt(3))^n.
+20
1
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,3
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]
EXAMPLE
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,...].
PROG
(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]}
CROSSREFS
KEYWORD
cofr,nonn,easy
AUTHOR
Paul D. Hanna, Mar 21 2010
STATUS
approved
a(n) = 2*(a(n-1) + a(n-2)), a(0) = 0, a(1) = 1.
+10
135
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,3
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
REFERENCES
John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, p. 16.
LINKS
A. Abdurrahman, CM Method and Expansion of Numbers, arXiv:1909.10889 [math.NT], 2019.
Jean-Luc Baril, Nathanaël Hassler, Sergey Kirgizov, and José L. Ramírez, Grand zigzag knight's paths, arXiv:2402.04851 [math.CO], 2024.
Paul Barry, On the Gap-sum and Gap-product Sequences of Integer Sequences, arXiv:2104.05593 [math.CO], 2021.
Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
M. Couceiro, J. Devillet, and J.-L. Marichal, Quasitrivial semigroups: characterizations and enumerations, arXiv:1709.09162 [math.RA], 2017.
M. Diepenbroek, M. Maus, and A. Stoll, Pattern Avoidance in Reverse Double Lists, Preprint 2015. See Table 3.
Sergio Falcón, Binomial Transform of the Generalized k-Fibonacci Numbers, Communications in Mathematics and Applications (2019) Vol. 10, No. 3, 643-651.
Alice L. L. Gao and Sergey Kitaev, On partially ordered patterns of length 4 and 5 in permutations, arXiv:1903.08946 [math.CO], 2019.
Alice L. L. Gao and Sergey Kitaev, On partially ordered patterns of length 4 and 5 in permutations, The Electronic Journal of Combinatorics 26(3) (2019), P3.26.
Dale Gerdemann Bird Flock, Youtube video, 2011.
A. F. Horadam, Special properties of the sequence W_n(a,b; p,q), Fib. Quart., 5.5 (1967), 424-434. Case n->n+1, a=0,b=1; p=q=2.
D. Jhala, G. P. S. Rathore, and K. Sisodiya, Some Properties of k-Jacobsthal Numbers with Arithmetic Indexes, Turkish Journal of Analysis and Number Theory, 2014, Vol. 2, No. 4, 119-124.
Tanya Khovanova, Recursive Sequences
Wolfdieter Lang, On polynomials related to powers of the generating function of Catalan's numbers, Fib. Quart. 38,5 (2000) 408-419; Eqs. (39), (41) and (45), lhs, m=2.
D. H. Lehmer, On Lucas's test for the primality of Mersenne's numbers, Journal of the London Mathematical Society 1.3 (1935): 162-165. See U_n.
Alan Prince, Counting parses, Rutgers Optimality Archive, 2010.
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)
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 *)
PROG
(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
(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
(Magma) [Floor(((1 + Sqrt(3))^n - (1 - Sqrt(3))^n)/(2*Sqrt(3))): n in [0..30]]; // Vincenzo Librandi, Aug 18 2011
(Haskell)
a002605 n = a002605_list !! n
a002605_list =
0 : 1 : map (* 2) (zipWith (+) a002605_list (tail a002605_list))
-- Reinhard Zumkeller, Oct 15 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
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.
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Apr 15 2009
STATUS
approved
a(0) = a(1) = 1; a(n+2) = 2*a(n+1) + 2*a(n).
+10
54
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,3
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
REFERENCES
John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, see p. 16.
LINKS
Martin Burtscher, Igor Szczyrba, Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
C. Banderier and D. Merlini, Lattice paths with an infinite set of jumps, FPSAC02, Melbourne, 2002.
C. Bautista-Ramos and C. Guillen-Galvan, Fibonacci numbers of generalized Zykov sums, J. Integer Seq., 15 (2012), Article 12.7.8.
Nicolas Bonichon and Pierre-Jean Morel, Baxter d-permutations and other pattern avoiding classes, arXiv:2202.12677 [math.CO], 2022.
A. Burstein, S. Kitaev and T. Mansour, Independent sets in certain classes of (almost) regular graphs, arXiv:math/0310379 [math.CO], 2003.
Guillaume Escamocher and Barry O'Sullivan, Three-Dimensional Matching Instances Are Rich in Stable Matchings, CPAIOR 2018, pages 182-197.
Tanya Khovanova, Recursive Sequences
Emanuele Munarini, A generalization of André-Jeannin's symmetric identity, Pure Mathematics and Applications (2018) Vol. 27, No. 1, 98-118.
Nathan Sun, On d-permutations and Pattern Avoidance Classes, arXiv:2208.08506 [math.CO], 2022.
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
EXAMPLE
G.f. = 1 + x + 4*x^2 + 10*x^3 + 28*x^4 + 76*x^5 + 208*x^6 + 568*x^7 + ...
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 *)
PROG
(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
(Haskell)
a026150 n = a026150_list !! n
a026150_list = 1 : 1 : map (* 2) (zipWith (+) a026150_list (tail
a026150_list))
-- Reinhard Zumkeller, Oct 15 2011
(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 */
(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
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.
KEYWORD
nonn,easy
STATUS
approved
a(n) = 3*a(n-1) + 3*a(n-2), a(0)=0, a(1)=1.
+10
53
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,3
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
LINKS
Martin Burtscher, Igor Szczyrba, Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
A. F. Horadam, Special properties of the sequence W_n(a,b; p,q), Fib. Quart., 5.5 (1967), 424-434. Case n->n+1, a=0,b=1; p=q=3.
Tanya Khovanova, Recursive Sequences
W. Lang, On polynomials related to powers of the generating function of Catalan's numbers, Fib. Quart. 38 (2000) 408-419. Eqs. (39), (41) and (45), rhs, m=3.
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
EXAMPLE
G.f. = x + 3*x^2 + 12*x^3 + 45*x^4 + 171*x^5 + 648*x^6 + 2457*x^7 + ...
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 *)
PROG
(Sage) [lucas_number1(n, 3, -3) for n in range(0, 25)] # Zerinvary Lajos, Apr 22 2009
(PARI) {a(n) = n--; polchebyshev(n, 2, I*sqrt(3)/2) * (-I*sqrt(3))^n};
(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
CROSSREFS
Equals round(A085480(n)/sqrt(21)).
KEYWORD
nonn,easy
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
STATUS
approved
a(n+2) = 2*a(n+1) + 2*a(n); a(0) = 1, a(1) = 3.
+10
39
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,2
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).
LINKS
Joerg Arndt, Matters Computational (The Fxtbook), section 14.9 "Strings with no two consecutive zeros", pp.318-320.
C. Bautista-Ramos and C. Guillen-Galvan, Fibonacci numbers of generalized Zykov sums, J. Integer Seq., 15 (2012), #12.7.8.
Moussa Benoumhani, On the Modes of the Independence Polynomial of the Centipede, Journal of Integer Sequences, Vol. 15 (2012), #12.5.1.
D. Birmajer, J. B. Gil, and M. D. Weiner, On the Enumeration of Restricted Words over a Finite Alphabet, J. Int. Seq. 19 (2016) # 16.1.3 Example 7.
Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
P. Z. Chinn, R. Grimaldi, and S. Heubach, Tiling with Ls and Squares, J. Int. Sequences 10 (2007) #07.2.8.
David Garth and Adam Gouge, Affinely Self-Generating Sets and Morphisms, Journal of Integer Sequences, Article 07.1.5, 10 (2007) 1-13.
Juan B. Gil and Jessica A. Tomasko, Fibonacci colored compositions and applications, arXiv:2108.06462 [math.CO], 2021.
Aoife Hennessy, A Study of Riordan Arrays with Applications to Continued Fractions, Orthogonal Polynomials and Lattice Paths, Ph. D. Thesis, Waterford Institute of Technology, Oct. 2011.
Brian Hopkins and Stéphane Ouvry, Combinatorics of Multicompositions, arXiv:2008.04937 [math.CO], 2020.
Milan Janjic, On Linear Recurrence Equations Arising from Compositions of Positive Integers, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.7.
Tanya Khovanova, Recursive Sequences
J. Shallit, Proof of Irvine's conjecture via mechanized guessing, arXiv preprint arXiv:2310.14252 [math.CO], October 22 2023.
Eric Weisstein's World of Mathematics, Centipede Graph
Eric Weisstein's World of Mathematics, Independent Vertex Set
Eric Weisstein's World of Mathematics, Vertex Cover
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
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 *)
PROG
(Haskell)
a028859 n = a028859_list !! n
a028859_list =
1 : 3 : map (* 2) (zipWith (+) a028859_list (tail a028859_list))
-- Reinhard Zumkeller, Oct 15 2011
(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
CROSSREFS
Cf. A155020 (same sequence with term 1 prepended).
Cf. A002605.
KEYWORD
nonn,easy
EXTENSIONS
Definition completed by M. F. Hasler, Aug 06 2018
STATUS
approved
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.
(Formerly M1340 N0513)
+10
32
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,3
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
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.
LINKS
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
D'Arcy Thompson, Excess and Defect: Or the Little More and the Little Less, Mind, New Series, Vol. 38, No. 149 (Jan., 1929), pp. 43-55 (13 pages). See page 48.
Hein van Winkel, Q-quadrangles inscribed in a circle, 2014. See Table 1. [Reference from Antreas Hatzipolakis, Jul 14 2014]
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
EXAMPLE
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
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 *)
PROG
(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 */
(Magma) m:=40; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (1 +x-2*x^2+x^3)/(1-4*x^2+x^4))); // G. C. Greubel, Nov 16 2018
(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
(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
CROSSREFS
Bisections are A001075 and A001834.
Cf. A002530 (denominators), A048788.
Cf. A002316.
KEYWORD
nonn,frac,easy,core,nice,changed
EXTENSIONS
Name edited (as by discussion in A002530) by M. F. Hasler, Nov 04 2019
STATUS
approved
a(n) = 3a(n-1) + 3a(n-2). a(0) = 1, a(1) = 4.
+10
24
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,2
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
LINKS
D. Birmajer, J. B. Gil, and M. D. Weiner, On the Enumeration of Restricted Words over a Finite Alphabet, J. Int. Seq. 19 (2016) # 16.1.3, Example 7.
Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
Brian Hopkins and Stéphane Ouvry, Combinatorics of Multicompositions, arXiv:2008.04937 [math.CO], 2020.
Milan Janjic, On Linear Recurrence Equations Arising from Compositions of Positive Integers, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.7.
Tanya Khovanova, Recursive Sequences
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
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 *)
PROG
(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
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
KEYWORD
nonn,easy,changed
AUTHOR
Tanya Khovanova, Jan 11 2007
STATUS
approved
a(n+2) = 2*a(n+1) + 2*a(n); a(0) = -1, a(1) = 1.
+10
16
-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,4
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
LINKS
Martin Burtscher, Igor Szczyrba, and Rafał Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
Tanya Khovanova, Recursive Sequences
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
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 *)
PROG
(Haskell)
a028860 n = a028860_list !! n
a028860_list =
-1 : 1 : map (* 2) (zipWith (+) a028860_list (tail a028860_list))
-- Reinhard Zumkeller, Oct 15 2011
(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
(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
(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
(SageMath)
A028860 = BinaryRecurrenceSequence(2, 2, -1, 1)
[A028860(n) for n in range(51)] # G. C. Greubel, Dec 08 2022
KEYWORD
sign,easy
EXTENSIONS
Edited by N. J. A. Sloane, Apr 11 2009
Edited and initial values added in definition by M. F. Hasler, Aug 06 2018
STATUS
approved
a(1)=1, a(2)=5, a(n) = a(n-1) + 5*a(n-2).
+10
14
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,2
LINKS
Silvana Ramaj, New Results on Cyclic Compositions and Multicompositions, Master's Thesis, Georgia Southern Univ., 2021. See p. 33.
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
MATHEMATICA
LinearRecurrence[{1, 5}, {1, 5}, 40]
PROG
(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
KEYWORD
nonn,easy
AUTHOR
Harvey P. Dale, Apr 26 2011
STATUS
approved

Search completed in 0.020 seconds