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 11 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

A000032 Lucas numbers beginning at 2: L(n) = L(n-1) + L(n-2), L(0) = 2, L(1) = 1.

Original entry on oeis.org

2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, 4870847, 7881196, 12752043, 20633239, 33385282, 54018521, 87403803
Offset: 0

Views

Author

N. J. A. Sloane, May 24 1994

Keywords

Comments

Cf. A000204 for Lucas numbers beginning with 1.
Also the number of independent vertex sets and vertex covers for the cycle graph C_n for n >= 2. - Eric W. Weisstein, Jan 04 2014
Also the number of matchings in the n-cycle graph C_n for n >= 3. - Eric W. Weisstein, Oct 01 2017
Also the number of maximal independent vertex sets (and maximal vertex covers) for the n-helm graph for n >= 3. - Eric W. Weisstein, May 27 2017
Also the number of maximal independent vertex sets (and maximal vertex covers) for the n-sunlet graph for n >= 3. - Eric W. Weisstein, Aug 07 2017
This is also the Horadam sequence (2, 1, 1, 1). - Ross La Haye, Aug 18 2003
For distinct primes p, q, L(p) is congruent to 1 mod p, L(2p) is congruent to 3 mod p and L(pq) is congruent 1 + q(L(q) - 1) mod p. Also, L(m) divides F(2km) and L((2k + 1)m), k, m >= 0.
a(n) = Sum_{k=0..ceiling((n - 1)/2)} P(3; n - 1 - k, k), n >= 1, with a(0) = 2. These are the sums over the SW-NE diagonals in P(3; n, k), the (3, 1) Pascal triangle A093560. Observation by Paul Barry, Apr 29 2004. Proof via recursion relations and comparison of inputs. Also SW-NE diagonal sums of the (1, 2) Pascal triangle A029635 (with T(0, 0) replaced by 2).
Suppose psi = log(phi) = A002390. We get the representation L(n) = 2*cosh(n*psi) if n is even; L(n) = 2*sinh(n*psi) if n is odd. There is a similar representation for Fibonacci numbers (A000045). Many Lucas formulas now easily follow from appropriate sinh- and cosh-formulas. For example: the identity cosh^2(x) - sinh^2(x) = 1 implies L(n)^2 - 5*F(n)^2 = 4*(-1)^n (setting x = n*psi). - Hieronymus Fischer, Apr 18 2007
From John Blythe Dobson, Oct 02 2007, Oct 11 2007: (Start)
The parity of L(n) follows easily from its definition, which shows that L(n) is even when n is a multiple of 3 and odd otherwise.
The first six multiplication formulas are:
L(2n) = L(n)^2 - 2*(-1)^n;
L(3n) = L(n)^3 - 3*(-1)^n*L(n);
L(4n) = L(n)^4 - 4*(-1)^n*L(n)^2 + 2;
L(5n) = L(n)^5 - 5*(-1)^n*L(n)^3 + 5*L(n);
L(6n) = L(n)^6 - 6*(-1)^n*L(n)^4 + 9*L(n)^2 - 2*(-1)^n.
Generally, L(n) | L(mn) if and only if m is odd.
In the expansion of L(mn), where m represents the multiplier and n the index of a known value of L(n), the absolute values of the coefficients are the terms in the m-th row of the triangle A034807. When m = 1 and n = 1, L(n) = 1 and all the terms are positive and so the row sums of A034807 are simply the Lucas numbers. (End)
From John Blythe Dobson, Nov 15 2007: (Start)
The comments submitted by Miklos Kristof on Mar 19 2007 for the Fibonacci numbers (A000045) contain four important identities that have close analogs in the Lucas numbers:
For a >= b and odd b, L(a + b) + L(a - b) = 5*F(a)*F(b).
For a >= b and even b, L(a + b) + L(a - b) = L(a)*L(b).
For a >= b and odd b, L(a + b) - L(a - b) = L(a)*L(b).
For a >= b and even b, L(a + b) - L(a - b) = 5*F(a)*F(b).
A particularly interesting instance of the difference identity for even b is L(a + 30) - L(a - 30) = 5*F(a)*832040, since 5*832040 is divisible by 100, proving that the last two digits of Lucas numbers repeat in a cycle of length 60 (see A106291(100)). (End)
From John Blythe Dobson, Nov 15 2007: (Start)
The Lucas numbers satisfy remarkable difference equations, in some cases best expressed using Fibonacci numbers, of which representative examples are the following:
L(n) - L(n - 3) = 2*L(n - 2);
L(n) - L(n - 4) = 5*F(n - 2);
L(n) - L(n - 6) = 4*L(n - 3);
L(n) - L(n - 12) = 40*F(n - 6);
L(n) - L(n - 60) = 4160200*F(n - 30).
These formulas establish, respectively, that the Lucas numbers form a cyclic residue system of length 3 (mod 2), of length 4 (mod 5), of length 6 (mod 4), of length 12 (mod 40) and of length 60 (mod 4160200). The divisibility of the last modulus by 100 accounts for the fact that the last two digits of the Lucas numbers begin to repeat at L(60).
The divisibility properties of the Lucas numbers are very complex and still not fully understood, but several important criteria are established in Zhi-Hong Sun's 2003 survey of congruences for Fibonacci numbers. (End)
Sum_{n>0} a(n)/(n*2^n) = 2*log(2). - Jaume Oliver Lafont, Oct 11 2009
A010888(a(n)) = A030133(n). - Reinhard Zumkeller, Aug 20 2011
The powers of phi, the golden ratio, approach the values of the Lucas numbers, the odd powers from above and the even powers from below. - Geoffrey Caveney, Apr 18 2014
Inverse binomial transform is (-1)^n * a(n). - Michael Somos, Jun 03 2014
Lucas numbers are invariant to the following transformation for all values of the integers j and n, including negative values, thus: L(n) = (L(j+n) + (-1)^n * L(j-n))/L(j). The same transformation applied to all sequences of the form G(n+1) = m * G(n) + G(n-1) yields Lucas numbers for m = 1, except where G(j) = 0, regardless of initial values which may be nonintegers. The corresponding sequences for other values of m are: for m = 2, 2*A001333; for m = 3, A006497; for m = 4, 2*A001077; for m = 5, A087130; for m = 6, 2*A005667; for m = 7, A086902. The invariant ones all have G(0) = 2, G(1) = m. A related family of sequences is discussed at A059100. - Richard R. Forberg, Nov 23 2014
If x=a(n), y=a(n+1), z=a(n+2), then -x^2 - z*x - 3*y*x - y^2 + y*z + z^2 = 5*(-1)^(n+1). - Alexander Samokrutov, Jul 04 2015
A conjecture on the divisibility of infinite subsequences of Lucas numbers by prime(n)^m, m >= 1, is given in A266587, together with the prime "entry points". - Richard R. Forberg, Dec 31 2015
A trapezoid has three lengths of sides in order L(n-1), L(n+1), L(n-1). For increasing n a very close approximation to the maximum area will have the fourth side equal to 2*L(n). For a trapezoid with sides L(n-1), L(n-3), L(n-1), the fourth side will be L(n). - J. M. Bergot, Mar 17 2016
Satisfies Benford's law [Brown-Duncan, 1970; Berger-Hill, 2017]. - N. J. A. Sloane, Feb 08 2017
Lucas numbers L(n) and Fibonacci numbers F(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 09 2017
For n >= 3, the Lucas number L(n) is the dimension of a commutative Hecke algebra of affine type A_n with independent parameters. See Theorem 1.4, Corollary 1.5, and the table on page 524 in the link "Hecke algebras with independent parameters". - Jia Huang, Jan 20 2019
From Klaus Purath, Apr 19 2019: (Start)
While all prime numbers appear as factors in the Fibonacci numbers, this is not the case with the Lucas numbers. For example, L(n) is never divisible by the following prime numbers < 150: 5, 13, 17, 37, 53, 61, 73, 89, 97, 109, 113, 137, 149 ... See A053028. Conjecture: Three properties can be determined for these prime numbers:
First observation: The prime factors > 3 occur in the Fibonacci numbers with an odd index.
Second observation: These are the prime numbers p congruent to 2, 3 (modulo 5), which occur both in Fibonacci(p+1) and in Fibonacci((p+1)/2) as prime factors, or the prime numbers p congruent to 1, 4 (modulo 5), which occur both in Fibonacci((p-1)/2) and in Fibonacci((p-1)/(2^k)) with k >= 2.
Third observation: The Pisano period lengths of these prime numbers, given in A001175, are always divisible by 4, but not by 8. In contrast, those of the prime factors of Lucas numbers are divisible either by 2, but not by 4, or by 8. (See also comment in A053028 by N. J. A. Sloane, Feb 21 2004). (End)
L(n) is the sum of 4*k consecutive terms of the Fibonacci sequence (A000045) divided by Fibonacci(2*k): (Sum_{i=0..4*k-1, k>=1} F(n+i))/F(2*k) = L(n+2*k+1). Sequences extended to negative indices, following the rule a(n-1) = a(n+1) - a(n). - Klaus Purath, Sep 15 2019
If one forms a sequence (A) of the Fibonacci type with the initial values A(0) = A022095(n) and A(1) = A000285(n), then A(n+1) = L(n+1)^2 always applies. - Klaus Purath, Sep 29 2019
From Kai Wang, Dec 18 2019: (Start)
L((2*m+1)k)/L(k) = Sum_{i=0..m-1} (-1)^(i*(k+1))*L((2*m-2*i)*k) + (-1)^(m*k).
Example: k=5, m=2, L(5)=11, L(10)=123, L(20)=15127, L(25)=167761. L(25)/L(5) = 15251, L(20) + L(10) + 1 = 15127 + 123 + 1 = 15251. (End)
From Peter Bala, Dec 23 2021: (Start)
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) ( mod p^k ) hold for all prime p and positive integers n and k.
For a positive integer k, the sequence (a(n))n>=1 taken modulo k becomes a purely periodic sequence. For example, taken modulo 11, the sequence becomes [1, 3, 4, 7, 0, 7, 7, 3, 10, 2, 1, 3, 4, 7, 0, 7, 7, 3, 10, 2, ...], a periodic sequence with period 10. (End)
For any sequence with recurrence relation b(n) = b(n-1) + b(n-2), it can be shown that the recurrence relation for every k-th term is given by: b(n) = A000032(k) * b(n-k) + (-1)^(k+1) * b(n-2k), extending to negative indices as necessary. - Nick Hobson, Jan 19 2024
For n >= 3, L(n) is the number of (n-1)-digit numbers where all consecutive pairs of digits have a difference of at least 8. - Edwin Hermann, Apr 19 2025

