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 38 results. Next

A000045 Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986, 102334155
Offset: 0

Views

Author

Keywords

Comments

D. E. Knuth writes: "Before Fibonacci wrote his work, the sequence F_{n} had already been discussed by Indian scholars, who had long been interested in rhythmic patterns that are formed from one-beat and two-beat notes. The number of such rhythms having n beats altogether is F_{n+1}; therefore both Gopāla (before 1135) and Hemachandra (c. 1150) mentioned the numbers 1, 2, 3, 5, 8, 13, 21, ... explicitly." (TAOCP Vol. 1, 2nd ed.) - Peter Luschny, Jan 11 2015
In keeping with historical accounts (see the references by P. Singh and S. Kak), the generalized Fibonacci sequence a, b, a + b, a + 2b, 2a + 3b, 3a + 5b, ... can also be described as the Gopala-Hemachandra numbers H(n) = H(n-1) + H(n-2), with F(n) = H(n) for a = b = 1, and Lucas sequence L(n) = H(n) for a = 2, b = 1. - Lekraj Beedassy, Jan 11 2015
Susantha Goonatilake writes: "[T]his sequence was well known in South Asia and used in the metrical sciences. Its development is attributed in part to Pingala (200 BC), later being associated with Virahanka (circa 700 AD), Gopala (circa 1135), and Hemachandra (circa 1150)—all of whom lived and worked prior to Fibonacci." (Toward a Global Science: Mining Civilizational Knowledge, p. 126) - Russ Cox, Sep 08 2021
Also sometimes called Hemachandra numbers.
Also sometimes called Lamé's sequence.
For a photograph of "Fibonacci"'s 1202 book, see the Leonardo of Pisa link below.
F(n+2) = number of binary sequences of length n that have no consecutive 0's.
F(n+2) = number of subsets of {1,2,...,n} that contain no consecutive integers.
F(n+1) = number of tilings of a 2 X n rectangle by 2 X 1 dominoes.
F(n+1) = number of matchings (i.e., Hosoya index) in a path graph on n vertices: F(5)=5 because the matchings of the path graph on the vertices A, B, C, D are the empty set, {AB}, {BC}, {CD} and {AB, CD}. - Emeric Deutsch, Jun 18 2001
F(n) = number of compositions of n+1 with no part equal to 1. [Cayley, Grimaldi]
Positive terms are the solutions to z = 2*x*y^4 + (x^2)*y^3 - 2*(x^3)*y^2 - y^5 - (x^4)*y + 2*y for x,y >= 0 (Ribenboim, page 193). When x=F(n), y=F(n + 1) and z > 0 then z=F(n + 1).
For Fibonacci search see Knuth, Vol. 3; Horowitz and Sahni; etc.
F(n) is the diagonal sum of the entries in Pascal's triangle at 45 degrees slope. - Amarnath Murthy, Dec 29 2001 (i.e., row sums of A030528, R. J. Mathar, Oct 28 2021)
F(n+1) is the number of perfect matchings in ladder graph L_n = P_2 X P_n. - Sharon Sela (sharonsela(AT)hotmail.com), May 19 2002
F(n+1) = number of (3412,132)-, (3412,213)- and (3412,321)-avoiding involutions in S_n.
This is also the Horadam sequence (0,1,1,1). - Ross La Haye, Aug 18 2003
An INVERT transform of A019590. INVERT([1,1,2,3,5,8,...]) gives A000129. INVERT([1,2,3,5,8,13,21,...]) gives A028859. - Antti Karttunen, Dec 12 2003
Number of meaningful differential operations of the k-th order on the space R^3. - Branko Malesevic, Mar 02 2004
F(n) = number of compositions of n-1 with no part greater than 2. Example: F(4) = 3 because we have 3 = 1+1+1 = 1+2 = 2+1.
F(n) = number of compositions of n into odd parts; e.g., F(6) counts 1+1+1+1+1+1, 1+1+1+3, 1+1+3+1, 1+3+1+1, 1+5, 3+1+1+1, 3+3, 5+1. - Clark Kimberling, Jun 22 2004
F(n) = number of binary words of length n beginning with 0 and having all runlengths odd; e.g., F(6) counts 010101, 010111, 010001, 011101, 011111, 000101, 000111, 000001. - Clark Kimberling, Jun 22 2004
The number of sequences (s(0),s(1),...,s(n)) such that 0 < s(i) < 5, |s(i)-s(i-1)|=1 and s(0)=1 is F(n+1); e.g., F(5+1) = 8 corresponds to 121212, 121232, 121234, 123212, 123232, 123234, 123432, 123434. - Clark Kimberling, Jun 22 2004 [corrected by Neven Juric, Jan 09 2009]
Likewise F(6+1) = 13 corresponds to these thirteen sequences with seven numbers: 1212121, 1212123, 1212321, 1212323, 1212343, 1232121, 1232123, 1232321, 1232323, 1232343, 1234321, 1234323, 1234343. - Neven Juric, Jan 09 2008
A relationship between F(n) and the Mandelbrot set is discussed in the link "Le nombre d'or dans l'ensemble de Mandelbrot" (in French). - Gerald McGarvey, Sep 19 2004
For n > 0, the continued fraction for F(2n-1)*phi = [F(2n); L(2n-1), L(2n-1), L(2n-1), ...] and the continued fraction for F(2n)*phi = [F(2n+1)-1; 1, L(2n)-2, 1, L(2n)-2, ...]. Also true: F(2n)*phi = [F(2n+1); -L(2n), L(2n), -L(2n), L(2n), ...] where L(i) is the i-th Lucas number (A000204). - Clark Kimberling, Nov 28 2004 [corrected by Hieronymus Fischer, Oct 20 2010]
For any nonzero number k, the continued fraction [4,4,...,4,k], which is n 4's and a single k, equals (F(3n) + k*F(3n+3))/(F(3n-3) + k*F(3n)). - Greg Dresden, Aug 07 2019
F(n+1) (for n >= 1) = number of permutations p of 1,2,3,...,n such that |k-p(k)| <= 1 for k=1,2,...,n. (For <= 2 and <= 3, see A002524 and A002526.) - Clark Kimberling, Nov 28 2004
The ratios F(n+1)/F(n) for n > 0 are the convergents to the simple continued fraction expansion of the golden section. - Jonathan Sondow, Dec 19 2004
Lengths of successive words (starting with a) under the substitution: {a -> ab, b -> a}. - Jeroen F.J. Laros, Jan 22 2005
The Fibonacci sequence, like any additive sequence, naturally tends to be geometric with common ratio not a rational power of 10; consequently, for a sufficiently large number of terms, Benford's law of first significant digit (i.e., first digit 1 <= d <= 9 occurring with probability log_10(d+1) - log_10(d)) holds. - Lekraj Beedassy, Apr 29 2005 (See Brown-Duncan, 1970. - N. J. A. Sloane, Feb 12 2017)
F(n+2) = Sum_{k=0..n} binomial(floor((n+k)/2),k), row sums of A046854. - Paul Barry, Mar 11 2003
Number of order ideals of the "zig-zag" poset. See vol. 1, ch. 3, prob. 23 of Stanley. - Mitch Harris, Dec 27 2005
F(n+1)/F(n) is also the Farey fraction sequence (see A097545 for explanation) for the golden ratio, which is the only number whose Farey fractions and continued fractions are the same. - Joshua Zucker, May 08 2006
a(n+2) is the number of paths through 2 plates of glass with n reflections (reflections occurring at plate/plate or plate/air interfaces). Cf. A006356-A006359. - Mitch Harris, Jul 06 2006
F(n+1) equals the number of downsets (i.e., decreasing subsets) of an n-element fence, i.e., an ordered set of height 1 on {1,2,...,n} with 1 > 2 < 3 > 4 < ... n and no other comparabilities. Alternatively, F(n+1) equals the number of subsets A of {1,2,...,n} with the property that, if an odd k is in A, then the adjacent elements of {1,2,...,n} belong to A, i.e., both k - 1 and k + 1 are in A (provided they are in {1,2,...,n}). - Brian Davey, Aug 25 2006
Number of Kekulé structures in polyphenanthrenes. See the paper by Lukovits and Janezic for details. - Parthasarathy Nambi, Aug 22 2006
Inverse: With phi = (sqrt(5) + 1)/2, round(log_phi(sqrt((sqrt(5) a(n) + sqrt(5 a(n)^2 - 4))(sqrt(5) a(n) + sqrt(5 a(n)^2 + 4)))/2)) = n for n >= 3, obtained by rounding the arithmetic mean of the inverses given in A001519 and A001906. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007
A result of Jacobi from 1848 states that every symmetric matrix over a p.i.d. is congruent to a triple-diagonal matrix. Consider the maximal number T(n) of summands in the determinant of an n X n triple-diagonal matrix. This is the same as the number of summands in such a determinant in which the main-, sub- and superdiagonal elements are all nonzero. By expanding on the first row we see that the sequence of T(n)'s is the Fibonacci sequence without the initial stammer on the 1's. - Larry Gerstein (gerstein(AT)math.ucsb.edu), Mar 30 2007
Suppose psi=log(phi). We get the representation F(n)=(2/sqrt(5))*sinh(n*psi) if n is even; F(n)=(2/sqrt(5))*cosh(n*psi) if n is odd. There is a similar representation for Lucas numbers (A000032). Many Fibonacci formulas now easily follow from appropriate sinh and cosh formulas. For example: the de Moivre theorem (cosh(x)+sinh(x))^m = cosh(mx)+sinh(mx) produces L(n)^2 + 5F(n)^2 = 2L(2n) and L(n)F(n) = F(2n) (setting x=n*psi and m=2). - Hieronymus Fischer, Apr 18 2007
Inverse: floor(log_phi(sqrt(5)*F(n)) + 1/2) = n, for n > 1. Also for n > 0, floor((1/2)*log_phi(5*F(n)*F(n+1))) = n. Extension valid for integer n, except n=0,-1: floor((1/2)*sign(F(n)*F(n+1))*log_phi|5*F(n)*F(n+1)|) = n (where sign(x) = sign of x). - Hieronymus Fischer, May 02 2007
F(n+2) = the number of Khalimsky-continuous functions with a two-point codomain. - Shiva Samieinia (shiva(AT)math.su.se), Oct 04 2007
This is a_1(n) in the Doroslovacki reference.
Let phi = A001622 then phi^n = (1/phi)*a(n) + a(n+1). - Gary W. Adamson, Dec 15 2007
The sequence of first differences, F(n+1)-F(n), is essentially the same sequence: 1, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ... - Colm Mulcahy, Mar 03 2008
Equals row sums of triangle A144152. - Gary W. Adamson, Sep 12 2008
Except for the initial term, the numerator of the convergents to the recursion x = 1/(x+1). - Cino Hilliard, Sep 15 2008
F(n) is the number of possible binary sequences of length n that obey the sequential construction rule: if last symbol is 0, add the complement (1); else add 0 or 1. Here 0,1 are metasymbols for any 2-valued symbol set. This rule has obvious similarities to JFJ Laros's rule, but is based on addition rather than substitution and creates a tree rather than a single sequence. - Ross Drewe, Oct 05 2008
F(n) = Product_{k=1..(n-1)/2} (1 + 4*cos^2 k*Pi/n), where terms = roots to the Fibonacci product polynomials, A152063. - Gary W. Adamson, Nov 22 2008
Fp == 5^((p-1)/2) mod p, p = prime [Schroeder, p. 90]. - Gary W. Adamson & Alexander R. Povolotsky, Feb 21 2009
A000032(n)^2 - 5*F(n)^2 = 4*(-1)^n. - Gary W. Adamson, Mar 11 2009
Output of Kasteleyn's formula for the number of perfect matchings of an m X n grid specializes to the Fibonacci sequence for m=2. - Sarah-Marie Belcastro, Jul 04 2009
(F(n),F(n+4)) satisfies the Diophantine equation: X^2 + Y^2 - 7XY = 9*(-1)^n. - Mohamed Bouhamida, Sep 06 2009
(F(n),F(n+2)) satisfies the Diophantine equation: X^2 + Y^2 - 3XY = (-1)^n. - Mohamed Bouhamida, Sep 08 2009
a(n+2) = A083662(A131577(n)). - Reinhard Zumkeller, Sep 26 2009
Difference between number of closed walks of length n+1 from a node on a pentagon and number of walks of length n+1 between two adjacent nodes on a pentagon. - Henry Bottomley, Feb 10 2010
F(n+1) = number of Motzkin paths of length n having exactly one weak ascent. A Motzkin path of length n is a lattice path from (0,0) to (n,0) consisting of U=(1,1), D=(1,-1) and H=(1,0) steps and never going below the x-axis. A weak ascent in a Motzkin path is a maximal sequence of consecutive U and H steps. Example: a(5)=5 because we have (HHHH), (HHU)D, (HUH)D, (UHH)D, and (UU)DD (the unique weak ascent is shown between parentheses; see A114690). - Emeric Deutsch, Mar 11 2010
(F(n-1) + F(n+1))^2 - 5*F(n-2)*F(n+2) = 9*(-1)^n. - Mohamed Bouhamida, Mar 31 2010
From the Pinter and Ziegler reference's abstract: authors "show that essentially the Fibonacci sequence is the unique binary recurrence which contains infinitely many three-term arithmetic progressions. A criterion for general linear recurrences having infinitely many three-term arithmetic progressions is also given." - Jonathan Vos Post, May 22 2010
F(n+1) = number of paths of length n starting at initial node on the path graph P_4. - Johannes W. Meijer, May 27 2010
F(k) = number of cyclotomic polynomials in denominator of generating function for number of ways to place k nonattacking queens on an n X n board. - Vaclav Kotesovec, Jun 07 2010
As n->oo, (a(n)/a(n-1) - a(n-1)/a(n)) tends to 1.0. Example: a(12)/a(11) - a(11)/a(12) = 144/89 - 89/144 = 0.99992197.... - Gary W. Adamson, Jul 16 2010
From Hieronymus Fischer, Oct 20 2010: (Start)
Fibonacci numbers are those numbers m such that m*phi is closer to an integer than k*phi for all k, 1 <= k < m. More formally: a(0)=0, a(1)=1, a(2)=1, a(n+1) = minimal m > a(n) such that m*phi is closer to an integer than a(n)*phi.
For all numbers 1 <= k < F(n), the inequality |k*phi-round(k*phi)| > |F(n)*phi-round(F(n)*phi)| holds.
F(n)*phi - round(F(n)*phi) = -((-phi)^(-n)), for n > 1.
Fract(1/2 + F(n)*phi) = 1/2 -(-phi)^(-n), for n > 1.
Fract(F(n)*phi) = (1/2)*(1 + (-1)^n) - (-phi)^(-n), n > 1.
Inverse: n = -log_phi |1/2 - fract(1/2 + F(n)*phi)|.
(End)
F(A001177(n)*k) mod n = 0, for any integer k. - Gary Detlefs, Nov 27 2010
F(n+k)^2 - F(n)^2 = F(k)*F(2n+k), for even k. - Gary Detlefs, Dec 04 2010
F(n+k)^2 + F(n)^2 = F(k)*F(2n+k), for odd k. - Gary Detlefs, Dec 04 2010
F(n) = round(phi*F(n-1)) for n > 1. - Joseph P. Shoulak, Jan 13 2012
For n > 0: a(n) = length of n-th row in Wythoff array A003603. - Reinhard Zumkeller, Jan 26 2012
From Bridget Tenner, Feb 22 2012: (Start)
The number of free permutations of [n].
The number of permutations of [n] for which s_k in supp(w) implies s_{k+-1} not in supp(w).
The number of permutations of [n] in which every decomposition into length(w) reflections is actually composed of simple reflections. (End)
The sequence F(n+1)^(1/n) is increasing. The sequence F(n+2)^(1/n) is decreasing. - Thomas Ordowski, Apr 19 2012
Two conjectures: For n > 1, F(n+2)^2 mod F(n+1)^2 = F(n)*F(n+1) - (-1)^n. For n > 0, (F(2n) + F(2n+2))^2 = F(4n+3) + Sum_{k = 2..2n} F(2k). - Alex Ratushnyak, May 06 2012
From Ravi Kumar Davala, Jan 30 2014: (Start)
Proof of Ratushnyak's first conjecture: For n > 1, F(n+2)^2 - F(n)*F(n+1) + (-1)^n = 2*F(n+1)^2.
Consider: F(n+2)^2 - F(n)*F(n+1) - 2*F(n+1)^2
= F(n+2)^2 - F(n+1)^2 - F(n+1)^2 - F(n)*F(n+1)
= (F(n+2) + F(n+1))*(F(n+2) - F(n+1)) - F(n+1)*(F(n+1) + F(n))
= F(n+3)*F(n) - F(n+1)*F(n+2) = -(-1)^n.
Proof of second conjecture: L(n) stands for Lucas number sequence from A000032.
Consider the fact that
L(2n+1)^2 = L(4n+2) - 2
(F(2n) + F(2n+2))^2 = F(4n+1) + F(4n+3) - 2
(F(2n) + F(2n+2))^2 = (Sum_{k = 2..2n} F(2k)) + F(4n+3).
(End)
The relationship: INVERT transform of (1,1,0,0,0,...) = (1, 2, 3, 5, 8, ...), while the INVERT transform of (1,0,1,0,1,0,1,...) = (1, 1, 2, 3, 5, 8, ...) is equivalent to: The numbers of compositions using parts 1 and 2 is equivalent to the numbers of compositions using parts == 1 (mod 2) (i.e., the odd integers). Generally, the numbers of compositions using parts 1 and k is equivalent to the numbers of compositions of (n+1) using parts 1 mod k. Cf. A000930 for k = 3 and A003269 for k = 4. Example: for k = 2, n = 4 we have the compositions (22; 211, 121; 112; 1111) = 5; but using parts 1 and 3 we have for n = 5: (311, 131, 113, 11111, 5) = 5. - Gary W. Adamson, Jul 05 2012
The sequence F(n) is the binomial transformation of the alternating sequence (-1)^(n-1)*F(n), whereas the sequence F(n+1) is the binomial transformation of the alternating sequence (-1)^n*F(n-1). Both of these facts follow easily from the equalities a(n;1)=F(n+1) and b(n;1)=F(n) where a(n;d) and b(n;d) are so-called "delta-Fibonacci" numbers as defined in comments to A014445 (see also the papers of Witula et al.). - Roman Witula, Jul 24 2012
F(n) is the number of different (n-1)-digit binary numbers such that all substrings of length > 1 have at least one digit equal to 1. Example: for n = 5 there are 8 binary numbers with n - 1 = 4 digits (1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111), only the F(n) = 5 numbers 1010, 1011, 1101, 1110 and 1111 have the desired property. - Hieronymus Fischer, Nov 30 2012
For positive n, F(n+1) equals the determinant of the n X n tridiagonal matrix with 1's along the main diagonal, i's along the superdiagonal and along the subdiagonal where i = sqrt(-1). Example: Det([1,i,0,0; i,1,i,0; 0,i,1,i; 0,0,i,1]) = F(4+1) = 5. - Philippe Deléham, Feb 24 2013
For n >= 1, number of compositions of n where there is a drop between every second pair of parts, starting with the first and second part; see example. Also, a(n+1) is the number of compositions where there is a drop between every second pair of parts, starting with the second and third part; see example. - Joerg Arndt, May 21 2013 [see the Hopkins/Tangboonduangjit reference for a proof, see also the Checa reference for alternative proofs and statistics]
Central terms of triangles in A162741 and A208245, n > 0. - Reinhard Zumkeller, Jul 28 2013
For n >= 4, F(n-1) is the number of simple permutations in the geometric grid class given in A226433. - Jay Pantone, Sep 08 2013
a(n) are the pentagon (not pentagonal) numbers because the algebraic degree 2 number rho(5) = 2*cos(Pi/5) = phi (golden section), the length ratio diagonal/side in a pentagon, has minimal polynomial C(5,x) = x^2 - x - 1 (see A187360, n=5), hence rho(5)^n = a(n-1)*1 + a(n)*rho(5), n >= 0, in the power basis of the algebraic number field Q(rho(5)). One needs a(-1) = 1 here. See also the P. Steinbach reference under A049310. - Wolfdieter Lang, Oct 01 2013
A010056(a(n)) = 1. - Reinhard Zumkeller, Oct 10 2013
Define F(-n) to be F(n) for n odd and -F(n) for n even. Then for all n and k, F(n+2k)^2 - F(n)^2 = F(n+k)*( F(n+3k) - F(n-k) ). - Charlie Marion, Dec 20 2013
( F(n), F(n+2k) ) satisfies the Diophantine equation: X^2 + Y^2 - L(2k)*X*Y = F(4k)^2*(-1)^n. This generalizes Bouhamida's comments dated Sep 06 2009 and Sep 08 2009. - Charlie Marion, Jan 07 2014
For any prime p there is an infinite periodic subsequence within F(n) divisible by p, that begins at index n = 0 with value 0, and its first nonzero term at n = A001602(i), and period k = A001602(i). Also see A236479. - Richard R. Forberg, Jan 26 2014
Range of row n of the circular Pascal array of order 5. - Shaun V. Ault, May 30 2014 [orig. Kicey-Klimko 2011, and observations by Glen Whitehead; more general work found in Ault-Kicey 2014]
Nonnegative range of the quintic polynomial 2*y - y^5 + 2*x*y^4 + x^2*y^3 - 2*x^3*y^2 - x^4*y with x, y >= 0, see Jones 1975. - Charles R Greathouse IV, Jun 01 2014
The expression round(1/(F(k+1)/F(n) + F(k)/F(n+1))), for n > 0, yields a Fibonacci sequence with k-1 leading zeros (with rounding 0.5 to 0). - Richard R. Forberg, Aug 04 2014
Conjecture: For n > 0, F(n) is the number of all admissible residue classes for which specific finite subsequences of the Collatz 3n + 1 function consists of n+2 terms. This has been verified for 0 < n < 51. For details see Links. - Mike Winkler, Oct 03 2014
a(4)=3 and a(6)=8 are the only Fibonacci numbers that are of the form prime+1. - Emmanuel Vantieghem, Oct 02 2014
a(1)=1=a(2), a(3)=2 are the only Fibonacci numbers that are of the form prime-1. - Emmanuel Vantieghem, Jun 07 2015
Any consecutive pair (m, k) of the Fibonacci sequence a(n) illustrates a fair equivalence between m miles and k kilometers. For instance, 8 miles ~ 13 km; 13 miles ~ 21 km. - Lekraj Beedassy, Oct 06 2014
a(n+1) counts closed walks on K_2, containing one loop on the other vertex. Equivalently the (1,1)entry of A^(n+1) where the adjacency matrix of digraph is A=(0,1; 1,1). - _David Neil McGrath, Oct 29 2014
a(n-1) counts closed walks on the graph G(1-vertex;l-loop,2-loop). - David Neil McGrath, Nov 26 2014
From Tom Copeland, Nov 02 2014: (Start)
Let P(x) = x/(1+x) with comp. inverse Pinv(x) = x/(1-x) = -P[-x], and C(x) = [1-sqrt(1-4x)]/2, an o.g.f. for the shifted Catalan numbers A000108, with inverse Cinv(x) = x * (1-x).
Fin(x) = P[C(x)] = C(x)/[1 + C(x)] is an o.g.f. for the Fine numbers, A000957 with inverse Fin^(-1)(x) = Cinv[Pinv(x)] = Cinv[-P(-x)].
Mot(x) = C[P(x)] = C[-Pinv(-x)] gives an o.g.f. for shifted A005043, the Motzkin or Riordan numbers with comp. inverse Mot^(-1)(x) = Pinv[Cinv(x)] = (x - x^2) / (1 - x + x^2) (cf. A057078).
BTC(x) = C[Pinv(x)] gives A007317, a binomial transform of the Catalan numbers, with BTC^(-1)(x) = P[Cinv(x)].
Fib(x) = -Fin[Cinv(Cinv(-x))] = -P[Cinv(-x)] = x + 2 x^2 + 3 x^3 + 5 x^4 + ... = (x+x^2)/[1-x-x^2] is an o.g.f. for the shifted Fibonacci sequence A000045, so the comp. inverse is Fib^(-1)(x) = -C[Pinv(-x)] = -BTC(-x) and Fib(x) = -BTC^(-1)(-x).
Generalizing to P(x,t) = x /(1 + t*x) and Pinv(x,t) = x /(1 - t*x) = -P(-x,t) gives other relations to lattice paths, such as the o.g.f. for A091867, C[P[x,1-t]], and that for A104597, Pinv[Cinv(x),t+1].
(End)
F(n+1) equals the number of binary words of length n avoiding runs of zeros of odd lengths. - Milan Janjic, Jan 28 2015
From Russell Jay Hendel, Apr 12 2015: (Start)
We prove Conjecture 1 of Rashid listed in the Formula section.
We use the following notation: F(n)=A000045(n), the Fibonacci numbers, and L(n) = A000032(n), the Lucas numbers. The fundamental Fibonacci-Lucas recursion asserts that G(n) = G(n-1) + G(n-2), with "L" or "F" replacing "G".
We need the following prerequisites which we label (A), (B), (C), (D). The prerequisites are formulas in the Koshy book listed in the References section. (A) F(m-1) + F(m+1) = L(m) (Koshy, p. 97, #32), (B) L(2m) + 2*(-1)^m = L(m)^2 (Koshy p. 97, #41), (C) F(m+k)*F(m-k) = (-1)^n*F(k)^2 (Koshy, p. 113, #24, Tagiuri's identity), and (D) F(n)^2 + F(n+1)^2 = F(2n+1) (Koshy, p. 97, #30).
We must also prove (E), L(n+2)*F(n-1) = F(2n+1)+2*(-1)^n. To prove (E), first note that by (A), proof of (E) is equivalent to proving that F(n+1)*F(n-1) + F(n+3)*F(n-1) = F(2n+1) + 2*(-1)^n. But by (C) with k=1, we have F(n+1)*F(n-1) = F(n)^2 + (-1)^n. Applying (C) again with k=2 and m=n+1, we have F(n+3)*F(n-1) = F(n+1) + (-1)^n. Adding these two applications of (C) together and using (D) we have F(n+1)*F(n-1) + F(n+3)*F(n-1) = F(n)^2 + F(n+1)^2 + 2*(-1)^n = F(2n+1) + 2(-1)^n, completing the proof of (E).
We now prove Conjecture 1. By (A) and the Fibonacci-Lucas recursion, we have F(2n+1) + F(2n+2) + F(2n+3) + F(2n+4) = (F(2n+1) + F(2n+3)) + (F(2n+2) + F(2n+4)) = L(2n+2) +L(2n+3) = L(2n+4). But then by (B), with m=2n+4, we have sqrt(L(2n+4) + 2(-1)^n) = L(n+2). Finally by (E), we have L(n+2)*F(n-1) = F(2n+1) + 2*(-1)^n. Dividing both sides by F(n-1), we have (F(2n+1) + 2*(-1)^n)/F(n-1) = L(n+2) = sqrt(F(2n+1) + F(2n+2) + F(2n+3) + F(2n+4) + 2(-1)^n), as required.
(End)
In Fibonacci's Liber Abaci the rabbit problem appears in the translation of L. E. Sigler on pp. 404-405, and a remark [27] on p. 637. - Wolfdieter Lang, Apr 17 2015
a(n) counts partially ordered partitions of (n-1) into parts 1,2,3 where only the order of adjacent 1's and 2's are unimportant. (See example.) - David Neil McGrath, Jul 27 2015
F(n) divides F(n*k). Proved by Marjorie Bicknell and Verner E Hoggatt Jr. - Juhani Heino, Aug 24 2015
F(n) is the number of UDU-equivalence classes of ballot paths of length n. Two ballot paths of length n with steps U = (1,1), D = (1,-1) are UDU-equivalent whenever the positions of UDU are the same in both paths. - Kostas Manes, Aug 25 2015
Cassini's identity F(2n+1) * F(2n+3) = F(2n+2)^2 + 1 is the basis for a geometrical paradox (or dissection fallacy) in A262342. - Jonathan Sondow, Oct 23 2015
For n >= 4, F(n) is the number of up-down words on alphabet {1,2,3} of length n-2. - Ran Pan, Nov 23 2015
F(n+2) is the number of terms in p(n), where p(n)/q(n) is the n-th convergent of the formal infinite continued fraction [a(0),a(1),...]; e.g., p(3) = a(0)a(1)a(2)a(3) + a(0)a(1) + a(0)a(3) + a(2)a(3) + 1 has F(5) terms. Also, F(n+1) is the number of terms in q(n). - Clark Kimberling, Dec 23 2015
F(n+1) (for n >= 1) is the permanent of an n X n matrix M with M(i,j)=1 if |i-j| <= 1 and 0 otherwise. - Dmitry Efimov, Jan 08 2016
A trapezoid has three sides of lengths in order F(n), F(n+2), F(n). For increasing n a very close approximation to the maximum area will have the fourth side equal to 2*F(n+1). For a trapezoid with lengths of sides in order F(n+2), F(n), F(n+2), the fourth side will be F(n+3). - J. M. Bergot, Mar 17 2016
(1) Join two triangles with lengths of sides L(n), F(n+3), L(n+2) and F(n+2), L(n+1), L(n+2) (where L(n)=A000032(n)) along the common side of length L(n+2) to create an irregular quadrilateral. Its area is approximately 5*F(2*n-1) - (F(2*n-7) - F(2*n-13))/5. (2) Join two triangles with lengths of sides L(n), F(n+2), F(n+3) and L(n+1), F(n+1), F(n+3) along the common side F(n+3) to form an irregular quadrilateral. Its area is approximately 4*F(2*n-1) - 2*(F(2*n-7) + F(2*n-18)). - J. M. Bergot, Apr 06 2016
From Clark Kimberling, Jun 13 2016: (Start)
Let T* be the infinite tree with root 0 generated by these rules: if p is in T*, then p+1 is in T* and x*p is in T*.
Let g(n) be the set of nodes in the n-th generation, so that g(0) = {0}, g(1) = {1}, g(2) = {2, x}, g(3) = {3, 2x, x+1, x^2}, etc.
Let T(r) be the tree obtained by substituting r for x.
If a positive integer N is not a square and r = sqrt(N), then the number of (not necessarily distinct) integers in g(n) is A000045(n), for n >= 1. See A274142. (End)
Consider the partitions of n, with all summands initially listed in nonincreasing order. Freeze all the 1's in place and then allow all the other summands to change their order, without displacing any of the 1's. The resulting number of arrangements is a(n+1). - Gregory L. Simay, Jun 14 2016
Limit of the matrix power M^k shown in A163733, Sep 14 2016, as k->infinity results in a single column vector equal to the Fibonacci sequence. - Gary W. Adamson, Sep 19 2016
F(n) and Lucas numbers L(n), being related by the formulas F(n) = (F(n-1) + L(n-1))/2 and L(n) = 2 F(n+1) - F(n), are a typical pair of "autosequences" (see the link to OEIS Wiki). - Jean-François Alcover, Jun 10 2017
Also the number of independent vertex sets and vertex covers in the (n-2)-path graph. - Eric W. Weisstein, Sep 22 2017
Shifted numbers of {UD, DU, FD, DF}-equivalence classes of Łukasiewicz paths. Łukasiewicz paths are P-equivalent iff the positions of pattern P are identical in these paths. - Sergey Kirgizov, Apr 08 2018
For n > 0, F(n) = the number of Markov equivalence classes with skeleton the path on n nodes. See Theorem 2.1 in the article by A. Radhakrishnan et al. below. - Liam Solus, Aug 23 2018
For n >= 2, also: number of terms in A032858 (every other base-3 digit is strictly smaller than its neighbors) with n-2 digits in base 3. - M. F. Hasler, Oct 05 2018
F(n+1) is the number of fixed points of the Foata transformation on S_n. - Kevin Long, Oct 17 2018
F(n+2) is the dimension of the Hecke algebra of type A_n with independent parameters (0,1,0,1,...) or (1,0,1,0,...). See Corollary 1.5 in the link "Hecke algebras with independent parameters". - Jia Huang, Jan 20 2019
The sequence is the second INVERT transform of (1, -1, 2, -3, 5, -8, 13, ...) and is the first sequence in an infinite set of successive INVERT transforms generated from (1, 0, 1, 0, 1, ...). Refer to the array shown in A073133. - Gary W. Adamson, Jul 16 2019
From Kai Wang, Dec 16 2019: (Start)
F(n*k)/F(k) = Sum_{i=0..n-1; j=0..n-1; i+2*j=n-1} (-1)^(j*(k-1))*L(k)^i*((i+j)!/(i!*j!)).
F((2*m+1)*k)/F(k) = Sum_{i=0..m-1} (-1)^(i*k)*L((2*m-2*i)*k) + (-1)^(m*k).
F(2*m*k)/F(k) = Sum_{i=0..m-1} (-1)^(i*k)*L((2*m-2*i-1)*k).
F(m+s)*F(n+r) - F(m+r)*F(n+s) = (-1)^(n+s)*F(m-n)*F(r-s).
F(m+r)*F(n+s) + F(m+s)*F(n+r) = (2*L(m+n+r+s) - (-1)^(n+s)*L(m-n)*L(r-s))/5.
L(m+r)*L(n+s) - 5*F(m+s)*F(n+r) = (-1)^(n+s)*L(m-n)*L(r-s).
L(m+r)*L(n+s) + 5*F(m+s)*F(n+r) = 2*L(m+n+r+s) + (-1)^(n+s)*5*F(m-n)*F(r-s).
L(m+r)*L(n+s) - L(m+s)*L(n+r) = (-1)^(n+s)*5*F(m-n)*F(r-s). (End)
F(n+1) is the number of permutations in S_n whose principal order ideals in the weak order are Boolean lattices. - Bridget Tenner, Jan 16 2020
F(n+1) is the number of permutations w in S_n that form Boolean intervals [s, w] in the weak order for every simple reflection s in the support of w. - Bridget Tenner, Jan 16 2020
F(n+1) is the number of subsets of {1,2,.,.,n} in which all differences between successive elements of subsets are odd. For example, for n = 6, F(7) = 13 and the 13 subsets are {6}, {1,6}, {3,6}, {5,6}, {2,3,6}, {2,5,6}, {4,5,6}, {1,2,3,6}, {1,2,5,6}, {1,4,5,6}, {3,4,5,6}, {2,3,4,5,6}, {1,2,3,4,5,6}. For even differences between elements see Comment in A016116. - Enrique Navarrete, Jul 01 2020
F(n) is the number of subsets of {1,2,...,n} in which the smallest element of the subset equals the size of the subset (this type of subset is sometimes called extraordinary). For example, F(6) = 8 and the subsets are {1}, {2,3}, {2,4}, {2,5}, {3,4,5}, {2,6}, {3,4,6}, {3,5,6}. It is easy to see that these subsets follow the Fibonacci recursion F(n) = F(n-1) + F(n-2) since we get F(n) such subsets by keeping all F(n-1) subsets from the previous stage (in the example, the F(5)=5 subsets that don't include 6), and by adding one to all elements and appending an additional element n to each subset in F(n-2) subsets (in the example, by applying this to the F(4)=3 subsets {1}, {2,3}, {2,4} we obtain {2,6}, {3,4,6}, {3,5,6}). - Enrique Navarrete, Sep 28 2020
Named "série de Fibonacci" by Lucas (1877) after the Italian mathematician Fibonacci (Leonardo Bonacci, c. 1170 - c. 1240/50). In 1876 he named the sequence "série de Lamé" after the French mathematician Gabriel Lamé (1795 - 1870). - Amiram Eldar, Apr 16 2021
F(n) is the number of edge coverings of the path with n edges. - M. Farrokhi D. G., Sep 30 2021
LCM(F(m), F(n)) is a Fibonacci number if and only if either F(m) divides F(n) or F(n) divides F(m). - M. Farrokhi D. G., Sep 30 2021
Every nonunit positive rational number has at most one representation as the quotient of two Fibonacci numbers. - M. Farrokhi D. G., Sep 30 2021
The infinite sum F(n)/10^(n-1) for all natural numbers n is equal to 100/89. More generally, the sum of F(n)/(k^(n-1)) for all natural numbers n is equal to k^2/(k^2-k-1). Jonatan Djurachkovitch, Dec 31 2023
For n >= 1, number of compositions (c(1),c(2),...,c(k)) of n where c(1), c(3), c(5), ... are 1. To obtain such compositions K(n) of length n increase all parts c(2) by one in all of K(n-1) and prepend two parts 1 in all of K(n-2). - Joerg Arndt, Jan 05 2024
Cohn (1964) proved that a(12) = 12^2 is the only square in the sequence greater than a(1) = 1. - M. F. Hasler, Dec 18 2024
Product_{i=n-2..n+2} F(i) = F(n)^5 - F(n). For example, (F(4)F(5)F(6)F(7)F(8))=(3 * 5 * 8 * 13 * 21) = 8^5 - 8. - Jules Beauchamp, Apr 28 2025
F(n) is even iff n is a multiple of 3. - Stefano Spezia, Jul 06 2025

Examples

			For x = 0,1,2,3,4, x=1/(x+1) = 1, 1/2, 2/3, 3/5, 5/8. These fractions have numerators 1,1,2,3,5, which are the 2nd to 6th terms of the sequence. - _Cino Hilliard_, Sep 15 2008
From _Joerg Arndt_, May 21 2013: (Start)
There are a(7)=13 compositions of 7 where there is a drop between every second pair of parts, starting with the first and second part:
01:  [ 2 1 2 1 1 ]
02:  [ 2 1 3 1 ]
03:  [ 2 1 4 ]
04:  [ 3 1 2 1 ]
05:  [ 3 1 3 ]
06:  [ 3 2 2 ]
07:  [ 4 1 2 ]
08:  [ 4 2 1 ]
09:  [ 4 3 ]
10:  [ 5 1 1 ]
11:  [ 5 2 ]
12:  [ 6 1 ]
13:  [ 7 ]
There are abs(a(6+1))=13 compositions of 6 where there is no rise between every second pair of parts, starting with the second and third part:
01:  [ 1 2 1 2 ]
02:  [ 1 3 1 1 ]
03:  [ 1 3 2 ]
04:  [ 1 4 1 ]
05:  [ 1 5 ]
06:  [ 2 2 1 1 ]
07:  [ 2 3 1 ]
08:  [ 2 4 ]
09:  [ 3 2 1 ]
10:  [ 3 3 ]
11:  [ 4 2 ]
12:  [ 5 1 ]
13:  [ 6 ]
(End)
Partially ordered partitions of (n-1) into parts 1,2,3 where only the order of the adjacent 1's and 2's are unimportant. E.g., a(8)=21. These are (331),(313),(133),(322),(232),(223),(3211),(2311),(1321),(2131),(1132),(2113),(31111),(13111),(11311),(11131),(11113),(2221),(22111),(211111),(1111111). - _David Neil McGrath_, Jul 25 2015
Consider the partitions of 7 with summands initially listed in nonincreasing order. Keep the 1's frozen in position (indicated by "[]") and then allow the other summands to otherwise vary their order: 7; 6,[1]; 5,2; 2,5; 4,3; 3,4; 5,[1,1], 4,2,[1]; 2,4,[1]; 3,3,[1]; 3,3,2; 3,2,3; 2,3,3; 4,[1,1,1]; 3,2,[1,1]; 2,3,[1,1]; 2,2,2,[1]; 3,[1,1,1,1]; 2,2,[1,1,1]; 2,[1,1,1,1,1]; [1,1,1,1,1,1,1]. There are 21 = a(7+1) arrangements in all. - _Gregory L. Simay_, Jun 14 2016
		

References

  • Mohammad K. Azarian, The Generating Function for the Fibonacci Sequence, Missouri Journal of Mathematical Sciences, Vol. 2, No. 2, Spring 1990, pp. 78-79. Zentralblatt MATH, Zbl 1097.11516.
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17.
  • P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 70.
  • R. B. Banks, Slicing Pizzas, Racing Turtles and Further Adventures in Applied Mathematics, Princeton Univ. Press, 1999. See p. 84.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 4.
  • Marjorie Bicknell and Verner E Hoggatt, Fibonacci's Problem Book, Fibonacci Association, San Jose, Calif., 1974.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, pages 24 (Ex. 18), 489, 541.
  • A. Cayley, Theorems in Trigonometry and on Partitions, Messenger of Mathematics, 5 (1876), pp. 164, 188 = Mathematical Papers Vol. 10, n. 634, p. 16.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 84, 111-124, 202-203.
  • B. A. Davey and H. A. Priestley, Introduction to Lattices and Order (2nd edition), CUP, 2002. (See Exercise 1.15.)
  • B. Davis, 'The law of first digits' in 'Science Today' (subsequently renamed '2001') March 1980 p. 55, Times of India, Mumbai.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.2.
  • R. P. Grimaldi, Compositions without the summand 1, Proceedings Thirty-second Southeastern International Conference on Combinatorics, Graph Theory and Computing (Baton Rouge, LA, 2001). Congr. Numer. 152 (2001), 33-43.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.5 The Fibonacci and Related Sequences, pp. 286-288.
  • H. Halberstam and K. F. Roth, Sequences, Oxford, 1966; see Appendix.
  • S. Happersett, "Mathematical meditations", Journal of Mathematics and the Arts, 1 (2007), 29 - 33.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954; see esp. p. 148.
  • V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
  • E. Horowitz and S. Sahni, Fundamentals of Data Structures, Computer Science Press, 1976; p. 338.
  • M. Kauers and P. Paule, The Concrete Tetrahedron, Springer 2011, p. 63.
  • C. Kicey and K. Klimko, Some geometry of Pascal's triangle, Pi Mu Epsilon Journal, 13(4):229-245 (2011).
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 1, p. 78; Vol. 3, Section 6.2.1.
  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.
  • Leonardo of Pisa [Leonardo Pisano], Liber Abaci [The Book of Calculation], 1202.
  • D. Litchfield, D. Goldenheim and C. H. Dietrich, Euclid, Fibonacci and Sketchpad, Math. Teacher, 90 (1997).
  • Lukovits et al., Nanotubes: Number of Kekulé structures and aromaticity, J. Chem. Inf. Comput. Sci, (2003), vol. 43, 609-614. See eq. 2 on page 610.
  • I. Lukovits and D. Janezic, "Enumeration of conjugated circuits in nanotubes", J. Chem. Inf. Comput. Sci., vol. 44, 410-414 (2004). See Table 1, second column.
  • B. Malesevic: Some combinatorial aspects of differential operation composition on the space R^n, Univ. Beograd, Publ. Elektrotehn. Fak., Ser. Mat. 9 (1998), 29-33.
  • G. Mantel, Resten van wederkeerige Reeksen, Nieuw Archief v. Wiskunde, 2nd series, I (1894), 172-184.
  • C. N. Menhinick, The Fibonacci Resonance and other new Golden Ratio discoveries, Onperson, (2015), pages 200-206.
  • S. Mneimneh, Fibonacci in The Curriculum: Not Just a Bad Recurrence, in Proceeding SIGCSE '15 Proceedings of the 46th ACM Technical Symposium on Computer Science Education, Pages 253-258.
  • Hilary I. Okagbue, Muminu O. Adamu, Sheila A. Bishop, Abiodun A. Opanuga, Digit and Iterative Digit Sum of Fibonacci numbers, their identities and powers, International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 6 (2016) pp 4623-4627.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 49.
  • Clifford A. Pickover, The Math Book, From Pythagoras to the 57th Dimension, 250 Milestones in the History of Mathematics, Sterling Publ., NY, 2009, page 274.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 55-58, 255-260.
  • Alfred S. Posamentier and I. Lehmann, The Fabulous Fibonacci Numbers, Prometheus Books, Amherst, NY 2007.
  • Paulo Ribenboim, The New Book of Prime Number Records, Springer, 1996.
  • Paulo Ribenboim, My Numbers, My Friends: Popular Lectures on Number Theory, Springer-Verlag, NY, 2000, p. 3.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 45, 59.
  • J. Riordan, An Introduction to Combinatorial Analysis, Princeton University Press, Princeton, NJ, 1978.
  • A. M. Robert, A Course in p-adic Analysis, Springer-Verlag, 2000; p. 213.
  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 288.
  • Manfred R. Schroeder, "Number Theory in Science and Communication", 5th ed., Springer-Verlag, 2009
  • L. E. Sigler, Fibonacci's Liber Abaci, Springer, 2003, pp. 404-405 and [26] on p. 627.
  • Simson, [No first name given], An explanation of an obscure passage in Albert Girard's Commentary ..., Phil. Trans. Royal Soc., 10 (1753), 430-433.
  • Parmanand Singh, The so-called fibonacci numbers in ancient and medieval India, Historia Mathematica, vol. 12 (1985), 229-244.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 26-30.
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.
  • N. N. Vorob'ev, Chisla fibonachchi [Russian], Moscow, 1951. English translation, Fibonacci Numbers, Blaisdell, New York and London, 1961.
  • N. N. Vorobiev, Fibonacci Numbers, Birkhauser (Basel; Boston) 2002.
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, pp. 61-67, Penguin Books 1987.
  • D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 53.
  • R. Witula, D. Slota, delta-Fibonacci Numbers, Appl. Anal. Discrete Math., 3 (2009), 310-329.

Crossrefs

First row of arrays A103323, A172236, A234357. Second row of arrays A099390, A048887, and A092921 (k-generalized Fibonacci numbers).
Cf. also A001175 (Pisano periods), A001177 (Entry points), A001176 (number of zeros in a fundamental period).
Fibonacci-Pascal triangles: A027926, A036355, A037027, A074829, A105809, A109906, A111006, A114197, A162741, A228074.
Fibonacci-Cayley triangle: A327992.
Boustrophedon transforms: A000738, A000744.
Numbers of prime factors: A022307 and A038575.
Cf. A061446 (primitive part of Fibonacci numbers), A000010 (comments on product formulas).
Number of digits of F(n): A020909 (base 2), A020911 (base 3), A020912 (base 4), A020913 (base 5), A060384 (base 10), A261585 (base 60).

Programs

  • Axiom
    [fibonacci(n) for n in 0..50]
    
  • GAP
    Fib:=[0,1];; for n in [3..10^3] do Fib[n]:=Fib[n-1]+Fib[n-2]; od; Fib; # Muniru A Asiru, Sep 03 2017
    
  • Haskell
    -- Based on code from http://www.haskell.org/haskellwiki/The_Fibonacci_sequence
    -- which also has other versions.
    fib :: Int -> Integer
    fib n = fibs !! n
        where
            fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
    {- Example of use: map fib [0..38] Gerald McGarvey, Sep 29 2009 -}
    
  • Julia
    function fib(n)
       F = BigInt[1 1; 1 0]
       Fn = F^n
       Fn[2, 1]
    end
    println([fib(n) for n in 0:38]) # Peter Luschny, Feb 23 2017
    
  • Julia
    # faster
    function fibrec(n::Int)
        n == 0 && return (BigInt(0), BigInt(1))
        a, b = fibrec(div(n, 2))
        c = a * (b * 2 - a)
        d = a * a + b * b
        iseven(n) ? (c, d) : (d, c + d)
    end
    fibonacci(n::Int) = fibrec(n)[1]
    println([fibonacci(n) for n in 0:40]) # Peter Luschny, Apr 03 2022
    
  • Magma
    [Fibonacci(n): n in [0..38]];
    
  • Maple
    A000045 := proc(n) combinat[fibonacci](n); end;
    ZL:=[S, {a = Atom, b = Atom, S = Prod(X,Sequence(Prod(X,b))), X = Sequence(b,card >= 1)}, unlabelled]: seq(combstruct[count](ZL, size=n), n=0..38); # Zerinvary Lajos, Apr 04 2008
    spec := [B, {B=Sequence(Set(Z, card>1))}, unlabeled ]: seq(combstruct[count](spec, size=n), n=1..39); # Zerinvary Lajos, Apr 04 2008
    # The following Maple command isFib(n) yields true or false depending on whether n is a Fibonacci number or not.
    with(combinat): isFib := proc(n) local a: a := proc(n) local j: for j while fibonacci(j) <= n do fibonacci(j) end do: fibonacci(j-1) end proc: evalb(a(n) = n) end proc: # Emeric Deutsch, Nov 11 2014
  • Mathematica
    Table[Fibonacci[k], {k, 0, 50}] (* Mohammad K. Azarian, Jul 11 2015 *)
    Table[2^n Sqrt @ Product[(Cos[Pi k/(n + 1)]^2 + 1/4), {k, n}] // FullSimplify, {n, 15}]; (* Kasteleyn's formula specialized, Sarah-Marie Belcastro, Jul 04 2009 *)
    LinearRecurrence[{1, 1}, {0, 1}, 40] (* Harvey P. Dale, Aug 03 2014 *)
    Fibonacci[Range[0, 20]] (* Eric W. Weisstein, Sep 22 2017 *)
    CoefficientList[Series[-(x/(-1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 22 2017 *)
  • Maxima
    makelist(fib(n),n,0,100); /* Martin Ettl, Oct 21 2012 */
    
  • PARI
    a(n) = fibonacci(n)
    
  • PARI
    a(n) = imag(quadgen(5)^n)
    
  • PARI
    a(n)=my(phi=quadgen(5));(phi^n-(-1/phi)^n)/(2*phi-1) \\ Charles R Greathouse IV, Jun 17 2012
    
  • PARI
    is_A000045=A010056 \\ Characteristic function: see there. - M. F. Hasler, Feb 21 2025
    
  • Python
    # From Jaap Spies, Jan 05 2007, updated by Peter Luschny, Feb 21 2023:
    from itertools import islice
    def fib_gen():
        x, y = 0, 1
        while True:
            yield x
            x, y = y, x + y
    fib_list = lambda n: list(islice(fib_gen(), n))
    
  • Python
    is_A000045 = A010056 # See there: Characteristic function. Used e.g. in A377092.
    A000045 = lambda n: (4<M. F. Hasler, improving old code from 2023, Feb 20 2025
    
  • Python
    [(i:=-1)+(j:=1)] + [(j:=i+j)+(i:=j-i) for  in range(100)] # _Jwalin Bhatt, Apr 03 2025
    
  • Sage
    # Demonstration program from Jaap Spies:
    a = sloane.A000045; # choose sequence
    print(a)            # This returns the name of the sequence.
    print(a(38))        # This returns the 38th term of the sequence.
    print(a.list(39))   # This returns a list of the first 39 terms.
    
  • Sage
    a = BinaryRecurrenceSequence(1,1); print([a(n) for n in range(20)])
    # Closed form integer formula with F(1) = 0 from Paul Hankin (see link).
    F = lambda n: (4<<(n-1)*(n+2))//((4<<2*(n-1))-(2<<(n-1))-1)&((2<<(n-1))-1)
    print([F(n) for n in range(20)]) # Peter Luschny, Aug 28 2016
    
  • Sage
    print(list(fibonacci_sequence(0, 40))) # Bruno Berselli, Jun 26 2014
    
  • Scala
    def fibonacci(n: BigInt): BigInt = {
      val zero = BigInt(0)
      def fibTail(n: BigInt, a: BigInt, b: BigInt): BigInt = n match {
        case `zero` => a
        case _ => fibTail(n - 1, b, a + b)
      }
      fibTail(n, 0, 1)
    } // Based on "Case 3: Tail Recursion" from Carrasquel (2016) link
    (0 to 49).map(fibonacci()) // _Alonso del Arte, Apr 13 2019

Formula

G.f.: x / (1 - x - x^2).
G.f.: Sum_{n>=0} x^n * Product_{k=1..n} (k + x)/(1 + k*x). - Paul D. Hanna, Oct 26 2013
F(n) = ((1+sqrt(5))^n - (1-sqrt(5))^n)/(2^n*sqrt(5)).
Alternatively, F(n) = ((1/2+sqrt(5)/2)^n - (1/2-sqrt(5)/2)^n)/sqrt(5).
F(n) = F(n-1) + F(n-2) = -(-1)^n F(-n).
F(n) = round(phi^n/sqrt(5)).
F(n+1) = Sum_{j=0..floor(n/2)} binomial(n-j, j).
A strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n, m)) for all positive integers n and m. - Michael Somos, Jan 03 2017
E.g.f.: (2/sqrt(5))*exp(x/2)*sinh(sqrt(5)*x/2). - Len Smiley, Nov 30 2001
[0 1; 1 1]^n [0 1] = [F(n); F(n+1)]
x | F(n) ==> x | F(kn).
A sufficient condition for F(m) to be divisible by a prime p is (p - 1) divides m, if p == 1 or 4 (mod 5); (p + 1) divides m, if p == 2 or 3 (mod 5); or 5 divides m, if p = 5. (This is essentially Theorem 180 in Hardy and Wright.) - Fred W. Helenius (fredh(AT)ix.netcom.com), Jun 29 2001
a(n)=F(n) has the property: F(n)*F(m) + F(n+1)*F(m+1) = F(n+m+1). - Miklos Kristof, Nov 13 2003
From Kurmang. Aziz. Rashid, Feb 21 2004: (Start)
Conjecture 1: for n >= 2, sqrt(F(2n+1) + F(2n+2) + F(2n+3) + F(2n+4) + 2*(-1)^n) = (F(2n+1) + 2*(-1)^n)/F(n-1). [For a proof see Comments section.]
Conjecture 2: for n >= 0, (F(n+2)*F(n+3)) - (F(n+1)*F(n+4)) + (-1)^n = 0.
[Two more conjectures removed by Peter Luschny, Nov 17 2017]
Theorem 1: for n >= 0, (F(n+3)^ 2 - F(n+1)^ 2)/F(n+2) = (F(n+3)+ F(n+1)).
Theorem 2: for n >= 0, F(n+10) = 11*F(n+5) + F(n).
Theorem 3: for n >= 6, F(n) = 4*F(n-3) + F(n-6). (End)
Conjecture 2 of Rashid is actually a special case of the general law F(n)*F(m) + F(n+1)*F(m+1) = F(n+m+1) (take n <- n+1 and m <- -(n+4) in this law). - Harmel Nestra (harmel.nestra(AT)ut.ee), Apr 22 2005
Conjecture 2 of Rashid Kurmang simplified: F(n)*F(n+3) = F(n+1)*F(n+2)-(-1)^n. Follows from d'Ocagne's identity: m=n+2. - Alex Ratushnyak, May 06 2012
Conjecture: for all c such that 2-phi <= c < 2*(2-phi) we have F(n) = floor(phi*a(n-1)+c) for n > 2. - Gerald McGarvey, Jul 21 2004
For x > phi, Sum_{n>=0} F(n)/x^n = x/(x^2 - x - 1). - Gerald McGarvey, Oct 27 2004
F(n+1) = exponent of the n-th term in the series f(x, 1) determined by the equation f(x, y) = xy + f(xy, x). - Jonathan Sondow, Dec 19 2004
a(n-1) = Sum_{k=0..n} (-1)^k*binomial(n-ceiling(k/2), floor(k/2)). - Benoit Cloitre, May 05 2005
a(n) = Sum_{k=0..n} abs(A108299(n, k)). - Reinhard Zumkeller, Jun 01 2005
a(n) = A001222(A000304(n)).
F(n+1) = Sum_{k=0..n} binomial((n+k)/2, (n-k)/2)(1+(-1)^(n-k))/2. - Paul Barry, Aug 28 2005
Fibonacci(n) = Product_{j=1..ceiling(n/2)-1} (1 + 4(cos(j*Pi/n))^2). [Bicknell and Hoggatt, pp. 47-48.] - Emeric Deutsch, Oct 15 2006
F(n) = 2^-(n-1)*Sum_{k=0..floor((n-1)/2)} binomial(n,2*k+1)*5^k. - Hieronymus Fischer, Feb 07 2006
a(n) = (b(n+1) + b(n-1))/n where {b(n)} is the sequence A001629. - Sergio Falcon, Nov 22 2006
F(n*m) = Sum_{k = 0..m} binomial(m,k)*F(n-1)^k*F(n)^(m-k)*F(m-k). The generating function of F(n*m) (n fixed, m = 0,1,2,...) is G(x) = F(n)*x / ((1 - F(n-1)*x)^2 - F(n)*x*(1 - F(n-1)*x) - (F(n)*x)^2). E.g., F(15) = 610 = F(5*3) = binomial(3,0)* F(4)^0*F(5)^3*F(3) + binomial(3,1)* F(4)^1*F(5)^2*F(2) + binomial(3,2)* F(4)^2*F(5)^1*F(1) + binomial(3,3)* F(4)^3*F(5)^0*F(0) = 1*1*125*2 + 3*3*25*1 + 3*9*5*1 + 1*27*1*0 = 250 + 225 + 135 + 0 = 610. - Miklos Kristof, Feb 12 2007
From Miklos Kristof, Mar 19 2007: (Start)
Let L(n) = A000032(n) = Lucas numbers. Then:
For a >= b and odd b, F(a+b) + F(a-b) = L(a)*F(b).
For a >= b and even b, F(a+b) + F(a-b) = F(a)*L(b).
For a >= b and odd b, F(a+b) - F(a-b) = F(a)*L(b).
For a >= b and even b, F(a+b) - F(a-b) = L(a)*F(b).
F(n+m) + (-1)^m*F(n-m) = F(n)*L(m);
F(n+m) - (-1)^m*F(n-m) = L(n)*F(m);
F(n+m+k) + (-1)^k*F(n+m-k) + (-1)^m*(F(n-m+k) + (-1)^k*F(n-m-k)) = F(n)*L(m)*L(k);
F(n+m+k) - (-1)^k*F(n+m-k) + (-1)^m*(F(n-m+k) - (-1)^k*F(n-m-k)) = L(n)*L(m)*F(k);
F(n+m+k) + (-1)^k*F(n+m-k) - (-1)^m*(F(n-m+k) + (-1)^k*F(n-m-k)) = L(n)*F(m)*L(k);
F(n+m+k) - (-1)^k*F(n+m-k) - (-1)^m*(F(n-m+k) - (-1)^k*F(n-m-k)) = 5*F(n)*F(m)*F(k). (End)
A corollary to Kristof 2007 is 2*F(a+b) = F(a)*L(b) + L(a)*F(b). - Graeme McRae, Apr 24 2014
For n > m, the sum of the 2m consecutive Fibonacci numbers F(n-m-1) thru F(n+m-2) is F(n)*L(m) if m is odd, and L(n)*F(m) if m is even (see the McRae link). - Graeme McRae, Apr 24 2014.
F(n) = b(n) + (p-1)*Sum_{k=2..n-1} floor(b(k)/p)*F(n-k+1) where b(k) is the digital sum analog of the Fibonacci recurrence, defined by b(k) = ds_p(b(k-1)) + ds_p(b(k-2)), b(0)=0, b(1)=1, ds_p=digital sum base p. Example for base p=10: F(n) = A010077(n) + 9*Sum_{k=2..n-1} A059995(A010077(k))*F(n-k+1). - Hieronymus Fischer, Jul 01 2007
F(n) = b(n)+p*Sum_{k=2..n-1} floor(b(k)/p)*F(n-k+1) where b(k) is the digital product analog of the Fonacci recurrence, defined by b(k) = dp_p(b(k-1)) + dp_p(b(k-2)), b(0)=0, b(1)=1, dp_p=digital product base p. Example for base p=10: F(n) = A074867(n) + 10*Sum_{k=2..n-1} A059995(A074867(k))*F(n-k+1). - Hieronymus Fischer, Jul 01 2007
a(n) = denominator of continued fraction [1,1,1,...] (with n ones); e.g., 2/3 = continued fraction [1,1,1]; where barover[1] = [1,1,1,...] = 0.6180339.... - Gary W. Adamson, Nov 29 2007
F(n + 3) = 2F(n + 2) - F(n), F(n + 4) = 3F(n + 2) - F(n), F(n + 8) = 7F(n + 4) - F(n), F(n + 12) = 18F(n + 6) - F(n). - Paul Curtz, Feb 01 2008
a(2^n) = Product_{i=0..n-2} B(i) where B(i) is A001566. Example 3*7*47 = F(16). - Kenneth J Ramsey, Apr 23 2008
a(n+1) = Sum_{k=0..n} A109466(n,k)*(-1)^(n-k). -Philippe Deléham, Oct 26 2008
a(n) = Sum_{l_1=0..n+1} Sum_{l_2=0..n}...Sum_{l_i=0..n-i}... Sum_{l_n=0..1} delta(l_1,l_2,...,l_i,...,l_n), where delta(l_1,l_2,...,l_i,...,l_n) = 0 if any l_i + l_(i+1) >= 2 for i=1..n-1 and delta(l_1,l_2,...,l_i,...,l_n) = 1 otherwise. - Thomas Wieder, Feb 25 2009
a(n+1) = 2^n sqrt(Product_{k=1..n} cos(k Pi/(n+1))^2+1/4) (Kasteleyn's formula specialized). - Sarah-Marie Belcastro, Jul 04 2009
a(n+1) = Sum_{k=floor(n/2) mod 5} C(n,k) - Sum_{k=floor((n+5)/2) mod 5} C(n,k) = A173125(n) - A173126(n) = |A054877(n)-A052964(n-1)|. - Henry Bottomley, Feb 10 2010
If p[i] = modp(i,2) 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, May 02 2010
Limit_{k->oo} F(k+n)/F(k) = (L(n) + F(n)*sqrt(5))/2 with the Lucas numbers L(n) = A000032(n). - Johannes W. Meijer, May 27 2010
For n >= 1, F(n) = round(log_2(2^(phi*F(n-1)) + 2^(phi*F(n-2)))), where phi is the golden ratio. - Vladimir Shevelev, Jun 24 2010, Jun 27 2010
For n >= 1, a(n+1) = ceiling(phi*a(n)), if n is even and a(n+1) = floor(phi*a(n)), if n is odd (phi = golden ratio). - Vladimir Shevelev, Jul 01 2010
a(n) = 2*a(n-2) + a(n-3), n > 2. - Gary Detlefs, Sep 08 2010
a(2^n) = Product_{i=0..n-1} A000032(2^i). - Vladimir Shevelev, Nov 28 2010
a(n)^2 - a(n-1)^2 = a(n+1)*a(n-2), see A121646.
a(n) = sqrt((-1)^k*(a(n+k)^2 - a(k)*a(2n+k))), for any k. - Gary Detlefs, Dec 03 2010
F(2*n) = F(n+2)^2 - F(n+1)^2 - 2*F(n)^2. - Richard R. Forberg, Jun 04 2011
From Artur Jasinski, Nov 17 2011: (Start)
(-1)^(n+1) = F(n)^2 + F(n)*F(1+n) - F(1+n)^2.
F(n) = F(n+2) - 1 + (F(n+1))^4 + 2*(F(n+1)^3*F(n+2)) - (F(n+1)*F(n+2))^2 - 2*F(n+1)(F(n+2))^3 + (F(n+2))^4 - F(n+1). (End)
F(n) = 1 + Sum_{x=1..n-2} F(x). - Joseph P. Shoulak, Feb 05 2012
F(n) = 4*F(n-2) - 2*F(n-3) - F(n-6). - Gary Detlefs, Apr 01 2012
F(n) = round(phi^(n+1)/(phi+2)). - Thomas Ordowski, Apr 20 2012
From Sergei N. Gladkovskii, Jun 03 2012: (Start)
G.f.: A(x) = x/(1-x-x^2) = G(0)/sqrt(5) where G(k) = 1 - ((-1)^k)*2^k/(a^k - b*x*a^k*2^k/(b*x*2^k - 2*((-1)^k)*c^k/G(k+1))) and a=3+sqrt(5), b=1+sqrt(5), c=3-sqrt(5); (continued fraction, 3rd kind, 3-step).
Let E(x) be the e.g.f., i.e.,
E(x) = 1*x + (1/2)*x^2 + (1/3)*x^3 + (1/8)*x^4 + (1/24)*x^5 + (1/90)*x^6 + (13/5040)*x^7 + ...; then
E(x) = G(0)/sqrt(5); G(k) = 1 - ((-1)^k)*2^k/(a^k - b*x*a^k*2^k/(b*x*2^k - 2*((-1)^k)*(k+1)*c^k/G(k+1))), where a=3+sqrt(5), b=1+sqrt(5), c=3-sqrt(5); (continued fraction, 3rd kind, 3-step).
(End)
From Hieronymus Fischer, Nov 30 2012: (Start)
F(n) = 1 + Sum_{j_1=1..n-2} 1 + Sum_{j_1=1..n-2} Sum_{j_2=1..j_1-2} 1 + Sum_{j_1=1..n-2} Sum_{j_2=1..j_1-2} Sum_{j_3=1..j_2-2} 1 + ... + Sum_{j_1=1..n-2} Sum_{j_2=1..j_1-2} Sum_{j_3=1..j_2-2} ... Sum_{j_k=1..j_(k-1)-2} 1, where k = floor((n-1)/2).
Example: F(6) = 1 + Sum_{j=1..4} 1 + Sum_{j=1..4} Sum_{k=1..(j-2)} 1 + 0 = 1 + (1 + 1 + 1 + 1) + (1 + (1 + 1)) = 8.
F(n) = Sum_{j=0..k} S(j+1,n-2j), where k = floor((n-1)/2) and the S(j,n) are the n-th j-simplex sums: S(1,n) = 1 is the 1-simplex sum, S(2,n) = Sum_{k=1..n} S(1,k) = 1+1+...+1 = n is the 2-simplex sum, S(3,n) = Sum_{k=1..n} S(2,k) = 1+2+3+...+n is the 3-simplex sum (= triangular numbers = A000217), S(4,n) = Sum_{k=1..n} S(3,k) = 1+3+6+...+n(n+1)/2 is the 4-simplex sum (= tetrahedral numbers = A000292) and so on.
Since S(j,n) = binomial(n-2+j,j-1), the formula above equals the well-known binomial formula, essentially. (End)
G.f.: A(x) = x / (1 - x / (1 - x / (1 + x))). - Michael Somos, Jan 04 2013
Sum_{n >= 1} (-1)^(n-1)/(a(n)*a(n+1)) = 1/phi (phi=golden ratio). - Vladimir Shevelev, Feb 22 2013
From Raul Prisacariu, Oct 29 2023: (Start)
For odd k, Sum_{n >= 1} a(k)^2*(-1)^(n-1)/(a(k*n)*a(k*n+k)) = phi^(-k).
For even k, Sum_{n >= 1} a(k)^2/(a(k*n)*a(k*n+k)) = phi^(-k). (End)
From Vladimir Shevelev, Feb 24 2013: (Start)
(1) Expression a(n+1) via a(n): a(n+1) = (a(n) + sqrt(5*(a(n))^2 + 4*(-1)^n))/2;
(2) Sum_{k=1..n} (-1)^(k-1)/(a(k)*a(k+1)) = a(n)/a(n+1);
(3) a(n)/a(n+1) = 1/phi + r(n), where |r(n)| < 1/(a(n+1)*a(n+2)). (End)
F(n+1) = F(n)/2 + sqrt((-1)^n + 5*F(n)^2/4), n >= 0. F(n+1) = U_n(i/2)/i^n, (U:= Chebyshev polynomial of the 2nd kind, i=sqrt(-1)). - Bill Gosper, Mar 04 2013
G.f.: -Q(0) where Q(k) = 1 - (1+x)/(1 - x/(x - 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Mar 06 2013
G.f.: x - 1 - 1/x + (1/x)/Q(0), where Q(k) = 1 - (k+1)*x/(1 - x/(x - (k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 23 2013
G.f.: x*G(0), where G(k) = 1 + x*(1+x)/(1 - x*(1+x)/(x*(1+x) + 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 08 2013
G.f.: x^2 - 1 + 2*x^2/(W(0)-2), where W(k) = 1 + 1/(1 - x*(k + x)/( x*(k+1 + x) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013
G.f.: Q(0) - 1, where Q(k) = 1 + x^2 + (k+2)*x - x*(k+1 + x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 06 2013
Let b(n) = b(n-1) + b(n-2), with b(0) = 0, b(1) = phi. Then, for n >= 2, F(n) = floor(b(n-1)) if n is even, F(n) = ceiling(b(n-1)), if n is odd, with convergence. - Richard R. Forberg, Jan 19 2014
a(n) = Sum_{t1*g(1)+t2*g(2)+...+tn*g(n)=n} multinomial(t1+t2+...+tn,t1,t2,...,tn), where g(k)=2*k-1. - Mircea Merca, Feb 27 2014
F(n) = round(sqrt(F(n-1)^2 + F(n)^2 + F(n+1)^2)/2), for n > 0. This rule appears to apply to any sequence of the form a(n) = a(n-1) + a(n-2), for any two values of a(0) and a(1), if n is sufficiently large. - Richard R. Forberg, Jul 27 2014
F(n) = round(2/(1/F(n) + 1/F(n+1) + 1/F(n+2))), for n > 0. This rule also appears to apply to any sequence of the form a(n) = a(n-1) + a(n-2), for any two values of a(0) and a(1), if n is sufficiently large. - Richard R. Forberg, Aug 03 2014
F(n) = round(1/(Sum_{j>=n+2} 1/F(j))). - Richard R. Forberg, Aug 14 2014
a(n) = hypergeometric([-n/2+1/2, -n/2+1], [-n+1], -4) for n >= 2. - Peter Luschny, Sep 19 2014
Limit_{n -> oo} (log F(n+1)/log F(n))^n = e. - Thomas Ordowski, Oct 06 2014
F(n) = (L(n+1)^2 - L(n-1)^2)/(5*L(n)), where L(n) is A000032(n), with a similar inverse relationship. - Richard R. Forberg, Nov 17 2014
Consider the graph G[1-vertex;1-loop,2-loop] in comment above. Construct the power matrix array T(n,j) = [A^*j]*[S^*(j-1)] where A=(1,1,0,...) and S=(0,1,0,...)(A063524). [* is convolution operation] Define S^*0=I with I=(1,0,...). Then T(n,j) counts n-walks containing (j) loops and a(n-1) = Sum_{j=1..n} T(n,j). - David Neil McGrath, Nov 21 2014
Define F(-n) to be F(n) for n odd and -F(n) for n even. Then for all n and k, F(n) = F(k)*F(n-k+3) - F(k-1)*F(n-k+2) - F(k-2)*F(n-k) + (-1)^k*F(n-2k+2). - Charlie Marion, Dec 04 2014
F(n+k)^2 - L(k)*F(n)*F(n+k) + (-1)^k*F(n)^2 = (-1)^n*F(k)^2, if L(k) = A000032(k). - Alexander Samokrutov, Jul 20 2015
F(2*n) = F(n+1)^2 - F(n-1)^2, similar to Koshy (D) and Forberg 2011, but different. - Hermann Stamm-Wilbrandt, Aug 12 2015
F(n+1) = ceiling( (1/phi)*Sum_{k=0..n} F(k) ). - Tom Edgar, Sep 10 2015
a(n) = (L(n-3) + L(n+3))/10 where L(n)=A000032(n). - J. M. Bergot, Nov 25 2015
From Bob Selcoe, Mar 27 2016: (Start)
F(n) = (F(2n+k+1) - F(n+1)*F(n+k+1))/F(n+k), k >= 0.
Thus when k=0: F(n) = sqrt(F(2n+1) - F(n+1)^2).
F(n) = (F(3n) - F(n+1)^3 + F(n-1)^3)^(1/3).
F(n+2k) = binomial transform of any subsequence starting with F(n). Example F(6)=8: 1*8 = F(6)=8; 1*8 + 1*13 = F(8)=21; 1*8 + 2*13 + 1*21 = F(10)=55; 1*8 + 3*13 + 3*21 + 1*34 = F(12)=144, etc. This formula applies to Fibonacci-type sequences with any two seed values for a(0) and a(1) (e.g., Lucas sequence A000032: a(0)=2, a(1)=1).
(End)
F(n) = L(k)*F(n-k) + (-1)^(k+1)*F(n-2k) for all k >= 0, where L(k) = A000032(k). - Anton Zakharov, Aug 02 2016
From Ilya Gutkovskiy, Aug 03 2016: (Start)
a(n) = F_n(1), where F_n(x) are the Fibonacci polynomials.
Inverse binomial transform of A001906.
Number of zeros in substitution system {0 -> 11, 1 -> 1010} at step n from initial string "1" (1 -> 1010 -> 101011101011 -> ...) multiplied by 1/A000079(n). (End)
For n >= 2, a(n) = 2^(n^2+n) - (4^n-2^n-1)*floor(2^(n^2+n)/(4^n-2^n-1)) - 2^n*floor(2^(n^2) - (2^n-1-1/2^n)*floor(2^(n^2+n)/(4^n-2^n-1))). - Benoit Cloitre, Apr 17 2017
f(n+1) = Sum_{j=0..floor(n/2)} Sum_{k=0..j} binomial(n-2j,k)*binomial(j,k). - Tony Foster III, Sep 04 2017
F(n) = Sum_{k=0..floor((n-1)/2)} ( (n-k-1)! / ((n-2k-1)! * k!) ). - Zhandos Mambetaliyev, Nov 08 2017
For x even, F(n) = (F(n+x) + F(n-x))/L(x). For x odd, F(n) = (F(n+x) - F(n-x))/L(x) where n >= x in both cases. Therefore F(n) = F(2*n)/L(n) for n >= 0. - David James Sycamore, May 04 2018
From Isaac Saffold, Jul 19 2018: (Start)
Let [a/p] denote the Legendre symbol. Then, for an odd prime p:
F(p+n) == [5/p]*F([5/p]+n) (mod p), if [5/p] = 1 or -1.
F(p+n) == 3*F(n) (mod p), if [5/p] = 0 (i.e., p = 5).
This is true for negative-indexed terms as well, if this sequence is extended by the negafibonacci numbers (i.e., F(-n) = A039834(n)). (End)
a(n) = A094718(4, n). a(n) = A101220(0, j, n).
a(n) = A090888(0, n+1) = A118654(0, n+1) = A118654(1, n-1) = A109754(0, n) = A109754(1, n-1), for n > 0.
a(n) = (L(n-3) + L(n-2) + L(n-1) + L(n))/5 with L(n)=A000032(n). - Art Baker, Jan 04 2019
F(n) = F(k-1)*F(abs(n-k-2)) + F(k-1)*F(n-k-1) + F(k)*F(abs(n-k-2)) + 2*F(k)*F(n-k-1), for n > k > 0. - Joseph M. Shunia, Aug 12 2019
F(n) = F(n-k+2)*F(k-1) + F(n-k+1)*F(k-2) for all k such that 2 <= k <= n. - Michael Tulskikh, Oct 09 2019
F(n)^2 - F(n+k)*F(n-k) = (-1)^(n+k) * F(k)^2 for 2 <= k <= n [Catalan's identity]. - Hermann Stamm-Wilbrandt, May 07 2021
Sum_{n>=1} 1/a(n) = A079586 is the reciprocal Fibonacci constant. - Gennady Eremin, Aug 06 2021
a(n) = Product_{d|n} b(d) = Product_{k=1..n} b(gcd(n,k))^(1/phi(n/gcd(n,k))) = Product_{k=1..n} b(n/gcd(n,k))^(1/phi(n/gcd(n,k))) where b(n) = A061446(n) = primitive part of a(n), phi(n) = A000010(n). - Richard L. Ollerton, Nov 08 2021
a(n) = 2*i^(1-n)*sin(n*arccos(i/2))/sqrt(5), i=sqrt(-1). - Bill Gosper, May 05 2022
a(n) = i^(n-1)*sin(n*c)/sin(c) = i^(n-1)*sin(c*n)*csc(c), where c = Pi/2 + i*arccsch(2). - Peter Luschny, May 23 2022
F(2n) = Sum_{k=1..n} (k/5)*binomial(2n, n+k), where (k/5) is the Legendre or Jacobi Symbol; F(2n+1)= Sum_{k=1..n} (-(k+2)/5)*binomial(2n+1, n+k), where (-(k+2)/5) is the Legendre or Jacobi Symbol. For example, F(10) = 1*binomial(10,6) - 1*binomial(10,7) - 1*binomial(10,8) + 1*binomial(10,9) + 0*binomial(10,10), F(11) = 1*binomial(11,6) - 1*binomial(11,7) + 0*binomial(11,8) - 1*binomial(11,9) + 1*binomial(11,10) + 1*binomial(11,11). - Yike Li, Aug 21 2022
For n > 0, 1/F(n) = Sum_{k>=1} F(n*k)/(F(n+2)^(k+1)). - Diego Rattaggi, Oct 26 2022
From Andrea Pinos, Dec 02 2022: (Start)
For n == 0 (mod 4): F(n) = F((n+2)/2)*( F(n/2) + F((n/2)-2) ) + 1;
For n == 1 (mod 4): F(n) = F((n-1)/2)*( F((n-1)/2) + F(2+(n-1)/2) ) + 1;
For n == 2 (mod 4): F(n) = F((n-2)/2)*( F(n/2) + F((n/2)+2) ) + 1;
For n == 3 (mod 4): F(n) = F((n-1)/2)*( F((n-1)/2) + F(2+(n-1)/2) ) - 1. (End)
F(n) = Sum_{i=0..n-1} F(i)^2 / F(n-1). - Jules Beauchamp, May 03 2025

A001333 Pell-Lucas numbers: numerators of continued fraction convergents to sqrt(2).

Original entry on oeis.org

1, 1, 3, 7, 17, 41, 99, 239, 577, 1393, 3363, 8119, 19601, 47321, 114243, 275807, 665857, 1607521, 3880899, 9369319, 22619537, 54608393, 131836323, 318281039, 768398401, 1855077841, 4478554083, 10812186007, 26102926097, 63018038201, 152139002499, 367296043199
Offset: 0

Views

Author

Keywords

Comments

Number of n-step non-selfintersecting paths starting at (0,0) with steps of types (1,0), (-1,0) or (0,1) [Stanley].
Number of n steps one-sided prudent walks with east, west and north steps. - Shanzhen Gao, Apr 26 2011
Number of ternary strings of length n-1 with subwords (0,2) and (2,0) not allowed. - Olivier Gérard, Aug 28 2012
Number of symmetric 2n X 2 or (2n-1) X 2 crossword puzzle grids: all white squares are edge connected; at least 1 white square on every edge of grid; 180-degree rotational symmetry. - Erich Friedman
a(n+1) is the number of ways to put molecules on a 2 X n ladder lattice so that the molecules do not touch each other.
In other words, a(n+1) is the number of independent vertex sets and vertex covers in the n-ladder graph P_2 X P_n. - Eric W. Weisstein, Apr 04 2017
Number of (n-1) X 2 binary arrays with a path of adjacent 1's from top row to bottom row, see A359576. - R. H. Hardin, Mar 16 2002
a(2*n+1) with b(2*n+1) := A000129(2*n+1), n >= 0, give all (positive integer) solutions to Pell equation a^2 - 2*b^2 = -1.
a(2*n) with b(2*n) := A000129(2*n), n >= 1, give all (positive integer) solutions to Pell equation a^2 - 2*b^2 = +1 (see Emerson reference).
Bisection: a(2*n) = T(n,3) = A001541(n), n >= 0 and a(2*n+1) = S(2*n,2*sqrt(2)) = A002315(n), n >= 0, with T(n,x), resp. S(n,x), Chebyshev's polynomials of the first, resp. second kind. See A053120, resp. A049310.
Binomial transform of A077957. - Paul Barry, Feb 25 2003
For n > 0, the number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 4 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 2, s(n) = 2. - Herbert Kociemba, Jun 02 2004
For n > 1, a(n) corresponds to the longer side of a near right-angled isosceles triangle, one of the equal sides being A000129(n). - Lekraj Beedassy, Aug 06 2004
Exponents of terms in the series F(x,1), where F is determined by the equation F(x,y) = xy + F(x^2*y,x). - Jonathan Sondow, Dec 18 2004
Number of n-words from the alphabet A={0,1,2} which two neighbors differ by at most 1. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Aug 30 2006
Consider the mapping f(a/b) = (a + 2b)/(a + b). Taking a = b = 1 to start with and carrying out this mapping repeatedly on each new (reduced) rational number gives the following sequence 1/1, 3/2, 7/5, 17/12, 41/29, ... converging to 2^(1/2). Sequence contains the numerators. - Amarnath Murthy, Mar 22 2003 [Amended by Paul E. Black (paul.black(AT)nist.gov), Dec 18 2006]
Odd-indexed prime numerators are prime RMS numbers (A140480) and also NSW primes (A088165). - Ctibor O. Zizka, Aug 13 2008
The intermediate convergents to 2^(1/2) begin with 4/3, 10/7, 24/17, 58/41; essentially, numerators=A052542 and denominators here. - Clark Kimberling, Aug 26 2008
Equals right border of triangle A143966. Starting (1, 3, 7, ...) equals INVERT transform of (1, 2, 2, 2, ...) and row sums of triangle A143966. - Gary W. Adamson, Sep 06 2008
Inverse binomial transform of A006012; Hankel transform is := [1, 2, 0, 0, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Dec 04 2008
From Charlie Marion, Jan 07 2009: (Start)
In general, denominators, a(k,n) and numerators, b(k,n), of continued fraction convergents to sqrt((k+1)/k) may be found as follows:
let a(k,0) = 1, a(k,1) = 2k; for n>0, a(k,2n) = 2*a(k,2n-1) + a(k,2n-2) and a(k,2n+1) = (2k)*a(k,2n) + a(k,2n-1);
let b(k,0) = 1, b(k,1) = 2k+1; for n>0, b(k,2n) = 2*b(k,2n-1) + b(k,2n-2) and b(k,2n+1) = (2k)*b(k,2n) + b(k,2n-1).
For example, the convergents to sqrt(2/1) start 1/1, 3/2, 7/5, 17/12, 41/29.
In general, if a(k,n) and b(k,n) are the denominators and numerators, respectively, of continued fraction convergents to sqrt((k+1)/k) as defined above, then
k*a(k,2n)^2 - a(k,2n-1)*a(k,2n+1) = k = k*a(k,2n-2)*a(k,2n) - a(k,2n-1)^2 and
b(k,2n-1)*b(k,2n+1) - k*b(k,2n)^2 = k+1 = b(k,2n-1)^2 - k*b(k,2n-2)*b(k,2n);
for example, if k=1 and n=3, then b(1,n)=a(n+1) and
1*a(1,6)^2 - a(1,5)*a(1,7) = 1*169^2 - 70*408 = 1;
1*a(1,4)*a(1,6) - a(1,5)^2 = 1*29*169 - 70^2 = 1;
b(1,5)*b(1,7) - 1*b(1,6)^2 = 99*577 - 1*239^2 = 2;
b(1,5)^2 - 1*b(1,4)*b(1,6) = 99^2 - 1*41*239 = 2.
(End)
This sequence occurs in the lower bound of the order of the set of equivalent resistances of n equal resistors combined in series and in parallel (A048211). - Sameen Ahmed Khan, Jun 28 2010
Let M = a triangle with the Fibonacci series in each column, but the leftmost column is shifted upwards one row. A001333 = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 27 2010
a(n) is the number of compositions of n when there are 1 type of 1 and 2 types of other natural numbers. - Milan Janjic, Aug 13 2010
Equals the INVERTi transform of A055099. - Gary W. Adamson, Aug 14 2010
From L. Edson Jeffery, Apr 04 2011: (Start)
Let U be the unit-primitive matrix (see [Jeffery])
U = U_(8,2) = (0 0 1 0)
(0 1 0 1)
(1 0 2 0)
(0 2 0 1).
Then a(n) = (1/4)*Trace(U^n). (See also A084130, A006012.)
(End)
For n >= 1, row sums of triangle
m/k.|..0.....1.....2.....3.....4.....5.....6.....7
==================================================
.0..|..1
.1..|..1.....2
.2..|..1.....2.....4
.3..|..1.....4.....4.....8
.4..|..1.....4....12.....8....16
.5..|..1.....6....12....32....16....32
.6..|..1.....6....24....32....80....32....64
.7..|..1.....8....24....80....80...192....64...128
which is the triangle for numbers 2^k*C(m,k) with duplicated diagonals. - Vladimir Shevelev, Apr 12 2012
a(n) is also the number of ways to place k non-attacking wazirs on a 2 X n board, summed over all k >= 0 (a wazir is a leaper [0,1]). - Vaclav Kotesovec, May 08 2012
The sequences a(n) and b(n) := A000129(n) are entries of powers of the special case of the Brahmagupta Matrix - for details see Suryanarayan's paper. Further, as Suryanarayan remark, if we set A = 2*(a(n) + b(n))*b(n), B = a(n)*(a(n) + 2*b(n)), C = a(n)^2 + 2*a(n)*b(n) + 2*b(n)^2 we obtain integral solutions of the Pythagorean relation A^2 + B^2 = C^2, where A and B are consecutive integers. - Roman Witula, Jul 28 2012
Pisano period lengths: 1, 1, 8, 4, 12, 8, 6, 4, 24, 12, 24, 8, 28, 6, 24, 8, 16, 24, 40, 12, .... - R. J. Mathar, Aug 10 2012
This sequence and A000129 give the diagonal numbers described by Theon of Smyrna. - Sture Sjöstedt, Oct 20 2012
a(n) is the top left entry of the n-th power of any of the following six 3 X 3 binary matrices: [1, 1, 1; 1, 1, 1; 1, 0, 0] or [1, 1, 1; 1, 1, 0; 1, 1, 0] or [1, 1, 1; 1, 0, 1; 1, 1, 0] or [1, 1, 1; 1, 1, 0; 1, 0, 1] or [1, 1, 1; 1, 0, 1; 1, 0, 1] or [1, 1, 1; 1, 0, 0; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
If p is prime, a(p) == 1 (mod p) (compare with similar comment for A000032). - Creighton Dement, Oct 11 2005, modified by Davide Colazingari, Jun 26 2016
a(n) = A000129(n) + A000129(n-1), where A000129(n) is the n-th Pell Number; e.g., a(6) = 99 = A000129(6) + A000129(5) = 70 + 29. Hence the sequence of fractions has the form 1 + A000129(n-1)/A000129(n), and the ratio A000129(n-1)/A000129(n)converges to sqrt(2) - 1. - Gregory L. Simay, Nov 30 2018
For n > 0, a(n+1) is the length of tau^n(1) where tau is the morphism: 1 -> 101, 0 -> 1. See Song and Wu. - Michel Marcus, Jul 21 2020
For n > 0, a(n) is the number of nonisomorphic quasitrivial semigroups with n elements, see Devillet, Marichal, Teheux. A292932 is the number of labeled quasitrivial semigroups. - Peter Jipsen, Mar 28 2021
a(n) is the permanent of the n X n tridiagonal matrix defined in A332602. - Stefano Spezia, Apr 12 2022
From Greg Dresden, May 08 2023: (Start)
For n >= 2, 4*a(n) is the number of ways to tile this T-shaped figure of length n-1 with two colors of squares and one color of domino; shown here is the figure of length 5 (corresponding to n=6), and it has 4*a(6) = 396 different tilings.
_
|| _
|||_|||
|_|
(End)
12*a(n) = number of walks of length n in the cyclic Kautz digraph CK(3,4). - Miquel A. Fiol, Feb 15 2024

Examples

			Convergents are 1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, 8119/5741, 19601/13860, 47321/33461, 114243/80782, ... = A001333/A000129.
The 15 3 X 2 crossword grids, with white squares represented by an o:
  ooo ooo ooo ooo ooo ooo ooo oo. o.o .oo o.. .o. ..o oo. .oo
  ooo oo. o.o .oo o.. .o. ..o ooo ooo ooo ooo ooo ooo .oo oo.
G.f. = 1 + x + 3*x^2 + 7*x^3 + 17*x^4 + 41*x^5 + 99*x^6 + 239*x^7 + 577*x^8 + ...
		

References

  • M. R. Bacon and C. K. Cook, Some properties of Oresme numbers and convolutions ..., Fib. Q., 62:3 (2024), 233-240.
  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 122-125, 1964.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 204.
  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, see p. 16.
  • J. Devillet, J.-L. Marichal, and B. Teheux, Classifications of quasitrivial semigroups, Semigroup Forum, 100 (2020), 743-764.
  • Maribel Díaz Noguera [Maribel Del Carmen Díaz Noguera], Rigoberto Flores, Jose L. Ramirez, and Martha Romero Rojas, Catalan identities for generalized Fibonacci polynomials, Fib. Q., 62:2 (2024), 100-111.
  • Kenneth Edwards and Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • R. P. Grimaldi, Ternary strings with no consecutive 0's and no consecutive 1's, Congressus Numerantium, 205 (2011), 129-149.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.5 The Fibonacci and Related Sequences, p. 288.
  • A. F. Horadam, R. P. Loh, and A. G. Shannon, Divisibility properties of some Fibonacci-type sequences, pp. 55-64 of Combinatorial Mathematics VI (Armidale 1978), Lect. Notes Math. 748, 1979.
  • Thomas Koshy, Pell and Pell-Lucas Numbers with Applications, Springer, New York, 2014.
  • Kin Y. Li, Math Problem Book I, 2001, p. 24, Problem 159.
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 102, Problem 10.
  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 224.
  • 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).
  • R. P. Stanley, Enumerative Combinatorics, Volume 1 (1986), p. 203, Example 4.1.2.
  • 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.
  • R. C. Tilley et al., The cell growth problem for filaments, Proc. Louisiana Conf. Combinatorics, ed. R. C. Mullin et al., Baton Rouge, 1970, 310-339.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987, p. 34.

Crossrefs

For denominators see A000129.
See A040000 for the continued fraction expansion of sqrt(2).
See also A078057 which is the same sequence without the initial 1.
Cf. also A002203, A152113.
Row sums of unsigned Chebyshev T-triangle A053120. a(n)= A054458(n, 0) (first column of convolution triangle).
Row sums of A140750, A160756, A135837.
Equals A034182(n-1) + 2 and A084128(n)/2^n. First differences of A052937. Partial sums of A052542. Pairwise sums of A048624. Bisection of A002965.
The following sequences (and others) belong to the same family: A001333, A000129, A026150, A002605, A046717, A015518, A084057, A063727, A002533, A002532, A083098, A083099, A083100, A015519.
Second row of the array in A135597.
Cf. A055099.
Cf. A028859, A001906 / A088305, A033303, A000225, A095263, A003945, A006356, A002478, A214260, A001911 and A000217 for other restricted ternary words.
Cf. Triangle A106513 (alternating row sums).
Equals A293004 + 1.
Cf. A033539, A332602, A086395 (subseq. of primes).

Programs

  • Haskell
    a001333 n = a001333_list !! n
    a001333_list = 1 : 1 : zipWith (+)
                           a001333_list (map (* 2) $ tail a001333_list)
    -- Reinhard Zumkeller, Jul 08 2012
    
  • Magma
    [n le 2 select 1 else 2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Nov 10 2018
    
  • Maple
    A001333 := proc(n) option remember; if n=0 then 1 elif n=1 then 1 else 2*procname(n-1)+procname(n-2) fi end;
    Digits := 50; A001333 := n-> round((1/2)*(1+sqrt(2))^n);
    with(numtheory): cf := cfrac (sqrt(2),1000): [seq(nthnumer(cf,i), i=0..50)];
    a:= n-> (M-> M[2, 1]+M[2, 2])(<<2|1>, <1|0>>^n):
    seq(a(n), n=0..33);  # Alois P. Heinz, Aug 01 2008
    A001333List := proc(m) local A, P, n; A := [1,1]; P := [1,1];
    for n from 1 to m - 2 do P := ListTools:-PartialSums([op(A), P[-2]]);
    A := [op(A), P[-1]] od; A end: A001333List(32); # Peter Luschny, Mar 26 2022
  • Mathematica
    Insert[Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[2], n]]], {n, 1, 40}], 1, 1] (* Stefan Steinerberger, Apr 08 2006 *)
    Table[((1 - Sqrt[2])^n + (1 + Sqrt[2])^n)/2, {n, 0, 29}] // Simplify (* Robert G. Wilson v, May 02 2006 *)
    a[0] = 1; a[1] = 1; a[n_] := a[n] = 2a[n - 1] + a[n - 2]; Table[a@n, {n, 0, 29}] (* Robert G. Wilson v, May 02 2006 *)
    Table[ MatrixPower[{{1, 2}, {1, 1}}, n][[1, 1]], {n, 0, 30}] (* Robert G. Wilson v, May 02 2006 *)
    a=c=0;t={b=1}; Do[c=a+b+c; AppendTo[t,c]; a=b;b=c,{n,40}]; t (* Vladimir Joseph Stephan Orlovsky, Mar 23 2009 *)
    LinearRecurrence[{2, 1}, {1, 1}, 40] (* Vladimir Joseph Stephan Orlovsky, Mar 23 2009 *)
    Join[{1}, Numerator[Convergents[Sqrt[2], 30]]] (* Harvey P. Dale, Aug 22 2011 *)
    Table[(-I)^n ChebyshevT[n, I], {n, 10}] (* Eric W. Weisstein, Apr 04 2017 *)
    CoefficientList[Series[(-1 + x)/(-1 + 2 x + x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
    Table[Sqrt[(ChebyshevT[n, 3] + (-1)^n)/2], {n, 0, 20}] (* Eric W. Weisstein, Apr 17 2018 *)
  • PARI
    {a(n) = if( n<0, (-1)^n, 1) * contfracpnqn( vector( abs(n), i, 1 + (i>1))) [1, 1]}; /* Michael Somos, Sep 02 2012 */
    
  • PARI
    {a(n) = polchebyshev(n, 1, I) / I^n}; /* Michael Somos, Sep 02 2012 */
    
  • PARI
    a(n) = real((1 + quadgen(8))^n); \\ Michel Marcus, Mar 16 2021
    
  • PARI
    { for (n=0, 4000, a=contfracpnqn(vector(n, i, 1+(i>1)))[1, 1]; if (a > 10^(10^3 - 6), break); write("b001333.txt", n, " ", a); ); } \\ Harry J. Smith, Jun 12 2009
    
  • Python
    from functools import cache
    @cache
    def a(n): return 1 if n < 2 else 2*a(n-1) + a(n-2)
    print([a(n) for n in range(32)]) # Michael S. Branicky, Nov 13 2022
  • Sage
    from sage.combinat.sloane_functions import recur_gen2
    it = recur_gen2(1,1,2,1)
    [next(it) for i in range(30)] ## Zerinvary Lajos, Jun 24 2008
    
  • Sage
    [lucas_number2(n,2,-1)/2 for n in range(0, 30)] # Zerinvary Lajos, Apr 30 2009
    

Formula

a(n) = A055642(A125058(n)). - Reinhard Zumkeller, Feb 02 2007
a(n) = 2a(n-1) + a(n-2);
a(n) = ((1-sqrt(2))^n + (1+sqrt(2))^n)/2.
a(n)+a(n+1) = 2 A000129(n+1). 2*a(n) = A002203(n).
G.f.: (1 - x) / (1 - 2*x - x^2) = 1 / (1 - x / (1 - 2*x / (1 + x))). - Simon Plouffe in his 1992 dissertation.
A000129(2n) = 2*A000129(n)*a(n). - John McNamara, Oct 30 2002
a(n) = (-i)^n * T(n, i), with T(n, x) Chebyshev's polynomials of the first kind A053120 and i^2 = -1.
a(n) = a(n-1) + A052542(n-1), n>1. a(n)/A052542(n) converges to sqrt(1/2). - Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003
E.g.f.: exp(x)cosh(x*sqrt(2)). - Paul Barry, May 08 2003
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2k)2^k. - Paul Barry, May 13 2003
For n > 0, a(n)^2 - (1 + (-1)^(n))/2 = Sum_{k=0..n-1} ((2k+1)*A001653(n-1-k)); e.g., 17^2 - 1 = 288 = 1*169 + 3*29 + 5*5 + 7*1; 7^2 = 49 = 1*29 + 3*5 + 5*1. - Charlie Marion, Jul 18 2003
a(n+2) = A078343(n+1) + A048654(n). - Creighton Dement, Jan 19 2005
a(n) = A000129(n) + A000129(n-1) = A001109(n)/A000129(n) = sqrt(A001110(n)/A000129(n)^2) = ceiling(sqrt(A001108(n))). - Henry Bottomley, Apr 18 2000
Also the first differences of A000129 (the Pell numbers) because A052937(n) = A000129(n+1) + 1. - Graeme McRae, Aug 03 2006
a(n) = Sum_{k=0..n} A122542(n,k). - Philippe Deléham, Oct 08 2006
For another recurrence see A000129.
a(n) = Sum_{k=0..n} A098158(n,k)*2^(n-k). - Philippe Deléham, Dec 26 2007
a(n) = upper left and lower right terms of [1,1; 2,1]^n. - Gary W. Adamson, Mar 12 2008
If p[1]=1, and p[i]=2, (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
For n>=2, a(n)=F_n(2)+F_(n+1)(2), where F_n(x) is Fibonacci polynomial (cf. A049310): F_n(x) = Sum_{i=0..floor((n-1)/2)} binomial(n-i-1,i)x^(n-2*i-1). - Vladimir Shevelev, Apr 13 2012
a(-n) = (-1)^n * a(n). - Michael Somos, Sep 02 2012
Dirichlet g.f.: (PolyLog(s,1-sqrt(2)) + PolyLog(s,1+sqrt(2)))/2. - Ilya Gutkovskiy, Jun 26 2016
a(n) = A000129(n) - A000129(n-1), where A000129(n) is the n-th Pell Number. Hence the continued fraction is of the form 1-(A000129(n-1)/A000129(n)). - Gregory L. Simay, Nov 09 2018
a(n) = (A000129(n+3) + A000129(n-3))/10, n>=3. - Paul Curtz, Jun 16 2021
a(n) = (A000129(n+6) - A000129(n-6))/140, n>=6. - Paul Curtz, Jun 20 2021
a(n) = round((1/2)*sqrt(Product_{k=1..n} 4*(1 + sin(k*Pi/n)^2))), for n>=1. - Greg Dresden, Dec 28 2021
a(n)^2 + a(n+1)^2 = A075870(n+1) = 2*(b(n)^2 + b(n+1)^2) for all n in Z where b(n) := A000129(n). - Michael Somos, Apr 02 2022
a(n) = 2*A048739(n-2)+1. - R. J. Mathar, Feb 01 2024
Sum_{n>=1} 1/a(n) = 1.5766479516393275911191017828913332473... - R. J. Mathar, Feb 05 2024
From Peter Bala, Jul 06 2025: (Start)
G.f.: Sum_{n >= 1} (-1)^(n+1) * x^(n-1) * Product_{k = 1..n} (1 - k*x)/(1 - 3*x + k*x^2).
The following series telescope:
Sum_{n >= 1} (-1)^(n+1)/(a(2*n) + 1/a(2*n)) = 1/4, since 1/(a(2*n) + 1/a(2*n)) = 1/A077445(n) + 1/A077445(n+1).
Sum_{n >= 1} (-1)^(n+1)/(a(2*n+1) - 1/a(2*n+1)) = 1/8, since. 1/(a(2*n+1) - 1/a(2*n+1)) = 1/(4*Pell(2*n)) + 1/(4*Pell(2*n+2)), where Pell(n) = A000129(n).
Sum_{n >= 1} (-1)^(n+1)/(a(2*n+1) + 9/a(2*n+1)) = 1/10, since 1/(a(2*n+1) + 9/a(2*n+1)) = b(n) + b(n+1), where b(n) = A001109(n)/(2*Pell(2*n-1)*Pell(2*n+1)).
Sum_{n >= 1} (-1)^(n+1)/(a(n)*a(n+1)) = 1 - sqrt(2)/2 = A268682, since (-1)^(n+1)/(a(n)*a(n+1)) = Pell(n)/a(n) - Pell(n+1)/a(n+1). (End)

Extensions

Chebyshev comments from Wolfdieter Lang, Jan 10 2003

A001519 a(n) = 3*a(n-1) - a(n-2) for n >= 2, with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 5, 13, 34, 89, 233, 610, 1597, 4181, 10946, 28657, 75025, 196418, 514229, 1346269, 3524578, 9227465, 24157817, 63245986, 165580141, 433494437, 1134903170, 2971215073, 7778742049, 20365011074, 53316291173, 139583862445, 365435296162, 956722026041
Offset: 0

Views

Author

Keywords

Comments

This is a bisection of the Fibonacci sequence A000045. a(n) = F(2*n-1), with F(n) = A000045(n) and F(-1) = 1.
Number of ordered trees with n+1 edges and height at most 3 (height=number of edges on a maximal path starting at the root). Number of directed column-convex polyominoes of area n+1. Number of nondecreasing Dyck paths of length 2n+2. - Emeric Deutsch, Jul 11 2001
Terms are the solutions x to: 5x^2-4 is a square, with 5x^2-4 in A081071 and sqrt(5x^2-4) in A002878. - Benoit Cloitre, Apr 07 2002
a(0) = a(1) = 1, a(n+1) is the smallest Fibonacci number greater than the n-th partial sum. - Amarnath Murthy, Oct 21 2002
The fractional part of tau*a(n) decreases monotonically to zero. - Benoit Cloitre, Feb 01 2003
Numbers k such that floor(phi^2*k^2) - floor(phi*k)^2 = 1 where phi=(1+sqrt(5))/2. - Benoit Cloitre, Mar 16 2003
Number of leftist horizontally convex polyominoes with area n+1.
Number of 31-avoiding words of length n on alphabet {1,2,3} which do not end in 3. (E.g., at n=3, we have 111, 112, 121, 122, 132, 211, 212, 221, 222, 232, 321, 322 and 332.) See A028859. - Jon Perry, Aug 04 2003
Appears to give all solutions > 1 to the equation: x^2 = ceiling(x*r*floor(x/r)) where r=phi=(1+sqrt(5))/2. - Benoit Cloitre, Feb 24 2004
a(1) = 1, a(2) = 2, then the least number such that the square of any term is just less than the geometric mean of its neighbors. a(n+1)*a(n-1) > a(n)^2. - Amarnath Murthy, Apr 06 2004
All positive integer solutions of Pell equation b(n)^2 - 5*a(n+1)^2 = -4 together with b(n)=A002878(n), n >= 0. - Wolfdieter Lang, Aug 31 2004
Essentially same as Pisot sequence E(2,5).
Number of permutations of [n+1] avoiding 321 and 3412. E.g., a(3) = 13 because the permutations of [4] avoiding 321 and 3412 are 1234, 2134, 1324, 1243, 3124, 2314, 2143, 1423, 1342, 4123, 3142, 2413, 2341. - Bridget Tenner, Aug 15 2005
Number of 1324-avoiding circular permutations on [n+1].
A subset of the Markoff numbers (A002559). - Robert G. Wilson v, Oct 05 2005
(x,y) = (a(n), a(n+1)) are the solutions of x/(yz) + y/(xz) + z/(xy) = 3 with z=1. - Floor van Lamoen, Nov 29 2001
Number of (s(0), s(1), ..., s(2n)) such that 0 < s(i) < 5 and |s(i) - s(i-1)| = 1 for i = 1,2,...,2n, s(0) = 1, s(2n) = 1. - Herbert Kociemba, Jun 10 2004
With interpolated zeros, counts closed walks of length n at the start or end node of P_4. a(n) counts closed walks of length 2n at the start or end node of P_4. The sequence 0,1,0,2,0,5,... counts walks of length n between the start and second node of P_4. - Paul Barry, Jan 26 2005
a(n) is the number of ordered trees on n edges containing exactly one non-leaf vertex all of whose children are leaves (every ordered tree must contain at least one such vertex). For example, a(0) = 1 because the root of the tree with no edges is not considered to be a leaf and the condition "all children are leaves" is vacuously satisfied by the root and a(4) = 13 counts all 14 ordered trees on 4 edges (A000108) except (ignore dots)
|..|
.\/.
which has two such vertices. - David Callan, Mar 02 2005
Number of directed column-convex polyominoes of area n. Example: a(2)=2 because we have the 1 X 2 and the 2 X 1 rectangles. - Emeric Deutsch, Jul 31 2006
Same as the number of Kekulé structures in polyphenanthrene in terms of the number of hexagons in extended (1,1)-nanotubes. See Table 1 on page 411 of I. Lukovits and D. Janezic. - Parthasarathy Nambi, Aug 22 2006
Number of free generators of degree n of symmetric polynomials in 3-noncommuting variables. - Mike Zabrocki, Oct 24 2006
Inverse: With phi = (sqrt(5) + 1)/2, log_phi((sqrt(5)*a(n) + sqrt(5*a(n)^2 - 4))/2) = n for n >= 1. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007
Consider a teacher who teaches one student, then he finds he can teach two students while the original student learns to teach a student. And so on with every generation an individual can teach one more student then he could before. a(n) starting at a(2) gives the total number of new students/teachers (see program). - Ben Paul Thurston, Apr 11 2007
The Diophantine equation a(n)=m has a solution (for m >= 1) iff ceiling(arcsinh(sqrt(5)*m/2)/log(phi)) != ceiling(arccosh(sqrt(5)*m/2)/log(phi)) where phi is the golden ratio. An equivalent condition is A130255(m)=A130256(m). - Hieronymus Fischer, May 24 2007
a(n+1) = B^(n)(1), n >= 0, with compositions of Wythoff's complementary A(n):=A000201(n) and B(n)=A001950(n) sequences. See the W. Lang link under A135817 for the Wythoff representation of numbers (with A as 1 and B as 0 and the argument 1 omitted). E.g., 2=`0`, 5=`00`, 13=`000`, ..., in Wythoff code.
Bisection of the Fibonacci sequence into odd-indexed nonzero terms (1, 2, 5, 13, ...) and even-indexed terms (1, 3, 8, 21, ...) may be represented as row sums of companion triangles A140068 and A140069. - Gary W. Adamson, May 04 2008
a(n) is the number of partitions pi of [n] (in standard increasing form) such that Flatten[pi] is a (2-1-3)-avoiding permutation. Example: a(4)=13 counts all 15 partitions of [4] except 13/24 and 13/2/4. Here "standard increasing form" means the entries are increasing in each block and the blocks are arranged in increasing order of their first entries. Also number that avoid 3-1-2. - David Callan, Jul 22 2008
Let P be the partial sum operator, A000012: (1; 1,1; 1,1,1; ...) and A153463 = M, the partial sum & shift operator. It appears that beginning with any randomly taken sequence S(n), iterates of the operations M * S(n), -> M * ANS, -> P * ANS, etc. (or starting with P) will rapidly converge upon a two-sequence limit cycle of (1, 2, 5, 13, 34, ...) and (1, 1, 3, 8, 21, ...). - Gary W. Adamson, Dec 27 2008
Number of musical compositions of Rhythm-music over a time period of n-1 units. Example: a(4)=13; indeed, denoting by R a rest over a time period of 1 unit and by N[j] a note over a period of j units, we have (writing N for N[1]): NNN, NNR, NRN, RNN, NRR, RNR, RRN, RRR, N[2]R, RN[2], NN[2], N[2]N, N[3] (see the J. Groh reference, pp. 43-48). - Juergen K. Groh (juergen.groh(AT)lhsystems.com), Jan 17 2010
Given an infinite lower triangular matrix M with (1, 2, 3, ...) in every column but the leftmost column shifted upwards one row. Then (1, 2, 5, ...) = lim_{n->infinity} M^n. (Cf. A144257.) - Gary W. Adamson, Feb 18 2010
As a fraction: 8/71 = 0.112676 or 98/9701 = 0.010102051334... (fraction 9/71 or 99/9701 for sequence without initial term). 19/71 or 199/9701 for sequence in reverse. - Mark Dols, May 18 2010
For n >= 1, a(n) is the number of compositions (ordered integer partitions) of 2n-1 into an odd number of odd parts. O.g.f.: (x-x^3)/(1-3x^2+x^4) = A(A(x)) where A(x) = 1/(1-x)-1/(1-x^2).
For n > 0, determinant of the n X n tridiagonal matrix with 1's in the super and subdiagonals, (1,3,3,3,...) in the main diagonal, and the rest zeros. - Gary W. Adamson, Jun 27 2011
The Gi3 sums, see A180662, of the triangles A108299 and A065941 equal the terms of this sequence without a(0). - Johannes W. Meijer, Aug 14 2011
The number of permutations for which length equals reflection length. - Bridget Tenner, Feb 22 2012
Number of nonisomorphic graded posets with 0 and 1 and uniform Hasse graph of rank n+1, with exactly 2 elements of each rank between 0 and 1. (Uniform used in the sense of Retakh, Serconek and Wilson. Graded used in R. Stanley's sense that all maximal chains have the same length.)
HANKEL transform of sequence and the sequence omitting a(0) is the sequence A019590(n). This is the unique sequence with that property. - Michael Somos, May 03 2012
The number of Dyck paths of length 2n and height at most 3. - Ira M. Gessel, Aug 06 2012
Pisano period lengths: 1, 3, 4, 3, 10, 12, 8, 6, 12, 30, 5, 12, 14, 24, 20, 12, 18, 12, 9, 30, ... - R. J. Mathar, Aug 10 2012
Primes in the sequence are 2, 5, 13, 89, 233, 1597, 28657, ... (apparently A005478 without the 3). - R. J. Mathar, May 09 2013
a(n+1) is the sum of rising diagonal of the Pascal triangle written as a square - cf. comments in A085812. E.g., 13 = 1+5+6+1. - John Molokach, Sep 26 2013
a(n) is the top left entry of the n-th power of any of the 3 X 3 matrices [1, 1, 1; 1, 1, 1; 0, 1, 1] or [1, 1, 1; 0, 1, 1; 1, 1, 1] or [1, 1, 0; 1, 1, 1; 1, 1, 1] or [1, 0, 1; 1, 1, 1; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
Except for the initial term, positive values of x (or y) satisfying x^2 - 3xy + y^2 + 1 = 0. - Colin Barker, Feb 04 2014
Except for the initial term, positive values of x (or y) satisfying x^2 - 18xy + y^2 + 64 = 0. - Colin Barker, Feb 16 2014
Positive values of x such that there is a y satisfying x^2 - xy - y^2 - 1 = 0. - Ralf Stephan, Jun 30 2014
a(n) is also the number of permutations simultaneously avoiding 231, 312 and 321 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. See A245904 for more information on increasing strict binary trees. - Manda Riehl, Aug 07 2014
(1, a(n), a(n+1)), n >= 0, are Markoff triples (see A002559 and Robert G. Wilson v's Oct 05 2005 comment). In the Markoff tree they give one of the outer branches. Proof: a(n)*a(n+1) - 1 = A001906(2*n)^2 = (a(n+1) - a(n))^2 = a(n)^2 + a(n+1)^2 - 2*a(n)*a(n+1), thus 1^2 + a(n)^2 + a(n+1)^2 = 3*a(n)*a(n+1). - Wolfdieter Lang, Jan 30 2015
For n > 0, a(n) is the smallest positive integer not already in the sequence such that a(1) + a(2) + ... + a(n) is a Fibonacci number. - Derek Orr, Jun 01 2015
Number of vertices of degree n-2 (n >= 3) in all Fibonacci cubes, see Klavzar, Mollard, & Petkovsek. - Emeric Deutsch, Jun 22 2015
Except for the first term, this sequence can be generated by Corollary 1 (ii) of Azarian's paper in the references for this sequence. - Mohammad K. Azarian, Jul 02 2015
Precisely the numbers F(n)^k + F(n+1)^k that are also Fibonacci numbers with k > 1, see Luca & Oyono. - Charles R Greathouse IV, Aug 06 2015
a(n) = MA(n) - 2*(-1)^n where MA(n) is exactly the maximum area of a quadrilateral with lengths of sides in order L(n-2), L(n-2), F(n+1), F(n+1) for n > 1 and L(n)=A000032(n). - J. M. Bergot, Jan 28 2016
a(n) is the number of bargraphs of semiperimeter n+1 having no valleys (i.e., convex bargraphs). Equivalently, number of bargraphs of semiperimeter n+1 having exactly 1 peak. Example: a(5) = 34 because among the 35 (=A082582(6)) bargraphs of semiperimeter 6 only the one corresponding to the composition [2,1,2] has a valley. - Emeric Deutsch, Aug 12 2016
Integers k such that the fractional part of k*phi is less than 1/k. See Byszewski link p. 2. - Michel Marcus, Dec 10 2016
Number of words of length n-1 over {0,1,2,3} in which binary subwords appear in the form 10...0. - Milan Janjic, Jan 25 2017
With a(0) = 0 this is the Riordan transform with the Riordan matrix A097805 (of the associated type) of the Fibonacci sequence A000045. See a Feb 17 2017 comment on A097805. - Wolfdieter Lang, Feb 17 2017
Number of sequences (e(1), ..., e(n)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) < e(j) < e(k). [Martinez and Savage, 2.12] - Eric M. Schmidt, Jul 17 2017
Number of permutations of [n] that avoid the patterns 321 and 2341. - Colin Defant, May 11 2018
The sequence solves the following problem: find all the pairs (i,j) such that i divides 1+j^2 and j divides 1+i^2. In fact, the pairs (a(n), a(n+1)), n > 0, are all the solutions. - Tomohiro Yamada, Dec 23 2018
Number of permutations in S_n whose principal order ideals in the Bruhat order are lattices (equivalently, modular, distributive, Boolean lattices). - Bridget Tenner, Jan 16 2020
From Wolfdieter Lang, Mar 30 2020: (Start)
a(n) is the upper left entry of the n-th power of the 2 X 2 tridiagonal matrix M_2 = Matrix([1,1], [1,2]) from A322602: a(n) = ((M_2)^n)[1,1].
Proof: (M_2)^2 = 3*M + 1_2 (with the 2 X 2 unit matrix 1_2) from the characteristic polynomial of M_2 (see a comment in A322602) and the Cayley-Hamilton theorem. The recurrence M^n = M*M^(n-1) leads to (M_n)^n = S(n, 3)*1_2 + S(n-a, 3)*(M - 3*1_2), for n >= 0, with S(n, 3) = F(2(n+1)) = A001906(n+1). Hence ((M_2)^n)[1,1] = S(n, 3) - 2*S(n-1, 3) = a(n) = F(2*n-1) = (1/(2*r+1))*r^(2*n-1)*(1 + (1/r^2)^(2*n-1)), with r = rho(5) = A001622 (golden ratio) (see the first Aug 31 2004 formula, using the recurrence of S(n, 3), and the Michael Somos Oct 28 2002 formula). This proves a conjecture of Gary W. Adamson in A322602.
The ratio a(n)/a(n-1) converges to r^2 = rho(5)^2 = A104457 for n -> infinity (see the a(n) formula in terms of r), which is one of the statements by Gary W. Adamson in A322602. (End)
a(n) is the number of ways to stack coins with a bottom row of n coins such that any coin not on the bottom row touches exactly two coins in the row below, and all the coins on any row are contiguous [Wilf, 2.12]. - Greg Dresden, Jun 29 2020
a(n) is the upper left entry of the (2*n)-th power of the 4 X 4 Jacobi matrix L with L(i,j)=1 if |i-j| = 1 and L(i,j)=0 otherwise. - Michael Shmoish, Aug 29 2020
All positive solutions of the indefinite binary quadratic F(1, -3, 1) := x^2 - 3*x*y + y^2, of discriminant 5, representing -1 (special Markov triples (1, y=x, z=y) if y <= z) are [x(n), y(n)] = [abs(F(2*n+1)), abs(F(2*n-1))], for n = -infinity..+infinity. (F(-n) = (-1)^(n+1)*F(n)). There is only this single family of proper solutions, and there are no improper solutions. [See also the Floor van Lamoen Nov 29 2001 comment, which uses this negative n, and my Jan 30 2015 comment.] - Wolfdieter Lang, Sep 23 2020
These are the denominators of the lower convergents to the golden ratio, tau; they are also the numerators of the upper convergents (viz. 1/1 < 3/2 < 8/5 < 21/13 < ... < tau < ... 13/8 < 5/3 < 2/1). - Clark Kimberling, Jan 02 2022
a(n+1) is the number of subgraphs of the path graph on n vertices. - Leen Droogendijk, Jun 17 2023
For n > 4, a(n+2) is the number of ways to tile this 3 x n "double-box" shape with squares and dominos (reflections or rotations are counted as distinct tilings). The double-box shape is made up of two horizontal strips of length n, connected by three vertical columns of length 3, and the center column can be located anywhere not touching the two outside columns.
_ _ _ _
|||_|||_|||_|||_|||
|| _ |_| _ _ ||
|||_|||_|||_|||_|||. - Greg Dresden and Ruishan Wu, Aug 25 2024
a(n+1) is the number of integer sequences a_1, ..., a_n such that for any number 1 <= k <= n, (a_1 + ... + a_k)^2 = a_1^3 + ... + a_k^3. - Yifan Xie, Dec 07 2024

Examples

			a(3) = 13: there are 14 ordered trees with 4 edges; all of them, except for the path with 4 edges, have height at most 3.
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 13,15.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 188.
  • N. G. de Bruijn, D. E. Knuth, and S. O. Rice, The average height of planted plane trees, in: Graph Theory and Computing (ed. T. C. Read), Academic Press, New York, 1972, pp. 15-22.
  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
  • Jurgen Groh, Computerimprovisation mit Markoffketten und "kognitiven Algorithmen", Studienarbeit, Technische Hochschule Darmstadt, 1987.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 39.
  • 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).
  • R. Stanley, Enumerative combinatorics, Vol. 1. Cambridge University Press, Cambridge, 1997, pp. 96-100.
  • H. S. Wilf, Generatingfunctionology, 3rd ed., A K Peters Ltd., Wellesley, MA, 2006, p. 41.

Crossrefs

Fibonacci A000045 = union of this sequence and A001906.
a(n)= A060920(n, 0).
Row 3 of array A094954.
Equals A001654(n+1) - A001654(n-1), n > 0.
A122367 is another version. Inverse sequences A130255 and A130256. Row sums of A140068, A152251, A153342, A179806, A179745, A213948.

Programs

  • GAP
    a:=[1,1];; for n in [3..10^2] do a[n]:=3*a[n-1]-a[n-2]; od; a; # Muniru A Asiru, Sep 27 2017
  • Haskell
    a001519 n = a001519_list !! n
    a001519_list = 1 : zipWith (-) (tail a001906_list) a001906_list
    -- Reinhard Zumkeller, Jan 11 2012
    a001519_list = 1 : f a000045_list where f (_:x:xs) = x : f xs
    -- Reinhard Zumkeller, Aug 09 2013
    
  • Magma
    [1] cat [(Lucas(2*n) - Fibonacci(2*n))/2: n in [1..50]]; // Vincenzo Librandi, Jul 02 2014
    
  • Maple
    A001519:=-(-1+z)/(1-3*z+z**2); # Simon Plouffe in his 1992 dissertation; gives sequence without an initial 1
    A001519 := proc(n) option remember: if n=0 then 1 elif n=1 then 1 elif n>=2 then 3*procname(n-1)-procname(n-2) fi: end: seq(A001519(n), n=0..28); # Johannes W. Meijer, Aug 14 2011
  • Mathematica
    Fibonacci /@ (2Range[29] - 1) (* Robert G. Wilson v, Oct 05 2005 *)
    LinearRecurrence[{3, -1}, {1, 1}, 29] (* Robert G. Wilson v, Jun 28 2012 *)
    a[ n_] := With[{c = Sqrt[5]/2}, ChebyshevT[2 n - 1, c]/c]; (* Michael Somos, Jul 08 2014 *)
    CoefficientList[ Series[(1 - 2x)/(1 - 3x + x^2), {x, 0, 30}], x] (* Robert G. Wilson v, Feb 01 2015 *)
  • Maxima
    a[0]:1$ a[1]:1$ a[n]:=3*a[n-1]-a[n-2]$ makelist(a[n],n,0,30); /* Martin Ettl, Nov 15 2012 */
    
  • PARI
    {a(n) = fibonacci(2*n - 1)}; /* Michael Somos, Jul 19 2003 */
    
  • PARI
    {a(n) = real( quadgen(5) ^ (2*n))}; /* Michael Somos, Jul 19 2003 */
    
  • PARI
    {a(n) = subst( poltchebi(n) + poltchebi(n - 1), x, 3/2) * 2/5}; /* Michael Somos, Jul 19 2003 */
    
  • Sage
    [lucas_number1(n,3,1)-lucas_number1(n-1,3,1) for n in range(30)] # Zerinvary Lajos, Apr 29 2009
    

Formula

G.f.: (1-2*x)/(1-3*x+x^2).
G.f.: 1 / (1 - x / (1 - x / (1 - x))). - Michael Somos, May 03 2012
a(n) = A001906(n+1) - 2*A001906(n).
a(n) = a(1-n) for all n in Z.
a(n+2) = (a(n+1)^2+1)/a(n) with a(1)=1, a(2)=2. - Benoit Cloitre, Aug 29 2002
a(n) = (phi^(2*n-1) + phi^(1-2*n))/sqrt(5) where phi=(1+sqrt(5))/2. - Michael Somos, Oct 28 2002
a(n) = A007598(n-1) + A007598(n) = A000045(n-1)^2 + A000045(n)^2 = F(n)^2 + F(n+1)^2. - Henry Bottomley, Feb 09 2001
a(n) = Sum_{k=0..n} binomial(n+k, 2*k). - Len Smiley, Dec 09 2001
a(n) ~ (1/5)*sqrt(5)*phi^(2*n+1). - Joe Keane (jgk(AT)jgk.org), May 15 2002
a(n) = Sum_{k=0..n} C(n, k)*F(k+1). - Benoit Cloitre, Sep 03 2002
Let q(n, x) = Sum_{i=0..n} x^(n-i)*binomial(2*n-i, i); then q(n, 1)=a(n) (this comment is essentially the same as that of L. Smiley). - Benoit Cloitre, Nov 10 2002
a(n) = (1/2)*(3*a(n-1) + sqrt(5*a(n-1)^2-4)). - Benoit Cloitre, Apr 12 2003
Main diagonal of array defined by T(i, 1) = T(1, j) = 1, T(i, j) = max(T(i-1, j) + T(i-1, j-1); T(i-1, j-1) + T(i, j-1)). - Benoit Cloitre, Aug 05 2003
Hankel transform of A002212. E.g., Det([1, 1, 3;1, 3, 10;3, 10, 36]) = 5. - Philippe Deléham, Jan 25 2004
Solutions x > 0 to equation floor(x*r*floor(x/r)) = floor(x/r*floor(x*r)) when r=phi. - Benoit Cloitre, Feb 15 2004
a(n) = Sum_{i=0..n} binomial(n+i, n-i). - Jon Perry, Mar 08 2004
a(n) = S(n-1, 3) - S(n-2, 3) = T(2*n-1, sqrt(5)/2)/(sqrt(5)/2) with S(n, x) = U(n, x/2), resp. T(n, x), Chebyshev's polynomials of the second, resp. first kind. See triangle A049310, resp. A053120. - Wolfdieter Lang, Aug 31 2004
a(n) = ((-1)^(n-1))*S(2*(n-1), i), with the imaginary unit i and S(n, x) = U(n, x/2) Chebyshev's polynomials of the second kind, A049310. - Wolfdieter Lang, Aug 31 2004
a(n) = Sum_{0<=i_1<=i_2<=n} binomial(i_2, i_1)*binomial(n, i_1+i_2). - Benoit Cloitre, Oct 14 2004
a(n) = L(n,3), where L is defined as in A108299; see also A002878 for L(n,-3). - Reinhard Zumkeller, Jun 01 2005
a(n) = a(n-1) + Sum_{i=0..n-1} a(i)*a(n) = F(2*n+1)*Sum_{i=0..n-1} a(i) = F(2*n). - Andras Erszegi (erszegi.andras(AT)chello.hu), Jun 28 2005
The i-th term of the sequence is the entry (1, 1) of the i-th power of the 2 X 2 matrix M = ((1, 1), (1, 2)). - Simone Severini, Oct 15 2005
a(n-1) = (1/n)*Sum_{k=0..n} B(2*k)*F(2*n-2*k)*binomial(2*n, 2*k) where B(2*k) is the (2*k)-th Bernoulli number. - Benoit Cloitre, Nov 02 2005
a(n) = A055105(n,1) + A055105(n,2) + A055105(n,3) = A055106(n,1) + A055106(n,2). - Mike Zabrocki, Oct 24 2006
a(n) = (2/sqrt(5))*cosh((2n-1)*psi), where psi=log(phi) and phi=(1+sqrt(5))/2. - Hieronymus Fischer, Apr 24 2007
a(n) = (phi+1)^n - phi*A001906(n) with phi=(1+sqrt(5))/2. - Reinhard Zumkeller, Nov 22 2007
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3); a(n) = ((sqrt(5) + 5)/10)*(3/2 + sqrt(5)/2)^(n-2) + ((-sqrt(5) + 5)/10)*(3/2 - sqrt(5)/2)^(n-2). - Antonio Alberto Olivares, Mar 21 2008
a(n) = A147703(n,0). - Philippe Deléham, Nov 29 2008
Sum_{n>=0} atan(1/a(n)) = (3/4)*Pi. - Jaume Oliver Lafont, Feb 27 2009
With X,Y defined as X = ( F(n) F(n+1) ), Y = ( F(n+2) F(n+3) ), where F(n) is the n-th Fibonacci number (A000045), it follows a(n+2) = X.Y', where Y' is the transpose of Y (n >= 0). - K.V.Iyer, Apr 24 2009
From Gary Detlefs, Nov 22 2010: (Start)
a(n) = Fibonacci(2*n+2) mod Fibonacci(2*n), n > 1.
a(n) = (Fibonacci(n-1)^2 + Fibonacci(n)^2 + Fibonacci(2*n-1))/2. (End)
INVERT transform is A166444. First difference is A001906. Partial sums is A055588. Binomial transform is A093129. Binomial transform of A000045(n-1). - Michael Somos, May 03 2012
a(n) = 2^n*f(n;1/2), where f(n;d), n=0,1,...,d, denote the so-called delta-Fibonacci numbers (see Witula et al. papers and comments in A000045). - Roman Witula, Jul 12 2012
a(n) = (Fibonacci(n+2)^2 + Fibonacci(n-3)^2)/5. - Gary Detlefs, Dec 14 2012
G.f.: 1 + x/( Q(0) - x ) where Q(k) = 1 - x/(x*k + 1 )/Q(k+1); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 23 2013
G.f.: (1-2*x)*G(0)/(2-3*x), where G(k) = 1 + 1/( 1 - x*(5*k-9)/(x*(5*k-4) - 6/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 19 2013
G.f.: 1 + x*(1-x^2)*Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 + 2*x - x^2)/( x*(4*k+4 + 2*x - x^2 ) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 11 2013
G.f.: Q(0,u), where u=x/(1-x), Q(k,u) = 1 + u^2 + (k+2)*u - u*(k+1 + u)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
Sum_{n>=2} 1/(a(n) - 1/a(n)) = 1. Compare with A001906, A007805 and A097843. - Peter Bala, Nov 29 2013
Let F(n) be the n-th Fibonacci number, A000045(n), and L(n) be the n-th Lucas number, A000032(n). Then for n > 0, a(n) = F(n)*L(n-1) + (-1)^n. - Charlie Marion, Jan 01 2014
a(n) = A238731(n,0). - Philippe Deléham, Mar 05 2014
1 = a(n)*a(n+2) - a(n+1)*a(n+1) for all n in Z. - Michael Somos, Jul 08 2014
a(n) = (L(2*n+4) + L(2*n-6))/25 for L(n)=A000032(n). - J. M. Bergot, Dec 30 2014
a(n) = (L(n-1)^2 + L(n)^2)/5 with L(n)=A000032(n). - J. M. Bergot, Dec 31 2014
a(n) = (L(n-2)^2 + L(n+1)^2)/10 with L(n)=A000032(n). - J. M. Bergot, Oct 23 2015
a(n) = 3*F(n-1)^2 + F(n-3)*F(n) - 2*(-1)^n. - J. M. Bergot, Feb 17 2016
a(n) = (F(n-1)*L(n) + F(n)*L(n-1))/2 = (A081714(n-1) + A128534(n))/2. - J. M. Bergot, Mar 22 2016
E.g.f.: (2*exp(sqrt(5)*x) + 3 + sqrt(5))*exp(-x*(sqrt(5)-3)/2)/(5 + sqrt(5)). - Ilya Gutkovskiy, Jul 04 2016
a(n) = ((M_2)^n)[1,1] = S(n, 3) - 2*S(n-1, 3), with the 2 X 2 tridiagonal matrix M_2 = Matrix([1,1], [1,2]) from A322602. For a proof see the Mar 30 2020 comment above. - Wolfdieter Lang, Mar 30 2020
Sum_{n>=1} 1/a(n) = A153387. - Amiram Eldar, Oct 05 2020
a(n+1) = Product_{k=1..n} (1 + 4*cos(2*Pi*k/(2*n + 1))^2). Special case of A099390. - Greg Dresden, Oct 16 2021
a(n+1) = 4^(n+1)*Sum_{k >= n} binomial(2*k,2*n)*(1/5)^(k+1). Cf. A102591. - Peter Bala, Nov 29 2021
a(n) = cosh((2*n-1)*arcsinh(1/2))/sqrt(5/4). - Peter Luschny, May 21 2022
From J. M. Bergot, May 27 2022: (Start)
a(n) = F(n-1)*L(n) - (-1)^n where L(n)=A000032(n) and F(n)=A000045(n).
a(n) = (L(n-1)^2 + L(n-1)*L(n+1))/5 + (-1)^n.
a(n) = 2*(area of a triangle with vertices at (L(n-2), L(n-1)), (F(n), F(n-1)), (L(n), L(n+1))) + 5*(-1)^n for n > 2. (End)
a(n) = A059929(n-1)+A059929(n-2), n>1. - R. J. Mathar, Jul 09 2024

Extensions

Entry revised by N. J. A. Sloane, Aug 24 2006, May 13 2008

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

A080040 a(n) = 2*a(n-1) + 2*a(n-2) for n > 1; a(0)=2, a(1)=2.

Original entry on oeis.org

2, 2, 8, 20, 56, 152, 416, 1136, 3104, 8480, 23168, 63296, 172928, 472448, 1290752, 3526400, 9634304, 26321408, 71911424, 196465664, 536754176, 1466439680, 4006387712, 10945654784, 29904084992, 81699479552, 223207129088, 609813217280, 1666040692736, 4551707820032
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Jan 21 2003

Keywords

Comments

The Lucas sequence V_n(2,-2). - Jud McCranie, Mar 02 2012
The signed version 2, -2, 8, -20, 56, -152, 416, -1136, 3104, -8480, 23168, ... is the Lucas sequence V(-2,-2). - R. J. Mathar, Jan 08 2013
After a(2) equals round((1+sqrt(3))^n) = 1, 3, 7, 20, 56, 152, ... - Jeremy Gardiner, Aug 11 2013
Also the number of independent vertex sets and vertex covers in the n-sunlet graph. - Eric W. Weisstein, Sep 27 2017

Crossrefs

Programs

  • Haskell
    a080040 n = a080040_list !! n
    a080040_list =
       2 : 2 : map (* 2) (zipWith (+) a080040_list (tail a080040_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Magma
    a:=[2,2]; [n le 2 select a[n] else 2*Self(n-1) + 2*Self(n-2):n in [1..27]]; Marius A. Burtea, Jan 20 2020
    
  • Magma
    R:=PowerSeriesRing(Rationals(), 27); Coefficients(R!( (2-2*x)/(1-2*x-2*x^2))); // Marius A. Burtea, Jan 20 2020
  • Mathematica
    CoefficientList[Series[(2 - 2 t)/(1 - 2 t - 2 t^2), {t, 0, 30}], t]
    With[{c = {2, 2}}, LinearRecurrence[c, c, 20]] (* Harvey P. Dale, Apr 24 2016 *)
    Round @ Table[LucasL[n, Sqrt[2]] 2^(n/2), {n, 0, 20}] (* Vladimir Reshetnikov, Sep 15 2016 *)
    Table[(1 - Sqrt[3])^n + (1 + Sqrt[3])^n, {n, 0, 20}] // Expand (* Eric W. Weisstein, Sep 27 2017 *)
  • PARI
    a(n)=([0,1; 2,2]^n*[2;2])[1,1] \\ Charles R Greathouse IV, Apr 08 2016
    
  • Sage
    from sage.combinat.sloane_functions import recur_gen2b; it = recur_gen2b(2,2,2,2, lambda n: 0); [next(it) for i in range(27)] # Zerinvary Lajos, Jul 16 2008
    
  • Sage
    [lucas_number2(n,2,-2) for n in range(0, 27)] # Zerinvary Lajos, Apr 30 2009
    

Formula

G.f.: (2-2*x)/(1-2*x-2*x^2).
a(n) = (1+sqrt(3))^n + (1-sqrt(3))^n.
a(n) = 2*A026150(n). - Philippe Deléham, Nov 19 2008
G.f.: G(0), where G(k) = 1 + 1/(1 - x*(3*k-1)/(x*(3*k+2) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 11 2013
a(n) = 2*2^floor(n/2)*A002531(n). - Ralf Stephan, Sep 08 2013
a(n) = [x^n] ( 1 + x + sqrt(1 + 2*x + 3*x^2) )^n for n >= 1. - Peter Bala, Jun 29 2015
E.g.f.: 2*exp(x)*cosh(sqrt(3)*x). - Stefano Spezia, Mar 02 2024

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

A086347 On a 3 X 3 board, number of n-move routes of chess king ending in a given side square.

Original entry on oeis.org

1, 5, 24, 116, 560, 2704, 13056, 63040, 304384, 1469696, 7096320, 34264064, 165441536, 798822400, 3857055744, 18623512576, 89922273280, 434183143424, 2096421666816, 10122419240960, 48875363631104, 235991131488256, 1139465980477440, 5501828447862784
Offset: 0

Views

Author

Zak Seidov, Jul 17 2003

Keywords

Comments

Number of aa-avoiding words of length n on alphabet {a,b,c,d,e}. - Tanya Khovanova, Jan 11 2007
Binomial transform of A164589 and second binomial transform of A096886. [Al Hakanson (hawkuu(AT)gmail.com), Aug 17 2009]
From Johannes W. Meijer, Aug 01 2010: (Start)
The a(n) represent the number of n-move paths of a chess king on a 3 X 3 board that end or start in a given side square m (m = 2, 4, 6, 8).
Inverse binomial transform of A001109 (without the leading 0).
(End)
Number of independent vertex subsets of the graph obtained by attaching two pendant edges to each vertex of the path graph P_n (see A235116). Example: a(1)=5; indeed, P_1 is the one-vertex graph and after attaching two pendant vertices we obtain the path graph ABC; the independent vertex subsets are: empty, {A}, {B}, {C}, and {A,C}.
Number of simple paths from corner to diagonally opposite corner on a 2 X n grid with king moves allowed. - Andrew Howroyd, Nov 06 2019
Number of 4-compositions of n+1 restricted to parts 1 and 2 (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020

Examples

			a(3) = 116 = 5^3 - 9 (aaa, aab, aac, aad, aae, baa, caa, daa, eaa). [Al Hakanson (hawkuu(AT)gmail.com), Aug 17 2009]
		

Crossrefs

Row 2 of A329118.
Row sums of A235113.
Cf. A028859.
Cf. A126473. - Johannes W. Meijer, Aug 01 2010

Programs

  • Maple
    with(LinearAlgebra): nmax:=19; m:=2; A[5]:= [1,1,1,1,0,1,1,1,1]: A:=Matrix([[0,1,0,1,1,0,0,0,0],[1,0,1,1,1,1,0,0,0],[0,1,0,0,1,1,0,0,0],[1,1,0,0,1,0,1,1,0],A[5],[0,1,1,0,1,0,0,1,1],[0,0,0,1,1,0,0,1,0],[0,0,0,1,1,1,1,0,1],[0,0,0,0,1,1,0,1,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax); # Johannes W. Meijer, Aug 01 2010
    # second Maple program:
    a:= n-> (<<0|1>, <4|4>>^n. <<1, 5>>)[1,1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Oct 12 2022
  • Mathematica
    Table[(Sqrt[2]/32)((2+Sqrt[8])^(n+2)-(2-Sqrt[8])^(n+2)), {n, 0, 19}]

Formula

a(n) = (sqrt(2)/32)*((2+sqrt(8))^(n+2)-(2-sqrt(8))^(n+2)).
From Ralf Stephan, Feb 01 2004: (Start)
G.f.: (1+x)/(1-4*x-4*x^2).
a(n) = A057087(n) + A057087(n-1). (End)
a(n) = 4*a(n-1) + 4*a(n-2). - Tanya Khovanova, Jan 11 2007
Limit_{k->oo} a(n+k)/a(k) = A084128(n) + 2*A057087(n-1)*sqrt(2). - Johannes W. Meijer, Aug 01 2010
E.g.f.: exp(2*x)*(4*cosh(2*sqrt(2)*x) + 3*sqrt(2)*sinh(2*sqrt(2)*x))/4. - Stefano Spezia, Mar 17 2025

Extensions

Offset changed and edited by Johannes W. Meijer, Jul 15 2010

A214992 Power ceiling-floor sequence of (golden ratio)^4.

Original entry on oeis.org

7, 47, 323, 2213, 15169, 103969, 712615, 4884335, 33477731, 229459781, 1572740737, 10779725377, 73885336903, 506417632943, 3471038093699, 23790849022949, 163064905066945, 1117663486445665, 7660579500052711
Offset: 0

Views

Author

Clark Kimberling, Nov 08 2012, Jan 24 2013

Keywords

Comments

Let f = floor and c = ceiling. For x > 1, define four sequences as functions of x, as follows:
p1(0) = f(x), p1(n) = f(x*p1(n-1));
p2(0) = f(x), p2(n) = c(x*p2(n-1)) if n is odd and p2(n) = f(x*p1(n-1)) if n is even;
p3(0) = c(x), p3(n) = f(x*p3(n-1)) if n is odd and p3(n) = c(x*p3(n-1)) if n is even;
p4(0) = c(x), p4(n) = c(x*p4(n-1)).
The present sequence is given by a(n) = p3(n).
Following the terminology at A214986, call the four sequences power floor, power floor-ceiling, power ceiling-floor, and power ceiling sequences. In the table below, a sequence is identified with an A-numbered sequence if they appear to agree except possibly for initial terms. Notation: S(t)=sqrt(t), r = (1+S(5))/2 = golden ratio, and Limit = limit of p3(n)/p2(n).
x ......p1..... p2..... p3..... p4.......Limit
r^2.....A001519 A001654 A061646 A001906..-1+S(5)
r^3.....A024551 A001076 A015448 A049652..-1+S(5)
r^4.....A049685 A157335 A214992 A004187..-19+9*S(5)
r^5.....A214993 A049666 A015457 A214994...(-9+5*S(5))/2
r^6.....A007805 A156085 A214995 A049660..-151+68*S(5)
2+S(2)..A007052 A214996 A214997 A007070..(1+S(2))/2
1+S(3)..A057960 A002605 A028859 A077846..(1+S(3))/2
2+S(3)..A001835 A109437 A214998 A001353..-4+3*S(3)
S(5)....A214999 A215091 A218982 A218983..1.26879683...
2+S(5)..A024551 A001076 A015448 A049652..-1+S(5)
2+S(6)..A218984 A090017 A123347 A218985..S(3/2)
2+S(7)..A218986 A015530 A126473 A218987..(1+S(7))/3
2+S(8)..A218988 A057087 A086347 A218989..(1+S(2))/2
3+S(8)..A001653 A084158 A218990 A001109..-13+10*S(2)
3+S(10).A218991 A005668 A015451 A218992..-2+S(10)
...
Properties of p1, p2, p3, p4:
(1) If x > 2, the terms of p2 and p3 interlace: p2(0) < p3(0) < p2(1) < p3(1) < p2(2) < p3(2)... Also, p1(n) <= p2(n) <= p3(n) <= p4(n) <= p1(n+1) for all x>0 and n>=0.
(2) If x > 2, the limits L(x) = limit(p/x^n) exist for the four functions p(x), and L1(x) <= L2(x) <= L3(x) <= L4 (x). See the Mathematica programs for plots of the four functions; one of them also occurs in the Odlyzko and Wilf article, along with a discussion of the special case x = 3/2.
(3) Suppose that x = u + sqrt(v) where v is a nonsquare positive integer. If u = f(x) or u = c(x), then p1, p2, p3, p4 are linear recurrence sequences. Is this true for sequences p1, p2, p3, p4 obtained from x = (u + sqrt(v))^q for every positive integer q?
(4) Suppose that x is a Pisot-Vijayaraghavan number. Must p1, p2, p3, p4 then be linearly recurrent? If x is also a quadratic irrational b + c*sqrt(d), must the four limits L(x) be in the field Q(sqrt(d))?
(5) The Odlyzko and Wilf article (page 239) raises three interesting questions about the power ceiling function; it appears that they remain open.

Examples

			a(0) = ceiling(r) = 7, where r = ((1+sqrt(5))/2)^4 = 6.8...; a(1) = floor(7*r) = 47; a(2) = ceiling(47) = 323.
		

Crossrefs

Programs

  • Mathematica
    (* Program 1.  A214992 and related sequences *)
    x = GoldenRatio^4; z = 30; (* z = # terms in sequences *)
    z1 = 100; (* z1 = # digits in approximations *)
    f[x_] := Floor[x]; c[x_] := Ceiling[x];
    p1[0] = f[x]; p2[0] = f[x]; p3[0] = c[x]; p4[0] = c[x];
    p1[n_] := f[x*p1[n - 1]]
    p2[n_] := If[Mod[n, 2] == 1, c[x*p2[n - 1]], f[x*p2[n - 1]]]
    p3[n_] := If[Mod[n, 2] == 1, f[x*p3[n - 1]], c[x*p3[n - 1]]]
    p4[n_] := c[x*p4[n - 1]]
    Table[p1[n], {n, 0, z}]  (* A049685 *)
    Table[p2[n], {n, 0, z}]  (* A157335 *)
    Table[p3[n], {n, 0, z}]  (* A214992 *)
    Table[p4[n], {n, 0, z}]  (* A004187 *)
    Table[p4[n] - p1[n], {n, 0, z}]  (* A004187 *)
    Table[p3[n] - p2[n], {n, 0, z}]  (* A098305 *)
    (* Program 2.  Plot of power floor and power ceiling functions, p1(x) and p4(x) *)
    f[x_] := f[x] = Floor[x]; c[x_] := c[x] = Ceiling[x];
    p1[x_, 0] := f[x]; p1[x_, n_] := f[x*p1[x, n - 1]];
    p4[x_, 0] := c[x]; p4[x_, n_] := c[x*p4[x, n - 1]];
    Plot[Evaluate[{p1[x, 10]/x^10, p4[x, 10]/x^10}], {x, 2, 3}, PlotRange -> {0, 4}]
    (* Program 3. Plot of power floor-ceiling and power ceiling-floor functions, p2(x) and p3(x) *)
    f[x_] := f[x] = Floor[x]; c[x_] := c[x] = Ceiling[x];
    p2[x_, 0] := f[x]; p3[x_, 0] := c[x];
    p2[x_, n_] := If[Mod[n, 2] == 1, c[x*p2[x, n - 1]], f[x*p2[x, n - 1]]]
    p3[x_, n_] := If[Mod[n, 2] == 1, f[x*p3[x, n - 1]], c[x*p3[x, n - 1]]]
    Plot[Evaluate[{p2[x, 10]/x^10, p3[x, 10]/x^10}], {x, 2, 3}, PlotRange -> {0, 4}]

Formula

a(n) = floor(r*a(n-1)) if n is odd and a(n) = ceiling(r*a(n-1)) if n is even, where a(0) = ceiling(r), r = (golden ratio)^4 = (7 + sqrt(5))/2.
a(n) = 6*a(n-1) + 6*a(n-2) - a(n-3).
G.f.: (7 + 5*x - x^2)/((1 + x)*(1 - 7*x + x^2)).
a(n) = (10*(-2)^n+(10+3*sqrt(5))*(7-3*sqrt(5))^(n+2)+(10-3*sqrt(5))*(7+3*sqrt(5))^(n+2))/(90*2^n). - Bruno Berselli, Nov 14 2012
a(n) = 7*A157335(n) + 5*A157335(n-1) - A157335(n-2). - R. J. Mathar, Feb 05 2020
E.g.f.: exp(-x)*(5 + 2*exp(9*x/2)*(155*cosh(3*sqrt(5)*x/2) + 69*sqrt(5)*sinh(3*sqrt(5)*x/2)))/45. - Stefano Spezia, Oct 28 2024
Showing 1-10 of 38 results. Next