Examples

			G.f. = 2 + x + 3*x^2 + 4*x^3 + 7*x^4 + 11*x^5 + 18*x^6 + 29*x^7 + ...
		

References

  • P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 69.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 32,50.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 499.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 46.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 112, 202-203.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.5 The Fibonacci and Related Sequences, pp. 287-288.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 148.
  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
  • Thomas Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley and Sons, 2001.
  • C. N. Menhinick, The Fibonacci Resonance and other new Golden Ratio discoveries, Onperson, (2015), pages 200-206.
  • 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-46, 59.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See pp. 83-84.

Crossrefs

Cf. A000204. A000045(n) = (2*L(n + 1) - L(n))/5.
First row of array A103324.
a(n) = A101220(2, 0, n), for n > 0.
a(k) = A090888(1, k) = A109754(2, k) = A118654(2, k - 1), for k > 0.
Cf. A131774, A001622, A002878 (L(2n+1)), A005248 (L(2n)), A006497, A080039, A049684 (summation of Fibonacci(4n+2)), A106291 (Pisano periods), A057854 (complement), A354265 (generalized Lucas numbers).
Cf. sequences with formula Fibonacci(n+k)+Fibonacci(n-k) listed in A280154.
Subsequence of A047201.

Programs

  • Haskell
    a000032 n = a000032_list !! n
    a000032_list = 2 : 1 : zipWith (+) a000032_list (tail a000032_list)
    -- Reinhard Zumkeller, Aug 20 2011
    
  • Magma
    [Lucas(n): n in [0..120]];
    
  • Maple
    with(combinat): A000032 := n->fibonacci(n+1)+fibonacci(n-1);
    seq(simplify(2^n*(cos(Pi/5)^n+cos(3*Pi/5)^n)), n=0..36)
  • Mathematica
    a[0] := 2; a[n] := Nest[{Last[#], First[#] + Last[#]} &, {2, 1}, n] // Last
    Array[2 Fibonacci[# + 1] - Fibonacci[#] &, 50, 0] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)
    Table[LucasL[n], {n, 0, 36}] (* Zerinvary Lajos, Jul 09 2009 *)
    LinearRecurrence[{1, 1}, {2, 1}, 40] (* Harvey P. Dale, Sep 07 2013 *)
    LucasL[Range[0, 20]] (* Eric W. Weisstein, Aug 07 2017 *)
    CoefficientList[Series[(-2 + x)/(-1 + x + x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
  • PARI
    {a(n) = if(n<0, (-1)^n * a(-n), if( n<2, 2-n, a(n-1) + a(n-2)))};
    
  • PARI
    {a(n) = if(n<0, (-1)^n * a(-n), polsym(x^2 - x - 1, n)[n+1])};
    
  • PARI
    {a(n) = real((2 + quadgen(5)) * quadgen(5)^n)};
    
  • PARI
    a(n)=fibonacci(n+1)+fibonacci(n-1) \\ Charles R Greathouse IV, Jun 11 2011
    
  • PARI
    polsym(1+x-x^2, 50) \\ Charles R Greathouse IV, Jun 11 2011
    
  • Python
    def A000032_gen(): # generator of terms
        a, b = 2, 1
        while True:
            yield a
            a, b = b, a+b
    it = A000032_gen()
    A000032_list = [next(it) for  in range(50)] # _Cole Dykstra, Aug 02 2022
    
  • Python
    from sympy import lucas
    def A000032(n): return lucas(n) # Chai Wah Wu, Sep 23 2023
    
  • Python
    [(i:=3)+(j:=-1)] + [(j:=i+j)+(i:=j-i) for  in range(100)] # _Jwalin Bhatt, Apr 02 2025
  • Sage
    [lucas_number2(n,1,-1) for n in range(37)] # Zerinvary Lajos, Jun 25 2008
    

Formula

G.f.: (2 - x)/(1 - x - x^2).
L(n) = ((1 + sqrt(5))/2)^n + ((1 - sqrt(5))/2)^n = phi^n + (1-phi)^n.
L(n) = L(n - 1) + L(n - 2) = (-1)^n * L( - n).
L(n) = Fibonacci(2*n)/Fibonacci(n) for n > 0. - Jeff Burch, Dec 11 1999
E.g.f.: 2*exp(x/2)*cosh(sqrt(5)*x/2). - Len Smiley, Nov 30 2001
L(n) = F(n) + 2*F(n - 1) = F(n + 1) + F(n - 1). - Henry Bottomley, Apr 12 2000
a(n) = sqrt(F(n)^2 + 4*F(n + 1)*F(n - 1)). - Benoit Cloitre, Jan 06 2003 [Corrected by Gary Detlefs, Jan 21 2011]
a(n) = 2^(1 - n)*Sum_{k=0..floor(n/2)} C(n, 2k)*5^k. a(n) = 2T(n, i/2)( - i)^n with T(n, x) Chebyshev's polynomials of the first kind (see A053120) and i^2 = - 1. - Paul Barry, Nov 15 2003
L(n) = 2*F(n + 1) - F(n). - Paul Barry, Mar 22 2004
a(n) = (phi)^n + ( - phi)^( - n). - Paul Barry, Mar 12 2005
From Miklos Kristof, Mar 19 2007: (Start)
Let F(n) = A000045 = Fibonacci numbers, L(n) = a(n) = Lucas numbers:
L(n + m) + (-1)^m*L(n - m) = L(n)*L(m).
L(n + m) - (-1)^m*L(n - m) = 8*F(n)*F(m).
L(n + m + k) + (-1)^k*L(n + m - k) + (-1)^m*(L(n - m + k) + (-1)^k*L(n - m - k)) = L(n)*L(m)*L(k).
L(n + m + k) - (-1)^k*L(n + m - k) + (-1)^m*(L(n - m + k) - (-1)^k*L(n - m - k)) = 5*F(n)*L(m)*F(k).
L(n + m + k) + (-1)^k*L(n + m - k) - (-1)^m*(L(n - m + k) + (-1)^k*L(n - m - k)) = 5*F(n)*F(m)*L(k).
L(n + m + k) - (-1)^k*L(n + m - k) - (-1)^m*(L(n - m + k) - (-1)^k*L(n - m - k)) = 5*L(n)*F(m)*F(k). (End)
Inverse: floor(log_phi(a(n)) + 1/2) = n, for n>1. Also for n >= 0, floor((1/2)*log_phi(a(n)*a(n+1))) = n. Extension valid for all integers n: floor((1/2)*sign(a(n)*a(n+1))*log_phi|a(n)*a(n+1)|) = n {where sign(x) = sign of x}. - Hieronymus Fischer, May 02 2007
Let f(n) = phi^n + phi^(-n), then L(2n) = f(2n) and L(2n + 1) = f(2n + 1) - 2*Sum_{k>=0} C(k)/f(2n + 1)^(2k + 1) where C(n) are Catalan numbers (A000108). - Gerald McGarvey, Dec 21 2007, modified by Davide Colazingari, Jul 01 2016
Starting (1, 3, 4, 7, 11, ...) = row sums of triangle A131774. - Gary W. Adamson, Jul 14 2007
a(n) = trace of the 2 X 2 matrix [0,1; 1,1]^n. - Gary W. Adamson, Mar 02 2008
From Hieronymus Fischer, Jan 02 2009: (Start)
For odd n: a(n) = floor(1/(fract(phi^n))); for even n>0: a(n) = ceiling(1/(1 - fract(phi^n))). This follows from the basic property of the golden ratio phi, which is phi - phi^(-1) = 1 (see general formula described in A001622).
a(n) = round(1/min(fract(phi^n), 1 - fract(phi^n))), for n>1, where fract(x) = x - floor(x). (End)
E.g.f.: exp(phi*x) + exp(-x/phi) with phi: = (1 + sqrt(5))/2 (golden section). 1/phi = phi - 1. See another form given in the Smiley e.g.f. comment. - Wolfdieter Lang, May 15 2010
L(n)/L(n - 1) -> A001622. - Vincenzo Librandi, Jul 17 2010
a(n) = 2*a(n-2) + a(n-3), n>2. - Gary Detlefs, Sep 09 2010
L(n) = floor(1/fract(Fibonacci(n)*phi)), for n odd. - Hieronymus Fischer, Oct 20 2010
L(n) = ceiling(1/(1 - fract(Fibonacci(n)*phi))), for n even. - Hieronymus Fischer, Oct 20 2010
L(n) = 2^n * (cos(Pi/5)^n + cos(3*Pi/5)^n). - Gary Detlefs, Nov 29 2010
L(n) = (Fibonacci(2*n - 1)*Fibonacci(2*n + 1) - 1)/(Fibonacci(n)*Fibonacci(2*n)), n != 0. - Gary Detlefs, Dec 13 2010
L(n) = sqrt(A001254(n)) = sqrt(5*Fibonacci(n)^2 - 4*(-1)^(n+1)). - Gary Detlefs, Dec 26 2010
L(n) = floor(phi^n) + ((-1)^n + 1)/2 = A014217(n) +((-1)^n+1)/2, where phi = A001622. - Gary Detlefs, Jan 20 2011
L(n) = Fibonacci(n + 6) mod Fibonacci(n + 2), n>2. - Gary Detlefs, May 19 2011
For n >= 2, a(n) = round(phi^n) where phi is the golden ratio. - Arkadiusz Wesolowski, Jul 20 2012
a(p*k) == a(k) (mod p) for primes p. a(2^s*n) == a(n)^(2^s) (mod 2) for s = 0,1,2.. a(2^k) == - 1 (mod 2^k). a(p^2*k) == a(k) (mod p) for primes p and s = 0,1,2,3.. [Hoggatt and Bicknell]. - R. J. Mathar, Jul 24 2012
From Gary Detlefs, Dec 21 2012: (Start)
L(k*n) = (F(k)*phi + F(k - 1))^n + (F(k + 1) - F(k)*phi)^n.
L(k*n) = (F(n)*phi + F(n - 1))^k + (F(n + 1) - F(n)*phi)^k.
where phi = (1 + sqrt(5))/2, F(n) = A000045(n).
(End)
L(n) = n * Sum_{k=0..floor(n/2)} binomial(n - k,k)/(n - k), n>0 [H. W. Gould]. - Gary Detlefs, Jan 20 2013
G.f.: G(0), where G(k) = 1 + 1/(1 - (x*(5*k-1))/((x*(5*k+4)) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 15 2013
L(n) = F(n) + F(n-1) + F(n-2) + F(n-3). - Bob Selcoe, Jun 17 2013
L(n) = round(sqrt(L(2n-1) + L(2n-2))). - Richard R. Forberg, Jun 24 2014
L(n) = (F(n+1)^2 - F(n-1)^2)/F(n) for n>0. - Richard R. Forberg, Nov 17 2014
L(n+2) = 1 + A001610(n+1) = 1 + Sum_{k=0..n} L(k). - Tom Edgar, Apr 15 2015
L(i+j+1) = L(i)*F(j) + L(i+1)*F(j+1) with F(n)=A000045(n). - J. M. Bergot, Feb 12 2016
a(n) = (L(n+1)^2 + 5*(-1)^n)/L(n+2). - J. M. Bergot, Apr 06 2016
Dirichlet g.f.: PolyLog(s,-1/phi) + PolyLog(s,phi), where phi is the golden ratio. - Ilya Gutkovskiy, Jul 01 2016
L(n) = F(n+2) - F(n-2). - Yuchun Ji, Feb 14 2016
L(n+1) = A087131(n+1)/2^(n+1) = 2^(-n)*Sum_{k=0..n} binomial(n,k)*5^floor((k+1)/2). - Tony Foster III, Oct 14 2017
L(2*n) = (F(k+2*n) + F(k-2*n))/F(k); n >= 1, k >= 2*n. - David James Sycamore, May 04 2018
From Greg Dresden and Shaoxiong Yuan, Jul 16 2019: (Start)
L(3n + 4)/L(3n + 1) has continued fraction: n 4's followed by a single 7.
L(3n + 3)/L(3n) has continued fraction: n 4's followed by a single 2.
L(3n + 2)/L(3n - 1) has continued fraction: n 4's followed by a single -3. (End)
From Klaus Purath, Sep 15 2019: (Start)
All involved sequences extended to negative indices, following the rule a(n-1) = a(n+1) - a(n).
L(n) = (2*L(n+2) - L(n-3))/5.
L(n) = (2*L(n-2) + L(n+3))/5.
L(n) = F(n-3) + 2*F(n).
L(n) = 2*F(n+2) - 3*F(n).
L(n) = (3*F(n-1) + F(n+2))/2.
L(n) = 3*F(n-3) + 4*F(n-2).
L(n) = 4*F(n+1) - F(n+3).
L(n) = (F(n-k) + F(n+k))/F(k) with odd k>0.
L(n) = (F(n+k) - F(n-k))/F(k) with even k>0.
L(n) = A001060(n-1) - F(n+1).
L(n) = (A022121(n-1) - F(n+1))/2.
L(n) = (A022131(n-1) - F(n+1))/3.
L(n) = (A022139(n-1) - F(n+1))/4.
L(n) = (A166025(n-1) - F(n+1))/5.
The following two formulas apply for all sequences of the Fibonacci type.
(a(n-2*k) + a(n+2*k))/a(n) = L(2*k).
(a(n+2*k+1) - a(n-2*k-1))/a(n) = L(2*k+1). (End)
L(n) = F(n-k)*L(k+1) + F(n-k-1)*L(k), for all k >= 0, where F(n) = A000045(n). - Michael Tulskikh, Dec 06 2019
F(n+2*m) = L(m)*F(n+m) + (-1)^(m-1)*F(n) for all n >= 0 and m >= 0. - Alexander Burstein, Mar 31 2022
a(n) = i^(n-1)*cos(n*c)/cos(c) = i^(n-1)*cos(c*n)*sec(c), where c = Pi/2 + i*arccsch(2). - Peter Luschny, May 23 2022
From Yike Li and Greg Dresden, Aug 25 2022: (Start)
L(2*n) = 5*binomial(2*n-1,n) - 2^(2*n-1) + 5*Sum_{j=1..n/5} binomial(2*n,n+5*j) for n>0.
L(2*n+1) = 2^(2n) - 5*Sum_{j=0..n/5} binomial(2*n+1,n+5*j+3). (End)
From Andrea Pinos, Jul 04 2023: (Start)
L(n) ~ Gamma(1/phi^n) + gamma.
L(n) = Re(phi^n + e^(i*Pi*n)/phi^n). (End)
L(n) = ((Sum_{i=0..n-1} L(i)^2) - 2)/L(n-1). - Jules Beauchamp, May 03 2025
From Peter Bala, Jul 09 2025: (Start)
The following series telescope:
For k >= 1, Sum_{n >= 1} (-1)^((k+1)*(n+1)) * a(2*n*k)/(a((2*n-1)*k)*a((2*n+1)*k)) = 1/a(k)^2.
For positive even k, Sum_{n >= 1} 1/(a(k*n) - (a(k) + 2)/a(k*n)) = 1/(a(k) - 2) and
Sum_{n >= 1} (-1)^(n+1)/(a(k*n) + (a(k) - 2)/a(k*n)) = 1/(a(k) + 2).
For positive odd k, Sum_{n >= 1} 1/(a(k*n) - (-1)^n*(a(2*k) + 2)/a(k*n)) = (a(k) + 2)/(2*(a(2*k) - 2)) and
Sum_{n >= 1} (-1)^(n+1)/(a(k*n) - (-1)^n*(a(2*k) + 2)/a(k*n)) = (a(k) - 2)/(2*(a(2*k) - 2)). (End)

A000244 Powers of 3: a(n) = 3^n.

Original entry on oeis.org

1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467, 3486784401, 10460353203, 31381059609, 94143178827, 282429536481, 847288609443, 2541865828329, 7625597484987
Offset: 0

Views

Author

Keywords

Comments

Same as Pisot sequences E(1, 3), L(1, 3), P(1, 3), T(1, 3). Essentially same as Pisot sequences E(3, 9), L(3, 9), P(3, 9), T(3, 9). See A008776 for definitions of Pisot sequences.
Number of (s(0), s(1), ..., s(2n+2)) such that 0 < s(i) < 6 and |s(i) - s(i-1)| = 1 for i = 1, 2, ..., 2n + 2, s(0) = 1, s(2n+2) = 3. - Herbert Kociemba, Jun 10 2004
a(1) = 1, a(n+1) is the least number such that there are a(n) even numbers between a(n) and a(n+1). Generalization for the sequence of powers of k: 1, k, k^2, k^3, k^4, ... There are a(n) multiples of k-1 between a(n) and a(n+1). - Amarnath Murthy, Nov 28 2004
a(n) = sum of (n+1)-th row in Triangle A105728. - Reinhard Zumkeller, Apr 18 2005
With p(n) being the number of integer partitions of n, p(i) being the number of parts of the i-th partition of n, d(i) being the number of different parts of the i-th partition of n, m(i, j) being the multiplicity of the j-th part of the i-th partition of n, Sum_{i = 1..p(n)} being the sum over i and Product_{j = 1..d(i)} being the product over j, one has: a(n) = Sum_{i = 1..p(n)} (p(i)!/(Product_{j = 1..d(i)} m(i, j)!))*2^(p(i) - 1). - Thomas Wieder, May 18 2005
For any k > 1 in the sequence, k is the first prime power appearing in the prime decomposition of repunit R_k, i.e., of A002275(k). - Lekraj Beedassy, Apr 24 2006
a(n-1) is the number of compositions of compositions. In general, (k+1)^(n-1) is the number of k-levels nested compositions (e.g., 4^(n-1) is the number of compositions of compositions of compositions, etc.). Each of the n - 1 spaces between elements can be a break for one of the k levels, or not a break at all. - Franklin T. Adams-Watters, Dec 06 2006
Let S be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xSy if x is a subset of y. Then a(n) = |S|. - Ross La Haye, Dec 22 2006
From Manfred Boergens, Mar 28 2023: (Start)
With regard to the comment by Ross La Haye:
Cf. A001047 if either nonempty subsets are considered or x is a proper subset of y.
Cf. a(n+1) in A028243 if nonempty subsets are considered and x is a proper subset of y. (End)
If X_1, X_2, ..., X_n is a partition of the set {1, 2, ..., 2*n} into blocks of size 2 then, for n >= 1, a(n) is equal to the number of functions f : {1, 2, ..., 2*n} -> {1, 2} such that for fixed y_1, y_2, ..., y_n in {1, 2} we have f(X_i) <> {y_i}, (i = 1, 2, ..., n). - Milan Janjic, May 24 2007
This is a general comment on all sequences of the form a(n) = [(2^k)-1]^n for all positive integers k. Example 1.1.16 of Stanley's "Enumerative Combinatorics" offers a slightly different version. a(n) in the number of functions f:[n] into P([k]) - {}. a(n) is also the number of functions f:[k] into P([n]) such that the generalized intersection of f(i) for all i in [k] is the empty set. Where [n] = {1, 2, ..., n}, P([n]) is the power set of [n] and {} is the empty set. - Geoffrey Critzer, Feb 28 2009
a(n) = A064614(A000079(n)) and A064614(m)A000079(n). - Reinhard Zumkeller, Feb 08 2010
3^(n+1) = (1, 2, 2, 2, ...) dot (1, 1, 3, 9, ..., 3^n); e.g., 3^3 = 27 = (1, 2, 2, 2) dot (1, 1, 3, 9) = (1 + 2 + 6 + 18). - Gary W. Adamson, May 17 2010
a(n) is the number of generalized compositions of n when there are 3*2^i different types of i, (i = 1, 2, ...). - Milan Janjic, Sep 24 2010
For n >= 1, a(n-1) is the number of generalized compositions of n when there are 2^(i-1) different types of i, (i = 1, 2, ...). - Milan Janjic, Sep 24 2010
The sequence in question ("Powers of 3") also describes the number of moves of the k-th disk solving the [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle (cf. A183111 - A183125).
a(n) is the number of Stern polynomials of degree n. See A057526. - T. D. Noe, Mar 01 2011
Positions of records in the number of odd prime factors, A087436. - Juri-Stepan Gerasimov, Mar 17 2011
Sum of coefficients of the expansion of (1+x+x^2)^n. - Adi Dani, Jun 21 2011
a(n) is the number of compositions of n elements among {0, 1, 2}; e.g., a(2) = 9 since there are the 9 compositions 0 + 0, 0 + 1, 1 + 0, 0 + 2, 1 + 1, 2 + 0, 1 + 2, 2 + 1, and 2 + 2. [From Adi Dani, Jun 21 2011; modified by editors.]
Except the first two terms, these are odd numbers n such that no x with 2 <= x <= n - 2 satisfy x^(n-1) == 1 (mod n). - Arkadiusz Wesolowski, Jul 03 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 1, a(n) equals the number of 3-colored compositions of n such that no adjacent parts have the same color. - Milan Janjic, Nov 17 2011
Explanation from David Applegate, Feb 20 2017: (Start)
Since the preceding comment appears in a large number of sequences, it might be worth adding a proof.
The number of compositions of n into exactly k parts is binomial(n-1,k-1).
For a p-colored composition of n such that no adjacent parts have the same color, there are exactly p choices for the color of the first part, and p-1 choices for the color of each additional part (any color other than the color of the previous one). So, for a partition into k parts, there are p (p-1)^(k-1) valid colorings.
Thus the number of p-colored compositions of n into exactly k parts such that no adjacent parts have the same color is binomial(n-1,k-1) p (p-1)^(k-1).
The total number of p-colored compositions of n such that no adjacent parts have the same color is then
Sum_{k=1..n} binomial(n-1,k-1) * p * (p-1)^(k-1) = p^n.
To see this, note that the binomial expansion of ((p - 1) + 1)^(n - 1) = Sum_{k = 0..n - 1} binomial(n - 1, k) (p - 1)^k 1^(n - 1 - k) = Sum_{k = 1..n} binomial(n - 1, k - 1) (p - 1)^(k - 1).
(End)
Also, first and least element of the matrix [1, sqrt(2); sqrt(2), 2]^(n+1). - M. F. Hasler, Nov 25 2011
One-half of the row sums of the triangular version of A035002. - J. M. Bergot, Jun 10 2013
Form an array with m(0,n) = m(n,0) = 2^n; m(i,j) equals the sum of the terms to the left of m(i,j) and the sum of the terms above m(i,j), which is m(i,j) = Sum_{k=0..j-1} m(i,k) + Sum_{k=0..i-1} m(k,j). The sum of the terms in antidiagonal(n+1) = 4*a(n). - J. M. Bergot, Jul 10 2013
a(n) = A007051(n+1) - A007051(n), and A007051 are the antidiagonal sums of an array defined by m(0,k) = 1 and m(n,k) = Sum_{c = 0..k - 1} m(n, c) + Sum_{r = 0..n - 1} m(r, k), which is the sum of the terms to left of m(n, k) plus those above m(n, k). m(1, k) = A000079(k); m(2, k) = A045623(k + 1); m(k + 1, k) = A084771(k). - J. M. Bergot, Jul 16 2013
Define an array to have m(0,k) = 2^k and m(n,k) = Sum_{c = 0..k - 1} m(n, c) + Sum_{r = 0..n - 1} m(r, k), which is the sum of the terms to the left of m(n, k) plus those above m(n, k). Row n = 0 of the array comprises A000079, column k = 0 comprises A011782, row n = 1 comprises A001792. Antidiagonal sums of the array are a(n): 1 = 3^0, 1 + 2 = 3^1, 2 + 3 + 4 = 3^2, 4 + 7 + 8 + 8 = 3^3. - J. M. Bergot, Aug 02 2013
The sequence with interspersed zeros and o.g.f. x/(1 - 3*x^2), A(2*k) = 0, A(2*k + 1) = 3^k = a(k), k >= 0, can be called hexagon numbers. This is because the algebraic number rho(6) = 2*cos(Pi/6) = sqrt(3) of degree 2, with minimal polynomial C(6, x) = x^2 - 3 (see A187360, n = 6), is the length ratio of the smaller diagonal and the side in the hexagon. Hence rho(6)^n = A(n-1)*1 + A(n)*rho(6), in the power basis of the quadratic number field Q(rho(6)). One needs also A(-1) = 1. See also a Dec 02 2010 comment and the P. Steinbach reference given in A049310. - Wolfdieter Lang, Oct 02 2013
Numbers k such that sigma(3k) = 3k + sigma(k). - Jahangeer Kholdi, Nov 23 2013
All powers of 3 are perfect totient numbers (A082897), since phi(3^n) = 2 * 3^(n - 1) for n > 0, and thus Sum_{i = 0..n} phi(3^i) = 3^n. - Alonso del Arte, Apr 20 2014
The least number k > 0 such that 3^k ends in n consecutive decreasing digits is a 3-term sequence given by {1, 13, 93}. The consecutive increasing digits are {3, 23, 123}. There are 100 different 3-digit endings for 3^k. There are no k-values such that 3^k ends in '012', '234', '345', '456', '567', '678', or '789'. The k-values for which 3^k ends in '123' are given by 93 mod 100. For k = 93 + 100*x, the digit immediately before the run of '123' is {9, 5, 1, 7, 3, 9, 5, 1, 3, 7, ...} for x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...}, respectively. Thus we see the digit before '123' will never be a 0. So there are no further terms. - Derek Orr, Jul 03 2014
All elements of A^n where A = (1, 1, 1; 1, 1, 1; 1, 1, 1). - David Neil McGrath, Jul 23 2014
Counts all walks of length n (open or closed) on the vertices of a triangle containing a loop at each vertex starting from any given vertex. - David Neil McGrath, Oct 03 2014
a(n) counts walks (closed) on the graph G(1-vertex;1-loop,1-loop,1-loop). - David Neil McGrath, Dec 11 2014
2*a(n-2) counts all permutations of a solitary closed walk of length (n) from the vertex of a triangle that contains 2 loops on each of the remaining vertices. In addition, C(m,k)=2*(2^m)*B(m+k-2,m) counts permutations of walks that contain (m) loops and (k) arcs. - David Neil McGrath, Dec 11 2014
a(n) is the sum of the coefficients of the n-th layer of Pascal's pyramid (a.k.a., Pascal's tetrahedron - see A046816). - Bob Selcoe, Apr 02 2016
Numbers n such that the trinomial x^(2*n) + x^n + 1 is irreducible over GF(2). Of these only the trinomial for n=1 is primitive. - Joerg Arndt, May 16 2016
Satisfies Benford's law [Berger-Hill, 2011]. - N. J. A. Sloane, Feb 08 2017
a(n-1) is also the number of compositions of n if the parts can be runs of any length from 1 to n, and can contain any integers from 1 to n. - Gregory L. Simay, May 26 2017
Also the number of independent vertex sets and vertex covers in the n-ladder rung graph n P_2. - Eric W. Weisstein, Sep 21 2017
Also the number of (not necessarily maximal) cliques in the n-cocktail party graph. - Eric W. Weisstein, Nov 29 2017
a(n-1) is the number of 2-compositions of n; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 15 2020
a(n) is the number of faces of any dimension (vertices, edges, square faces, etc.) of the n-dimensional hypercube. For example, the 0-dimensional hypercube is a point, and its only face is itself. The 1-dimensional hypercube is a line, which has two vertices and an edge. The 2-dimensional hypercube is a square, which has four vertices, four edges, and a square face. - Kevin Long, Mar 14 2023
Number of pairs (A,B) of subsets of M={1,2,...,n} with union(A,B)=M. For nonempty subsets cf. A058481. - Manfred Boergens, Mar 28 2023
From Jianing Song, Sep 27 2023: (Start)
a(n) is the number of disjunctive clauses of n variables up to equivalence. A disjunctive clause is a propositional formula of the form l_1 OR ... OR l_m, where l_1, ..., l_m are distinct elements in {x_1, ..., x_n, NOT x_1, ..., NOT x_n} for n variables x_1, ... x_n, and no x_i and NOT x_i appear at the same time. For each 1 <= i <= n, we can have neither of x_i or NOT x_i, only x_i or only NOT x_i appearing in a disjunctive clause, so the number of such clauses is 3^n. Viewing the propositional formulas of n variables as functions {0,1}^n -> {0,1}, a disjunctive clause corresponds to a function f such that the inverse image of 0 is of the form A_1 X ... X A_n, where A_i is nonempty for all 1 <= i <= n. Since each A_i has 3 choices ({0}, {1} or {0,1}), we also find that the number of disjunctive clauses of n variables is 3^n.
Equivalently, a(n) is the number of conjunctive clauses of n variables. (End)
The finite subsequence a(2), a(3), a(4), a(5) = 9, 27, 81, 243 is one of only two geometric sequences that can be formed with all interior angles (all integer, in degrees) of a simple polygon. The other sequence is a subsequence of A007283 (see comment there). - Felix Huber, Feb 15 2024

Examples

			G.f. = 1 + 3*x + 9*x^2 + 27*x^3 + 81*x^4 + 243*x^5 + 729*x^6 + 2187*x^7 + ...
		

References

  • 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).

Crossrefs

Cf. A008776 (2*a(n), and first differences).
a(n) = A092477(n, 2) for n > 0.
a(n) = A159991(n) / A009964(n).
Cf. A100772, A035002. Row sums of A125076 and A153279.
a(n) = A217764(0, n).
Cf. A046816, A006521, A014945, A275414 (multisets).
The following are parallel families: A000079 (2^n), A004094 (2^n reversed), A028909 (2^n sorted up), A028910 (2^n sorted down), A036447 (double and reverse), A057615 (double and sort up), A263451 (double and sort down); A000244 (3^n), A004167 (3^n reversed), A321540 (3^n sorted up), A321539 (3^n sorted down), A163632 (triple and reverse), A321542 (triple and sort up), A321541 (triple and sort down).

Programs

Formula

a(n) = 3^n.
a(0) = 1; a(n) = 3*a(n-1).
G.f.: 1/(1-3*x).
E.g.f.: exp(3*x).
a(n) = n!*Sum_{i + j + k = n, i, j, k >= 0} 1/(i!*j!*k!). - Benoit Cloitre, Nov 01 2002
a(n) = Sum_{k = 0..n} 2^k*binomial(n, k), binomial transform of A000079.
a(n) = A090888(n, 2). - Ross La Haye, Sep 21 2004
a(n) = 2^(2n) - A005061(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 0). - Ross La Haye, Jan 11 2006
Hankel transform of A007854. - Philippe Deléham, Nov 26 2006
a(n) = 2*StirlingS2(n+1,3) + StirlingS2(n+2,2) = 2*(StirlingS2(n+1,3) + StirlingS2(n+1,2)) + 1. - Ross La Haye, Jun 26 2008
a(n) = 2*StirlingS2(n+1, 3) + StirlingS2(n+2, 2) = 2*(StirlingS2(n+1, 3) + StirlingS2(n+1, 2)) + 1. - Ross La Haye, Jun 09 2008
Sum_{n >= 0} 1/a(n) = 3/2. - Gary W. Adamson, Aug 29 2008
If p(i) = Fibonacci(2i-2) and if A is the Hessenberg matrix of order n defined by A(i, j) = p(j-i+1), (i <= j), A(i, j) = -1, (i = j+1), and A(i, j) = 0 otherwise, then, for n >= 1, a(n-1) = det A. - Milan Janjic, May 08 2010
G.f. A(x) = M(x)/(1-M(x))^2, M(x) - o.g.f for Motzkin numbers (A001006). - Vladimir Kruchinin, Aug 18 2010
a(n) = A133494(n+1). - Arkadiusz Wesolowski, Jul 27 2011
2/3 + 3/3^2 + 2/3^3 + 3/3^4 + 2/3^5 + ... = 9/8. [Jolley, Summation of Series, Dover, 1961]
a(n) = Sum_{k=0..n} A207543(n,k)*4^(n-k). - Philippe Deléham, Feb 25 2012
a(n) = Sum_{k=0..n} A125185(n,k). - Philippe Deléham, Feb 26 2012
Sum_{n > 0} Mobius(n)/a(n) = 0.181995386702633887827... (see A238271). - Alonso del Arte, Aug 09 2012. See also the sodium 3s orbital energy in table V of J. Chem. Phys. 53 (1970) 348.
a(n) = (tan(Pi/3))^(2*n). - Bernard Schott, May 06 2022
a(n-1) = binomial(2*n-1, n) + Sum_{k >= 1} binomial(2*n, n+3*k)*(-1)^k. - Greg Dresden, Oct 14 2022
G.f.: Sum_{k >= 0} x^k/(1-2*x)^(k+1). - Kevin Long, Mar 14 2023

A001047 a(n) = 3^n - 2^n.

Original entry on oeis.org

0, 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58025, 175099, 527345, 1586131, 4766585, 14316139, 42981185, 129009091, 387158345, 1161737179, 3485735825, 10458256051, 31376865305, 94134790219, 282412759265, 847255055011, 2541798719465, 7625463267259, 22876524019505
Offset: 0

Views

Author

Keywords

Comments

a(n+1) is the sum of the elements in the n-th row of triangle pertaining to A036561. - Amarnath Murthy, Jan 02 2002
Number of 2 X n binary arrays with a path of adjacent 1's and no path of adjacent 0's from top row to bottom row. - R. H. Hardin, Mar 21 2002
With offset 1, partial sums of A027649. - Paul Barry, Jun 24 2003
Number of distinct lines through the origin in the n-dimensional lattice of side length 2. A049691 has the values for the 2-dimensional lattice of side length n. - Joshua Zucker, Nov 19 2003
a(n+1)/(n+1)=(3*3^n-2*2^n)/(n+1) is the second binomial transform of the harmonic sequence 1/(n+1). - Paul Barry, Apr 19 2005
a(n+1) is the sum of n-th row of A036561. - Reinhard Zumkeller, May 14 2006
The sequence gives the sum of the lengths of the segments in Cantor's dust generating sequence up to the i-th step. Measurement unit = length of the segment of i-th step. - Giorgio Balzarotti, Nov 18 2006
Let T be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xTy if x is a proper subset of y. Then a(n) = |T|. - Ross La Haye, Dec 22 2006
From Alexander Adamchuk, Jan 04 2007: (Start)
a(n) is prime for n in A057468.
p divides a(p) - 1 for prime p.
Quotients (3^p - 2^p - 1)/p, where p = prime(n), are listed in A127071.
Numbers k such that k divides 3^k - 2^k - 1 are listed in A127072.
Pseudoprimes in A127072(n) include all powers of primes {2,3,7} and some composite numbers that are listed in A127073, which includes all Carmichael numbers A002997.
Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074.
5 divides a(2n).
5^2 divides a(2*5n).
5^3 divides a(2*5^2n).
5^4 divides a(2*5^3n).
7^2 divides a(6*7n).
13 divides a(4n).
13^2 divides a(4*13n).
19 divides a(3n).
19^2 divides a(3*19n).
23^2 divides a(11n).
23^3 divides a(11*23n).
23^4 divides a(11*23^2n).
29 divides a(7n).
p divides a((p-1)n) for prime p>3.
p divides a((p-1)/2) for prime p in A097934. Also primes p such that 6 is a square mod p, except {2,3}, A038876(n).
p^(k+1) divides a(p^k*(p-1)/2*n) for prime p in A097934.
p^(k+1) divides a(p^k*(p-1)*n) for prime p>3.
Note the exception that for p = 23, p^(k+2) divides a(p^k*(p-1)/2*n).
There are no more such exceptions for primes p up to 600000. (End)
a(n) divides a(q*(n+1)-1), for all q integer. Leonardo Sarasua, Apr 15 2024
Final digits of terms follow sequence 1,5,9,5. - Enoch Haga, Nov 26 2007
This is also the second column sequence of the Sheffer triangle A143494 (2-restricted Stirling2 numbers). See the e.g.f. given below. - Wolfdieter Lang, Oct 08 2011
Partial sums give A000392. - Jon Perry, Apr 05 2014
For n >= 1, this is also row 2 of A281890: when consecutive positive integers are written as a product of primes in nondecreasing order, "3" occurs in n-th position a(n) times out of every 6^n. - Peter Munn, May 17 2017
a(n) is the number of ternary sequences of length n which include the digit 2. For example, a(2)=5 since the sequences are 02,20,12,21,22. - Enrique Navarrete, Apr 05 2021
a(n-1) is the number of ways we can form disjoint unions of two nonempty subsets of [n] such that the union contains n. For example, for n = 3, a(2) = 5 since the disjoint unions are {1}U{3}, {1}U{2,3}, {2}U{3}, {2}U{1,3}, and {1,2}U{3}. Cf. A000392 if we drop the requirement that the union contains n. - Enrique Navarrete, Aug 24 2021
Configures as a composite Koch Snowflake Fractal (see illustration in links) based on the five-fold division of the Cantor Square/Cantor Dust Fractal of (9^n-4^n)/5 see my illustration in (A016153). - John Elias, Oct 13 2021
Number of pairs (A,B) where B is a subset of {1,2,...,n} and A is a proper subset of B. - Jianing Song, Jun 18 2022
From Manfred Boergens, Mar 29 2023: (Start)
With regard to the comments by Ross La Haye and Jianing Song: Omitting "proper" gives A000244.
Number of pairs (A,B) where B is a nonempty subset of {1,2,...,n} and A is a nonempty subset of B. For nonempty proper subsets see a(n+1) in A028243. (End)
a(n) is the number of n-digit numbers whose smallest decimal digit is 7. - Stefano Spezia, Nov 15 2023
a(n-1) is the number of all possible player-reduced binary games observed by each player in an nx2 game assuming the individual strategies of k < n - 1 players are fixed and the remaining n - k - 1 player will play as one, either maintaining their status quo strategies or jointly adopting an alternative strategy. - Ambrosio Valencia-Romero, Apr 11 2024

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 86-87.
  • 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).

Crossrefs

a(n) = row sums of A091913, row 2 of A047969, column 1 of A090888 and column 1 of A038719.
Cf. partitions: A241766, A241759.
A diagonal of A262307.

Programs

  • Haskell
    a001047 n = a001047_list !! n
    a001047_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (0, 1)
    -- Reinhard Zumkeller, Jun 09 2013
  • Magma
    [3^n - 2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    seq(3^n - 2^n, n=0..40); # Giorgio Balzarotti, Nov 18 2006
    A001047:=1/(3*z-1)/(2*z-1); # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[ 3^n - 2^n, {n, 0, 25} ]
    LinearRecurrence[{5, -6}, {0, 1}, 25] (* Harvey P. Dale, Aug 18 2011 *)
    Numerator@NestList[(3#+1)/2&,1/2,100] (* Zak Seidov, Oct 03 2011 *)
  • PARI
    {a(n) = 3^n - 2^n};
    
  • Python
    [3**n - 2**n for n in range(25)] # Ross La Haye, Aug 19 2005; corrected by David Radcliffe, Jun 26 2016
    
  • Sage
    [lucas_number1(n, 5, 6) for n in range(26)]  # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/((1-2*x)*(1-3*x)).
a(n) = 5*a(n-1) - 6*a(n-2).
a(n) = 3*a(n-1) + 2^(n-1). - Jon Perry, Aug 23 2002
Starting 0, 0, 1, 5, 19, ... this is 3^n/3 - 2^n/2 + 0^n/6, the binomial transform of A086218. - Paul Barry, Aug 18 2003
a(n) = A083323(n)-1 = A056182(n)/2 = (A002783(n)-1)/2 = (A003063(n+2)-A003063(n+1))/2. - Ralf Stephan, Jan 12 2004
Binomial transform of A000225. - Ross La Haye, Feb 07 2005
a(n) = Sum_{k=0..n-1} binomial(n, k)*2^k. - Ross La Haye, Aug 20 2005
a(n) = 2^(2n) - A083324(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 1). - Ross La Haye, Jan 11 2006
E.g.f.: exp(3*x) - exp(2*x). - Mohammad K. Azarian, Jan 14 2009
a(n) = A217764(n,1). - Ross La Haye, Mar 27 2013
a(n) = 2*a(n-1) + 3^(n-1). - Toby Gottfried, Mar 28 2013
a(n) = A000244(n) - A000079(n). - Omar E. Pol, Mar 28 2013
a(n) = Sum_{k=0..2} Stirling1(2,k)*(k+1)^n = c_2^{(-n)}, poly-Cauchy numbers. - Takao Komatsu, Mar 28 2013
a(n) = A227048(n,A098294(n)). - Reinhard Zumkeller, Jun 30 2013
a(n+1) = Sum_{k=0..n} 2^k*3^(n-k). - J. M. Bergot, Mar 27 2018
Sum_{n>=1} 1/a(n) = A329064. - Amiram Eldar, Nov 20 2020
a(n) = (1/2)*Sum_{k=0..n} binomial(n, k)*(2^(n-k) + 2^k - 2).
a(n) = A001117(n) + 2*A000918(n) + 1. - Ambrosio Valencia-Romero, Mar 08 2022
a(n) = A000225(n) + A028243(n+1). - Ambrosio Valencia-Romero, Mar 09 2022
From Peter Bala, Jun 27 2025: (Start)
exp(Sum_{n >=1} a(2*n)/a(n)*x^n/n) = Sum_{n >= 0} a(n+1)*x^n.
exp(Sum_{n >=1} a(3*n)/a(n)*x^n/n) = 1 + 19*x + 247*x^2 + ... is the g.f. of A019443.
exp(Sum_{n >=1} a(4*n)/a(n)*x^n/n) = 1 + 65*x + 2743*x^2 + ... is the g.f. of A383754.
The following are all examples of telescoping series:
Sum_{n >= 1} 6^n/(a(n)*a(n+1)) = 2, since 6^n/(a(n)*a(n+1)) = b(n) - b(n+1), where b(n) = 2^n/a(n);
Sum_{n >= 1} 18^n/(a(n)*a(n+1)*a(n+2)) = 22/75, since 18^n/(a(n)*a(n+1)*a(n+2)) = c(n) - c(n+1), where c(n) = (5*6^n - 2*4^n)/(15*a(n)*a(n+1));
Sum_{n >= 1} 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = 634/48735 since 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = d(n) - d(n+1), where d(n) = (57*18^n - 38*12^n + 8*8^n)/(513*a(n)*a(n+1)*a(n+2)).
Sum_{n >= 1} 6^n/(a(n)*a(n+2)) = 14/25; Sum_{n >= 1} (-6)^n/(a(n)*a(n+2)) = -6/25.
Sum_{n >= 1} 6^n/(a(n)*a(n+3)) = 306/1805.
Sum_{n >= 1} 6^n/(a(n)*a(n+4)) = 4282/80275; Sum_{n >= 1} (-6)^n/(a(n)*a(n+4)) = -1698/80275. (End)

Extensions

Edited by Charles R Greathouse IV, Mar 24 2010

A000285 a(0) = 1, a(1) = 4, and a(n) = a(n-1) + a(n-2) for n >= 2.

Original entry on oeis.org

1, 4, 5, 9, 14, 23, 37, 60, 97, 157, 254, 411, 665, 1076, 1741, 2817, 4558, 7375, 11933, 19308, 31241, 50549, 81790, 132339, 214129, 346468, 560597, 907065, 1467662, 2374727, 3842389, 6217116, 10059505, 16276621, 26336126, 42612747, 68948873, 111561620, 180510493, 292072113, 472582606
Offset: 0

Views

Author

Keywords

Comments

a(n-1) = Sum_{k=0..ceiling((n-1)/2)} P(4;n-1-k,k), n >= 1, with a(-1)=3. These are the sums over the SW-NE diagonals in P(4;n,k), the (4,1) Pascal triangle A093561. Observation by Paul Barry, Apr 29 2004. Proof via recursion relations and comparison of inputs. Also SW-NE diagonal sums in the Pascal (1,3) triangle A095660.
In general, for a Fibonacci sequence beginning with 1,b we have a(n) = (2^(-1-n)*((1-sqrt(5))^n*(1+sqrt(5)-2b) + (1+sqrt(5))^n*(-1+sqrt(5)+2b)))/sqrt(5). In this case we have b=4. - Herbert Kociemba, Dec 18 2011
Pisano period lengths: 1, 3, 8, 6, 20, 24, 16, 12, 24, 60, 5, 24, 28, 48, 40, 24, 36, 24, 18, 60, ... - R. J. Mathar, Aug 10 2012
a(n) = number of independent vertex subsets (i.e., the Merrifield-Simmons index) of the tree obtained from the path tree P_{n-1} by attaching two pendant edges to one of its endpoints (n >= 2). Example: if n=3, then we have the star tree with edges ab, ac, ad; it has 9 independent vertex subsets: empty, a, b, c, d, bc, cd, bd, bcd.
For n >= 2, the number a(n-1) is the dimension of a commutative Hecke algebra of type D_n with independent parameters. See Theorem 1.4 and Corollary 1.5 in the link "Hecke algebras with independent parameters". - Jia Huang, Jan 20 2019
For n >= 1, a(n) is the number of edge covers of the tadpole graph T_{3,n-1} with T_{3,0} interpreted as just the cycle C_3. Example: If n=2, we have C_3 and P_1 joined by a bridge, which is just the triangle with a pendant, and this graph has 5 edge covers. In general, because of the path portion of the graph, the number of edge covers of T{3,n-1} satisfies the same recurrence as Fibonacci sequence and it starts with 4,5. - Feryal Alayont, Aug 27 2023
Eswarathasan (1978) called these numbers "pseudo-Fibonacci numbers", and proved that 1, 4, and 9 are the only squares in this sequence. If the recurrence is extended to negative indices, then there is only one more square, a(-9) = 81. Eswarathasan (1979) proved that none of the terms (even with negative indices) are twice a square. - Amiram Eldar, Mar 09 2024
For n>2, a(n) + (-1)^ceiling(n/2) is the number of ways to tile this strip of length n-1, with a central staircase, using unit squares and dominoes:
_
||
|||_|||_|||_|||. - Greg Dresden and Runhe Zhang, Sep 07 2024

Examples

			G.f. = 1 + 4*x + 5*x^2 + 9*x^3 + 14*x^4 + 23*x^5 + 37*x^6 + 60*x^7 + ...
		

References

  • Richard E. Merrifield and Howard E. Simmons, Topological Methods in Chemistry, Wiley, New York, 1989. pp. 131.
  • Joe 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).

Crossrefs

Essentially the same as A104449, which only has A104449(0)=3 prefixed.
Cf. A090888, A101220, A109754, A091157 (subsequence of primes).

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+2) +2*F(n) ); # G. C. Greubel, Nov 08 2019
  • Haskell
    a000285 n = a000285_list !! n
    a000285_list = 1 : 4 : zipWith (+) a000285_list (tail a000285_list)
    -- Reinhard Zumkeller, Apr 28 2011
    
  • Magma
    a0:=1; a1:=4; [GeneralizedFibonacciNumber(a0,a1,n): n in [0..30]]; // Bruno Berselli, Feb 12 2013
    
  • Maple
    with(combinat):a:=n->2*fibonacci(n)+fibonacci(n+2): seq(a(n), n=0..34);
  • Mathematica
    LinearRecurrence[{1,1},{1,4},40] (* or *) Table[(3*LucasL[n]- Fibonacci[n])/2,{n,40}] (* Harvey P. Dale, Jul 18 2011 *)
    a[ n_]:= Fibonacci[n] + LucasL[n+1]; (* Michael Somos, May 28 2014 *)
  • Maxima
    a[0]:1$ a[1]:4$ a[n]:=a[n-1]+a[n-2]$ makelist(a[n],n,0,30); /* Martin Ettl, Oct 25 2012 */
    
  • PARI
    Vec((1+3*x)/(1-x-x^2)+O(x^40)) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Sage
    f=fibonacci; [f(n+2) +2*f(n) for n in (0..40)] # G. C. Greubel, Nov 08 2019
    

Formula

G.f.: (1+3*x)/(1-x-x^2). - Simon Plouffe in his 1992 dissertation
Row sums of A131775 starting (1, 4, 5, 9, 14, 23, ...). - Gary W. Adamson, Jul 14 2007
a(n) = 2*Fibonacci(n) + Fibonacci(n+2). - Zerinvary Lajos, Oct 05 2007
a(n) = ((1+sqrt(5))^n - (1-sqrt(5))^n)/(2^n*sqrt(5)) + (3/2)* ((1+sqrt(5))^(n-1) - (1-sqrt(5))^(n-1))/(2^(n-2)*sqrt(5)). Offset 1. a(3)=5. - Al Hakanson (hawkuu(AT)gmail.com), Jan 14 2009
a(n) = 3*Fibonacci(n+2) - 2*Fibonacci(n+1). - Gary Detlefs, Dec 21 2010
a(n) = A104449(n+1). - Michael Somos, Apr 07 2012
From Michael Somos, May 28 2014: (Start)
a(n) = A101220(3, 0, n+1).
a(n) = A109754(3, n+1).
a(k) = A090888(2, k-1), for k > 0.
a(-1 - n) = (-1)^n * A013655(n).
a(n) = Fibonacci(n) + Lucas(n+1), see Mathematica field. (End)
11*Fibonacci(n+1) = a(n+3) - a(n-2) = 3*a(n-1) + 2*a(n). - Manfred Arens and Michel Marcus, Jul 14 2014
a(n) = (9*F(n) + F(n-3))/2. - J. M. Bergot, Jul 15 2017
a(n-1) = 3 * A000045(n) + A000045(n+1). - R. J. Mathar, Feb 14 2024
E.g.f.: (cosh(x/2) + sinh(x/2))*(5*cosh(sqrt(5)*x/2) + 7*sqrt(5)*sinh(sqrt(5)*x/2))/5. - Stefano Spezia, Dec 31 2024

A027649 a(n) = 2*(3^n) - 2^n.

Original entry on oeis.org

1, 4, 14, 46, 146, 454, 1394, 4246, 12866, 38854, 117074, 352246, 1058786, 3180454, 9549554, 28665046, 86027906, 258149254, 774578834, 2323998646, 6972520226, 20918609254, 62757924914, 188277969046, 564842295746, 1694543664454, 5083664547794, 15251060752246
Offset: 0

Views

Author

Keywords

Comments

Poly-Bernoulli numbers B_n^(k) with k=-2.
Binomial transform of A007051, if both sequences start at 0. Binomial transform of A000225(n+1). - Paul Barry, Mar 24 2003
Euler expands (1-z)/(1-5z+6z^2) and finds the general term. Section 226 of the Introductio indicates that he could have written down the recursion relation: a(n) = 5 a(n-1)-6 a(n-2). - V. Frederick Rickey (fred-rickey(AT)usma.edu), Feb 10 2006
Let R be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xRy if x is a subset of y or y is a subset of x. Then a(n) = |R|. - Ross La Haye, Dec 22 2006
With regard to the comment by Ross La Haye: For proper subsets see A056182. - For nonempty subsets see A091344. - For nonempty proper subsets see a(n+1) in A260217. - Manfred Boergens, Aug 02 2023
If x, y are two n-bit binary strings then a(n) gives the number of pairs (x,y) such that XOR(x, y) = ABS(x - y). - Ramasamy Chandramouli, Feb 15 2009
Equals row sums of the triangular version of A038573. - Gary W. Adamson, Jun 04 2009
Inverse binomial transform of A085350. - Paul Curtz, Nov 14 2009
Related to the number of even a's in a nontrivial cycle (should one exist) in the 3x+1 Problem, where a <= floor(log_2(2*(3^n) - 2^n)). The value n correlates to the number of odds in such a nontrivial cycle. See page 1288 of Crandall's paper. Also, this relation gives another proof that the number of odds divided by the number of evens in a nontrivial cycle is bounded by log 2 / log 3 (this observation does not resolve the finite cycles conjecture as the value could be arbitrarily close to this bound). However, the same argument gives that log 2 / log 3 is less than or equal to the number of odds divided by the number of evens in a divergent sequence (should one exist), as log 2 / log 3 is the limit value for a cycle of an arbitrarily large length, where the length is given by the value n. - Jeffrey R. Goodwin, Aug 04 2011
Row sums of Riordan triangle A106516. - Wolfdieter Lang, Jan 09 2015
Number of restricted barred preferential arrangements having 3 bars in which the sections are all restricted sections such that (for fixed sections i and j) section i or section j is empty. - Sithembele Nkonkobe, Oct 12 2015
This is also row 2 of A281891: for n >= 1, when consecutive positive integers are written as a product of primes in nondecreasing order, a factor of 2 or 3 occurs in n-th position a(n) times out of every 6^n. - Peter Munn, May 18 2017
Also row sums of A124929. - Omar E. Pol, Jun 15 2017
This is the sum of A318921(n) for n in the range 2^(k+1) to 2^(k+2)-1. See A318921 for proof. - N. J. A. Sloane, Sep 25 2018
a(n) is also the number of acyclic orientations of the complete bipartite graph K_{2,n}. - Vincent Pilaud, Sep 15 2020
a(n-1) is also the number of n-digit numbers whose largest decimal digit is 2. - Stefano Spezia, Nov 15 2023

References

  • Leonhard Euler, Introductio in analysin infinitorum (1748), section 216.

Crossrefs

Row n = 2 of array A099594.
Also occurs as a row, column, diagonal or as row sums in A038573, A085870, A090888, A106516, A217764, A281891.

Programs

  • Haskell
    a027649 n = a027649_list !! n
    a027649_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (1, 1)
    -- Reinhard Zumkeller, Jun 09 2013
    
  • Magma
    [2*(3^n)-2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    a(n, k):= (-1)^n*sum( (-1)^'m'*'m'!*Stirling2(n,'m')/('m'+1)^k,'m'=0..n);
    seq(a(n, -2), n=0..30);
  • Mathematica
    Table[2(3^n)-2^n,{n,0,30}] (* or *) LinearRecurrence[ {5,-6},{1,4},31]  (* Harvey P. Dale, Apr 22 2011 *)
  • PARI
    a(n)=2*(3^n)-2^n \\ Charles R Greathouse IV, Jul 16 2011
    
  • PARI
    Vec((1-x)/((1-2*x)*(1-3*x)) + O(x^50)) \\ Altug Alkan, Oct 12 2015
    
  • SageMath
    [2*(3^n - 2^(n-1)) for n in (0..30)] # G. C. Greubel, Aug 01 2022

Formula

G.f.: (1-x)/((1-2*x)*(1-3*x)).
a(n) = 3*a(n-1) + 2^(n-1), with a(0) = 1.
a(n) = Sum_{k=0..n} binomial(n, k)*(2^(k+1) - 1). - Paul Barry, Mar 24 2003
Partial sums of A053581. - Paul Barry, Jun 26 2003
Main diagonal of array (A085870) defined by T(i, 1) = 2^i - 1, T(1, j) = 2^j - 1, T(i, j) = T(i-1, j) + T(i-1, j-1). - Benoit Cloitre, Aug 05 2003
a(n) = A090888(n, 3). - Ross La Haye, Sep 21 2004
a(n) = Sum_{k=0..n} binomial(n+2, k+1)*Sum_{j=0..floor(k/2)} A001045(k-2j). - Paul Barry, Apr 17 2005
a(n) = Sum_{k=0..n} Sum_{j=0..n} binomial(n,j)*binomial(j+1,k+1). - Paul Barry, Sep 18 2006
a(n) = A166060(n+1)/6. - Philippe Deléham, Oct 21 2009
a(n) = 5*a(n-1) - 6*a(n-2), a(0)=1, a(1)=4. - Harvey P. Dale, Apr 22 2011
a(n) = A217764(n,2). - Ross La Haye, Mar 27 2013
For n>0, a(n) = 3 * a(n-1) + 2^(n-1) = 2 * (a(n-1) + 3^(n-1)). - J. Conrad, Oct 29 2015
for n>0, a(n) = 2 * (1 + 2^(n-2) + Sum_{x=1..n-2} Sum_{k=0..x-1} (binomial(x-1,k)*(2^(k+1) + 2^(n-x+k)))). - J. Conrad, Dec 10 2015
E.g.f.: exp(2*x)*(2*exp(x) - 1). - Stefano Spezia, May 18 2024

Extensions

Better formulas from David W. Wilson and Michael Somos
Incorrect formula removed by Charles R Greathouse IV, Mar 18 2010
Duplications (due to corrections to A numbers) removed by Peter Munn, Jun 15 2017

A003063 a(n) = 3^(n-1) - 2^n.

Original entry on oeis.org

-1, -1, 1, 11, 49, 179, 601, 1931, 6049, 18659, 57001, 173051, 523249, 1577939, 4750201, 14283371, 42915649, 128878019, 386896201, 1161212891, 3484687249, 10456158899, 31372671001, 94126401611, 282395982049, 847221500579, 2541731610601, 7625329049531, 22876255584049
Offset: 1

Views

Author

Henrik Johansson (Henrik.Johansson(AT)Nexus.SE)

Keywords

Comments

Binomial transform of A000918: (-1, 0, 2, 6, 14, 30, ...). - Gary W. Adamson, Mar 23 2012
This sequence demonstrates 2^n as a loose lower bound for g(n) in Waring's problem. Since 3^n > 2(2^n) for all n > 2, the number 2^(n + 1) - 1 requires 2^n n-th powers for its representation since 3^n is not available for use in the sum: the gulf between the relevant powers of 2 and 3 widens considerably as n gets progressively larger. - Alonso del Arte, Feb 01 2013

Examples

			a(3) = 1 because 3^2 - 2^3 = 9 - 8 = 1.
a(4) = 11 because 3^3 - 2^4 = 27 - 16 = 11.
a(5) = 49 because 3^4 - 2^5 = 81 - 32 = 49.
		

Crossrefs

Cf. A000918, A056182 (first differences), A064686, A083313, A214091, A369490.
Cf. A363024 (prime terms).
From the third term onward the first differences of A005173.
Difference between two leftmost columns of A090888.
A diagonal in A254027.
Right edge of irregular triangle A252750.

Programs

Formula

Let b(n) = 2*(3/2)^n - 1. Then a(n) = -b(1-n)*3^(n-1) for n > 0. A083313(n) = A064686(n) = b(n)*2^(n-1) for n > 0. - Michael Somos, Aug 06 2006
From Colin Barker, May 27 2013: (Start)
a(n) = 5*a(n-1) - 6*a(n-2).
G.f.: -x*(1-4*x) / ((1-2*x)*(1-3*x)). (End)
E.g.f.: (1/3)*(2 - 3*exp(2*x) + exp(3*x)). - G. C. Greubel, Nov 03 2022

Extensions

A few more terms from Alonso del Arte, Feb 01 2013

A118654 Square array T(n,k) read by antidiagonals: T(n,k) = 2^n*Fibonacci(k) - Fibonacci(k-2).

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 3, 2, 1, 1, 7, 4, 3, 2, 1, 15, 8, 7, 5, 3, 1, 31, 16, 15, 11, 8, 5, 1, 63, 32, 31, 23, 18, 13, 8, 1, 127, 64, 63, 47, 38, 29, 21, 13, 1, 255, 128, 127, 95, 78, 61, 47, 34, 21, 1, 511, 256, 255, 191, 158, 125, 99, 76, 55, 34
Offset: 0

Views

Author

Ross La Haye, May 17 2006

Keywords

Comments

Inverse binomial transform (by columns) of A090888.

Examples

			T(2,3) = 7 because 2^2(Fibonacci(3)) - Fibonacci(3-2) = 4*2 - 1 = 7.
{1};
{1,  0};
{1,  1,  1};
{1,  3,  2,  1};
{1,  7,  4,  3,  2};
{1, 15,  8,  7,  5,  3};
{1, 31, 16, 15, 11,  8,  5};
{1, 63, 32, 31, 23, 18, 13,  8};
		

Crossrefs

Rows: T(0,k) = A000045(k-1), for k > 0; T(1,k) = A000045(k+1); T(2,k) = A000032(k+1); T(3,k) = A022097(k); T(4,k) = A022105(k); T(5,k) = A022401(k).
Columns: T(n,1) = A000225(n); T(n,2) = A000079(n); T(n,3) = A000225(n+1); T(n,4) = A055010(n+1); T(n,5) = A051633(n); a(T,6) = A036563(n+3).

Formula

T(n,k) = 2^n*Fibonacci(k) - Fibonacci(k-2).
T(n,k) = (2^n-2)*Fibonacci(k) + Fibonacci(k+1).
T(n,0) = 1; T(n,1) = 2^n - 1; T(n,k) = T(n,k-1) + T(n,k-2), for k > 1.
T(0,k) = Fibonacci(k-1); T(1,k) = Fibonacci(k+1); T(n,k) = 3T(n-1,k) - 2T(n-2,k), for n > 1.
T(n,k) = 2T(n-1,k) + Fibonacci(k-2), for n > 0.
T(n,k) = A109754(2^n-2, k+1) = A101220(2^n-2, 0, k+1), for n > 0.
O.g.f. (by rows) = (1+(-2+2^n)x)/(1-x-x^2).
Sum_{k=0..n} T(n-k,k) = A119587(n+1). - Ross La Haye, May 31 2006

A083313 a(0)=1; a(n) = 3^n - 2^(n-1) for n >= 1.

Original entry on oeis.org

1, 2, 7, 23, 73, 227, 697, 2123, 6433, 19427, 58537, 176123, 529393, 1590227, 4774777, 14332523, 43013953, 129074627, 387289417, 1161999323, 3486260113, 10459304627, 31378962457, 94138984523, 282421147873, 847271832227, 2541832273897, 7625530376123
Offset: 0

Views

Author

Paul Barry, Apr 24 2003

Keywords

Comments

Essentially the same as A064686.
Binomial transform of A051049.
Number of skinny Boolean functions f(x_1,...,x_n) that are also Horn functions. - Hugo Pfoertner, Mar 04 2019

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 4, fascicle 1, section 7.1.4, pp. 134, 138, 139, 219, answer to exercise 172, Addison-Wesley, 2009.

Crossrefs

Cf. A083314.

Programs

  • Magma
    [(2*3^n-2^n+0^n)/2: n in [0..30]]; // Vincenzo Librandi, Feb 01 2015
  • Maple
    A083313 := proc(n)
        if n = 0 then
            1;
        else
            3^n-2^(n-1) ;
        end if;
    end proc: # R. J. Mathar, Aug 01 2013
  • Mathematica
    CoefficientList[Series[((1 - x) + (1 - 2 x) (1 - 3 x)) / (2 (1 - 2 x) (1 - 3 x)), {x, 0, 30}], x] (* Vincenzo Librandi, Feb 01 2015 *)
    LinearRecurrence[{5,-6},{1,2,7},30] (* Harvey P. Dale, Sep 04 2017 *)
  • PARI
    Vec(((1-x)+(1-2*x)*(1-3*x))/(2*(1-2*x)*(1-3*x)) + O(x^30)) \\ Michel Marcus, Jan 31 2015
    
  • PARI
    print1(1,", ",s=2,", " );for(k=2,27,s=2^(k-2)+3*s;print1(s,", ")) \\ Hugo Pfoertner, Mar 04 2019
    

Formula

a(n) = (2*3^n - (2^n - 0^n))/2.
a(0) = 1, a(n) = 3^n - 2^(n-1) for n >= 1.
G.f.: ((1-x) + (1-2*x)*(1-3*x))/(2*(1-2*x)*(1-3*x)).
E.g.f.: (2*exp(3*x) - exp(2*x) + exp(0))/2.
a(n) = A090888(n-1, 4), for n > 0. - Ross La Haye, Sep 21 2004
Let b(n) = 2*(3/2)^n - 1. Then A003063(n) = -b(1-n)*3^(n-1) for n > 0. a(n) = A064686(n) = b(n)*2^(n-1) for n > 0. - Michael Somos, Aug 06 2006
From Alex Ratushnyak, Jul 03 2012: (Start)
a(n) mod 100 = 23 for n = 4*k-1, k >= 1.
a(n) mod 100 = 27 for n = 4*k+1, k >= 1.
(End)

Extensions

Better name by Alex Ratushnyak, Jul 02 2012

A098703 a(n) = (3^n + phi^(n-1) + (-phi)^(1-n)) / 5, where phi denotes the golden ratio A001622.

Original entry on oeis.org

0, 1, 2, 6, 17, 50, 148, 441, 1318, 3946, 11825, 35454, 106328, 318929, 956698, 2869950, 8609617, 25828474, 77484812, 232453449, 697358750, 2092073666, 6276216817, 18828643686, 56485920112, 169457742625, 508373199218, 1525119551286
Offset: 0

Views

Author

Ross La Haye, Oct 27 2004

Keywords

Comments

Sums of antidiagonals of A090888.
Partial sums of A099159.
Form an array with m(0,n) = A000045(n), the Fibonacci numbers, and m(i,j) = Sum_{kJ. M. Bergot, May 27 2013

Examples

			a(2) = 2 because 3^2 = 9, Luc(1) = 1 and (9 + 1) / 5 = 2.
		

Crossrefs

Programs

  • Magma
    I:=[0,1,2]; [n le 3 select I[n] else 4*Self(n-1)-2*Self(n-2)-3*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 18 2018
    
  • Mathematica
    f[n_] := (3^n + Fibonacci[n] + Fibonacci[n - 2])/5; Table[ f[n], {n, 0, 27}] (* Robert G. Wilson v, Nov 04 2004 *)
    LinearRecurrence[{4, -2, -3}, {0, 1, 2}, 30] (* Jean-François Alcover, Feb 17 2018 *)
  • SageMath
    def A098703(n): return (3**n + lucas_number2(n-1,1,-1))//5
    print([A098703(n) for n in range(21)]) # G. C. Greubel, Jun 02 2025

Formula

a(n) = (((1 + sqrt(5))^n - (1 - sqrt(5))^n) / (2^n*sqrt(5))) + ((3^n - (((1 + sqrt(5)) / 2)^(n+1) + ((1 - sqrt(5)) / 2)^(n+1))) / 5).
a(n) = (3^n + (((1 + sqrt(5)) / 2)^(n-1) + ((1 - sqrt(5)) / 2)^(n-1))) / 5.
a(n) = (3^n + A000032(n-1))/5 = A000045(n) + (3^n - A000032(n+1))/5.
a(n) = (3^n + A000045(n) + A000045(n-2))/5.
a(n) = (3^n + 4*A000045(n) - A000045(n+2))/5.
a(n) = Sum_{k=0...n-1} (A000045(k)*3^(n-k-1) - A000045(k-2)*2^(n-k-1)).
a(n) = 4*a(n-1) - 2*a(n-2) - 3*a(n-3).
a(n) = A000045(n) + A094688(n-1).
a(n) = 3^1 * a(n-1) - A000045(n-3), for n > 2.
a(n) = 3^2 * a(n-2) - A000285(n-4), for n > 3.
a(n) = 3^3 * a(n-3) - A022383(n-5), for n > 4.
Limit_{n -> oo} a(n) / a(n-1) = 3.
From Ross La Haye, Dec 21 2004: (Start)
a(n) = A101220(1,3,n).
Binomial transform of unsigned A084178.
Binomial transform of signed A084178 gives the Fibonacci oblongs (A001654). (End)
G.f.: x*(1-2*x)/((1-3*x)*(1-x-x^2)). - Ross La Haye, Aug 09 2005
a(0) = 0, a(1) = 1, a(n) = a(n-1) + a(n-2) + 3^(n-2) for n > 1. - Ross La Haye, Aug 20 2005
Binomial transform of A052964 beginning {0,1,0,3,1,10,...}. - Ross La Haye, May 31 2006

Extensions

More terms from Robert G. Wilson v, Nov 04 2004
More terms from Ross La Haye, Dec 21 2004
Showing 1-10 of 11 results. Next