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

A000012 The simplest sequence of positive numbers: the all 1's sequence.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 16 1994

Keywords

Comments

Number of ways of writing n as a product of primes.
Number of ways of writing n as a sum of distinct powers of 2.
Continued fraction for golden ratio A001622.
Partial sums of A000007 (characteristic function of 0). - Jeremy Gardiner, Sep 08 2002
An example of an infinite sequence of positive integers whose distinct pairwise concatenations are all primes! - Don Reble, Apr 17 2005
Binomial transform of A000007; inverse binomial transform of A000079. - Philippe Deléham, Jul 07 2005
A063524(a(n)) = 1. - Reinhard Zumkeller, Oct 11 2008
For n >= 0, let M(n) be the matrix with first row = (n n+1) and 2nd row = (n+1 n+2). Then a(n) = absolute value of det(M(n)). - K.V.Iyer, Apr 11 2009
The partial sums give the natural numbers (A000027). - Daniel Forgues, May 08 2009
From Enrique Pérez Herrero, Sep 04 2009: (Start)
a(n) is also tau_1(n) where tau_2(n) is A000005.
a(n) is a completely multiplicative arithmetical function.
a(n) is both squarefree and a perfect square. See A005117 and A000290. (End)
Also smallest divisor of n. - Juri-Stepan Gerasimov, Sep 07 2009
Also decimal expansion of 1/9. - Enrique Pérez Herrero, Sep 18 2009; corrected by Klaus Brockhaus, Apr 02 2010
a(n) is also the number of complete graphs on n nodes. - Pablo Chavez (pchavez(AT)cmu.edu), Sep 15 2009
Totally multiplicative sequence with a(p) = 1 for prime p. Totally multiplicative sequence with a(p) = a(p-1) for prime p. - Jaroslav Krizek, Oct 18 2009
n-th prime minus phi(prime(n)); number of divisors of n-th prime minus number of perfect partitions of n-th prime; the number of perfect partitions of n-th prime number; the number of perfect partitions of n-th noncomposite number. - Juri-Stepan Gerasimov, Oct 26 2009
For all n>0, the sequence of limit values for a(n) = n!*Sum_{k>=n} k/(k+1)!. Also, a(n) = n^0. - Harlan J. Brothers, Nov 01 2009
a(n) is also the number of 0-regular graphs on n vertices. - Jason Kimberley, Nov 07 2009
Differences between consecutive n. - Juri-Stepan Gerasimov, Dec 05 2009
From Matthew Vandermast, Oct 31 2010: (Start)
1) When sequence is read as a regular triangular array, T(n,k) is the coefficient of the k-th power in the expansion of (x^(n+1)-1)/(x-1).
2) Sequence can also be read as a uninomial array with rows of length 1, analogous to arrays of binomial, trinomial, etc., coefficients. In a q-nomial array, T(n,k) is the coefficient of the k-th power in the expansion of ((x^q -1)/(x-1))^n, and row n has a sum of q^n and a length of (q-1)*n + 1. (End)
The number of maximal self-avoiding walks from the NW to SW corners of a 2 X n grid.
When considered as a rectangular array, A000012 is a member of the chain of accumulation arrays that includes the multiplication table A003991 of the positive integers. The chain is ... < A185906 < A000007 < A000012 < A003991 < A098358 < A185904 < A185905 < ... (See A144112 for the definition of accumulation array.) - Clark Kimberling, Feb 06 2011
a(n) = A007310(n+1) (Modd 3) := A193680(A007310(n+1)), n>=0. For general Modd n (not to be confused with mod n) see a comment on A203571. The nonnegative members of the three residue classes Modd 3, called [0], [1], and [2], are shown in the array A088520, if there the third row is taken as class [0] after inclusion of 0. - Wolfdieter Lang, Feb 09 2012
Let M = Pascal's triangle without 1's (A014410) and V = a variant of the Bernoulli numbers A027641 but starting [1/2, 1/6, 0, -1/30, ...]. Then M*V = [1, 1, 1, 1, ...]. - Gary W. Adamson, Mar 05 2012
As a lower triangular array, T is an example of the fundamental generalized factorial matrices of A133314. Multiplying each n-th diagonal by t^n gives M(t) = I/(I-t*S) = I + t*S + (t*S)^2 + ... where S is the shift operator A129184, and T = M(1). The inverse of M(t) is obtained by multiplying the first subdiagonal of T by -t and the other subdiagonals by zero, so A167374 is the inverse of T. Multiplying by t^n/n! gives exp(t*S) with inverse exp(-t*S). - Tom Copeland, Nov 10 2012
The original definition of the meter was one ten-millionth of the distance from the Earth's equator to the North Pole. According to that historical definition, the length of one degree of latitude, that is, 60 nautical miles, would be exactly 111111.111... meters. - Jean-François Alcover, Jun 02 2013
Deficiency of 2^n. - Omar E. Pol, Jan 30 2014
Consider n >= 1 nonintersecting spheres each with surface area S. Define point p on sphere S_i to be a "public point" if and only if there exists a point q on sphere S_j, j != i, such that line segment pq INTERSECT S_i = {p} and pq INTERSECT S_j = {q}; otherwise, p is a "private point". The total surface area composed of exactly all private points on all n spheres is a(n)*S = S. ("The Private Planets Problem" in Zeitz.) - Rick L. Shepherd, May 29 2014
For n>0, digital roots of centered 9-gonal numbers (A060544). - Colin Barker, Jan 30 2015
Product of nonzero digits in base-2 representation of n. - Franklin T. Adams-Watters, May 16 2016
Alternating row sums of triangle A104684. - Wolfdieter Lang, Sep 11 2016
A fixed point of the run length transform. - Chai Wah Wu, Oct 21 2016
Length of period of continued fraction for sqrt(A002522) or sqrt(A002496). - A.H.M. Smeets, Oct 10 2017
a(n) is also the determinant of the (n+1) X (n+1) matrix M defined by M(i,j) = binomial(i,j) for 0 <= i,j <= n, since M is a lower triangular matrix with main diagonal all 1's. - Jianing Song, Jul 17 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = min(i,j) for 1 <= i,j <= n (see Xavier Merlin reference). - Bernard Schott, Dec 05 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = tau(gcd(i,j)) for 1 <= i,j <= n (see De Koninck & Mercier reference). - Bernard Schott, Dec 08 2020

Examples

			1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + ...)))) = A001622.
1/9 = 0.11111111111111...
From _Wolfdieter Lang_, Feb 09 2012: (Start)
Modd 7 for nonnegative odd numbers not divisible by 3:
A007310: 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, ...
Modd 3:  1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
(End)
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 692 pp. 90 and 297, Ellipses, Paris, 2004.
  • Xavier Merlin, Méthodix Algèbre, Exercice 1-a), page 153, Ellipses, Paris, 1995.
  • 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 277, 284.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
  • Paul Zeitz, The Art and Craft of Mathematical Problem Solving, The Great Courses, The Teaching Company, 2010 (DVDs and Course Guidebook, Lecture 6: "Pictures, Recasting, and Points of View", pp. 32-34).

Crossrefs

Programs

  • Haskell
    a000012 = const 1
    a000012_list = repeat 1 -- Reinhard Zumkeller, May 07 2012
    
  • Magma
    [1 : n in [0..100]];
    
  • Maple
    seq(1, i=0..150);
  • Mathematica
    Array[1 &, 50] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)
  • Maxima
    makelist(1, n, 1, 30); /* Martin Ettl, Nov 07 2012 */
    
  • PARI
    {a(n) = 1};
    
  • Python
    print([1 for n in range(90)]) # Michael S. Branicky, Apr 04 2022

Formula

a(n) = 1.
G.f.: 1/(1-x).
E.g.f.: exp(x).
G.f.: Product_{k>=0} (1 + x^(2^k)). - Zak Seidov, Apr 06 2007
Completely multiplicative with a(p^e) = 1.
Regarded as a square array by antidiagonals, g.f. 1/((1-x)(1-y)), e.g.f. Sum T(n,m) x^n/n! y^m/m! = e^{x+y}, e.g.f. Sum T(n,m) x^n y^m/m! = e^y/(1-x). Regarded as a triangular array, g.f. 1/((1-x)(1-xy)), e.g.f. Sum T(n,m) x^n y^m/m! = e^{xy}/(1-x). - Franklin T. Adams-Watters, Feb 06 2006
Dirichlet g.f.: zeta(s). - Ilya Gutkovskiy, Aug 31 2016
a(n) = Sum_{l=1..n} (-1)^(l+1)*2*cos(Pi*l/(2*n+1)) = 1 identically in n >= 1 (for n=0 one has 0 from the undefined sum). From the Jolley reference, (429) p. 80. Interpretation: consider the n segments between x=0 and the n positive zeros of the Chebyshev polynomials S(2*n, x) (see A049310). Then the sum of the lengths of every other segment starting with the one ending in the largest zero (going from the right to the left) is 1. - Wolfdieter Lang, Sep 01 2016
As a lower triangular matrix, T = M*T^(-1)*M = M*A167374*M, where M(n,k) = (-1)^n A130595(n,k). Note that M = M^(-1). Cf. A118800 and A097805. - Tom Copeland, Nov 15 2016

A000129 Pell numbers: a(0) = 0, a(1) = 1; for n > 1, a(n) = 2*a(n-1) + a(n-2).

Original entry on oeis.org

0, 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860, 33461, 80782, 195025, 470832, 1136689, 2744210, 6625109, 15994428, 38613965, 93222358, 225058681, 543339720, 1311738121, 3166815962, 7645370045, 18457556052, 44560482149, 107578520350, 259717522849
Offset: 0

Views

Author

Keywords

Comments

Sometimes also called lambda numbers.
Also denominators of continued fraction convergents to sqrt(2): 1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, 8119/5741, 19601/13860, 47321/33461, 114243/80782, ... = A001333/A000129.
Number of lattice paths from (0,0) to the line x=n-1 consisting of U=(1,1), D=(1,-1) and H=(2,0) steps (i.e., left factors of Grand Schroeder paths); for example, a(3)=5, counting the paths H, UD, UU, DU and DD. - Emeric Deutsch, Oct 27 2002
a(2*n) with b(2*n) := A001333(2*n), n >= 1, give all (positive integer) solutions to Pell equation b^2 - 2*a^2 = +1 (see Emerson reference). a(2*n+1) with b(2*n+1) := A001333(2*n+1), n >= 0, give all (positive integer) solutions to Pell equation b^2 - 2*a^2 = -1.
Bisection: a(2*n+1) = T(2*n+1, sqrt(2))/sqrt(2) = A001653(n), n >= 0 and a(2*n) = 2*S(n-1,6) = 2*A001109(n), n >= 0, with T(n,x), resp. S(n,x), Chebyshev's polynomials of the first, resp. second kind. S(-1,x)=0. See A053120, resp. A049310. - Wolfdieter Lang, Jan 10 2003
Consider the mapping f(a/b) = (a + 2b)/(a + b). Taking a = b = 1 to start with and carrying out this mapping repeatedly on each new (reduced) rational number gives the following sequence 1/1, 3/2, 7/5, 17/12, 41/29, ... converging to 2^(1/2). Sequence contains the denominators. - Amarnath Murthy, Mar 22 2003
This is also the Horadam sequence (0,1,1,2). Limit_{n->oo} a(n)/a(n-1) = sqrt(2) + 1 = A014176. - Ross La Haye, Aug 18 2003
Number of 132-avoiding two-stack sortable permutations.
From Herbert Kociemba, Jun 02 2004: (Start)
For n > 0, the number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 4 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 2, s(n) = 3.
Number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 4 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 1, s(n) = 2. (End)
Counts walks of length n from a vertex of a triangle to another vertex to which a loop has been added. - Mario Catalani (mario.catalani(AT)unito.it), Jul 23 2004
Apart from initial terms, Pisot sequence P(2,5). See A008776 for definition of Pisot sequences. - David W. Wilson
Sums of antidiagonals of A038207 [Pascal's triangle squared]. - Ross La Haye, Oct 28 2004
The Pell primality test is "If N is an odd prime, then P(N)-Kronecker(2,N) is divisible by N". "Most" composite numbers fail this test, so it makes a useful pseudoprimality test. The odd composite numbers which are Pell pseudoprimes (i.e., that pass the above test) are in A099011. - Jack Brennen, Nov 13 2004
a(n) = sum of n-th row of triangle in A008288 = A094706(n) + A000079(n). - Reinhard Zumkeller, Dec 03 2004
Pell trapezoids (cf. A084158); for n > 0, A001109(n) = (a(n-1) + a(n+1))*a(n)/2; e.g., 1189 = (12+70)*29/2. - Charlie Marion, Apr 01 2006
(0!a(1), 1!a(2), 2!a(3), 3!a(4), ...) and (1,-2,-2,0,0,0,...) form a reciprocal pair under the list partition transform and associated operations described in A133314. - Tom Copeland, Oct 29 2007
Let C = (sqrt(2)+1) = 2.414213562..., then for n > 1, C^n = a(n)*(1/C) + a(n+1). Example: C^3 = 14.0710678... = 5*(0.414213562...) + 12. Let X = the 2 X 2 matrix [0, 1; 1, 2]; then X^n * [1, 0] = [a(n-1), a(n); a(n), a(n+1)]. a(n) = numerator of n-th convergent to (sqrt(2)-1) = 0.414213562... = [2, 2, 2, ...], the convergents being [1/2, 2/5, 5/12, ...]. - Gary W. Adamson, Dec 21 2007
A = sqrt(2) = 2/2 + 2/5 + 2/(5*29) + 2/(29*169) + 2/(169*985) + ...; B = ((5/2) - sqrt(2)) = 2/2 + 2/(2*12) + 2/(12*70) + 2/(70*408) + 2/(408*2378) + ...; A+B = 5/2. C = 1/2 = 2/(1*5) + 2/(2*12) + 2/(5*29) + 2/(12*70) + 2/(29*169) + ... - Gary W. Adamson, Mar 16 2008
From Clark Kimberling, Aug 27 2008: (Start)
Related convergents (numerator/denominator):
lower principal convergents: A002315/A001653
upper principal convergents: A001541/A001542
intermediate convergents: A052542/A001333
lower intermediate convergents: A005319/A001541
upper intermediate convergents: A075870/A002315
principal and intermediate convergents: A143607/A002965
lower principal and intermediate convergents: A143608/A079496
upper principal and intermediate convergents: A143609/A084068. (End)
Equals row sums of triangle A143808 starting with offset 1. - Gary W. Adamson, Sep 01 2008
Binomial transform of the sequence:= 0,1,0,2,0,4,0,8,0,16,..., powers of 2 alternating with zeros. - Philippe Deléham, Oct 28 2008
a(n) is also the sum of the n-th row of the triangle formed by starting with the top two rows of Pascal's triangle and then each next row has a 1 at both ends and the interior values are the sum of the three numbers in the triangle above that position. - Patrick Costello (pat.costello(AT)eku.edu), Dec 07 2008
Starting with offset 1 = eigensequence of triangle A135387 (an infinite lower triangular matrix with (2,2,2,...) in the main diagonal and (1,1,1,...) in the subdiagonal). - Gary W. Adamson, Dec 29 2008
Starting with offset 1 = row sums of triangle A153345. - Gary W. Adamson, Dec 24 2008
From Charlie Marion, Jan 07 2009: (Start)
In general, denominators, a(k,n) and numerators, b(k,n), of continued fraction convergents to sqrt((k+1)/k) may be found as follows:
let a(k,0) = 1, a(k,1) = 2k; for n > 0, a(k,2n) = 2*a(k,2n-1) + a(k,2n-2)
and a(k,2n+1) = (2k)*a(k,2n) + a(k,2n-1);
let b(k,0) = 1, b(k,1) = 2k+1; for n > 0, b(k,2n) = 2*b(k,2n-1) + b(k,2n-2)
and b(k,2n+1) = (2k)*b(k,2n) + b(k,2n-1).
For example, the convergents to sqrt(2/1) start 1/1, 3/2, 7/5, 17/12, 41/29.
In general, if a(k,n) and b(k,n) are the denominators and numerators, respectively, of continued fraction convergents to sqrt((k+1)/k) as defined above, then
k*a(k,2n)^2 - a(k,2n-1)*a(k,2n+1) = k = k*a(k,2n-2)*a(k,2n) - a(k,2n-1)^2 and
b(k,2n-1)*b(k,2n+1) - k*b(k,2n)^2 = k+1 = b(k,2n-1)^2 - k*b(k,2n-2)*b(k,2n);
for example, if k=1 and n=3, then a(1,n) = a(n+1) and
1*a(1,6)^2 - a(1,5)*a(1,7) = 1*169^2 - 70*408 = 1;
1*a(1,4)*a(1,6) - a(1,5)^2 = 1*29*169 - 70^2 = 1;
b(1,5)*b(1,7) - 1*b(1,6)^2 = 99*577 - 1*239^2 = 2;
b(1,5)^2 - 1*b(1,4)*b(1,6) = 99^2 - 1*41*239 = 2.
(End)
Starting with offset 1 = row sums of triangle A155002, equivalent to the statement that the Fibonacci sequence convolved with the Pell sequence prefaced with a "1": (1, 1, 2, 5, 12, 29, ...) = (1, 2, 5, 12, 29, ...). - Gary W. Adamson, Jan 18 2009
It appears that P(p) == 8^((p-1)/2) (mod p), p = prime; analogous to [Schroeder, p. 90]: Fp == 5^((p-1)/2) (mod p). Example: Given P(11) = 5741, == 8^5 (mod 11). Given P(17) = 11336689, == 8^8 (mod 17) since 17 divides (8^8 - P(17)). - Gary W. Adamson, Feb 21 2009
Equals eigensequence of triangle A154325. - Gary W. Adamson, Feb 12 2009
Another combinatorial interpretation of a(n-1) arises from a simple tiling scenario. Namely, a(n-1) gives the number of ways of tiling a 1 X n rectangle with indistinguishable 1 X 2 rectangles and 1 X 1 squares that come in two varieties, say, A and B. For example, with C representing the 1 X 2 rectangle, we obtain a(4)=12 from AAA, AAB, ABA, BAA, ABB, BAB, BBA, BBB, AC, BC, CA and CB. - Martin Griffiths, Apr 25 2009
a(n+1) = 2*a(n) + a(n-1), a(1)=1, a(2)=2 was used by Theon from Smyrna. - Sture Sjöstedt, May 29 2009
The n-th Pell number counts the perfect matchings of the edge-labeled graph C_2 x P_(n-1), or equivalently, the number of domino tilings of a 2 X (n-1) cylindrical grid. - Sarah-Marie Belcastro, Jul 04 2009
As a fraction: 1/79 = 0.0126582278481... or 1/9799 = 0.000102051229...(1/119 and 1/10199 for sequence in reverse). - Mark Dols, May 18 2010
Limit_{n->oo} (a(n)/a(n-1) - a(n-1)/a(n)) tends to 2.0. Example: a(7)/a(6) - a(6)/a(7) = 169/70 - 70/169 = 2.0000845... - Gary W. Adamson, Jul 16 2010
Numbers k such that 2*k^2 +- 1 is a square. - Vincenzo Librandi, Jul 18 2010
Starting (1, 2, 5, ...) = INVERTi transform of A006190: (1, 3, 10, 33, 109, ...). - Gary W. Adamson, Aug 06 2010
[u,v] = [a(n), a(n-1)] generates all Pythagorean triples [u^2-v^2, 2uv, u^2+v^2] whose legs differ by 1. - James R. Buddenhagen, Aug 14 2010
An elephant sequence, see A175654. For the corner squares six A[5] vectors, with decimal values between 21 and 336, lead to this sequence (without the leading 0). For the central square these vectors lead to the companion sequence A078057. - Johannes W. Meijer, Aug 15 2010
Let the 2 X 2 square matrix A=[2, 1; 1, 0] then a(n) = the (1,1) element of A^(n-1). - Carmine Suriano, Jan 14 2011
Define a t-circle to be a first-quadrant circle tangent to the x- and y-axes. Such a circle has coordinates equal to its radius. Let C(0) be the t-circle with radius 1. Then for n > 0, define C(n) to be the next larger t-circle which is tangent to C(n - 1). C(n) has radius A001333(2n) + a(2n)*sqrt(2) and each of the coordinates of its point of intersection with C(n + 1) is a(2n + 1) + (A001333(2n + 1)*sqrt(2))/2. See similar Comments for A001109 and A001653, Sep 14 2005. - Charlie Marion, Jan 18 2012
A001333 and A000129 give the diagonal numbers described by Theon from Smyrna. - Sture Sjöstedt, Oct 20 2012
Pell numbers could also be called "silver Fibonacci numbers", since, for n >= 1, F(n+1) = ceiling(phi*F(n)), if n is even and F(n+1) = floor(phi*F(n)), if n is odd, where phi is the golden ratio, while a(n+1) = ceiling(delta*a(n)), if n is even and a(n+1) = floor(delta*a(n)), if n is odd, where delta = delta_S = 1+sqrt(2) is the silver ratio. - Vladimir Shevelev, Feb 22 2013
a(n) is the number of compositions (ordered partitions) of n-1 into two sorts of 1's and one sort of 2's. Example: the a(3)=5 compositions of 3-1=2 are 1+1, 1+1', 1'+1, 1'+1', and 2. - Bob Selcoe, Jun 21 2013
Between every two consecutive squares of a 1 X n array there is a flap that can be folded over one of the two squares. Two flaps can be lowered over the same square in 2 ways, depending on which one is on top. The n-th Pell number counts the ways n-1 flaps can be lowered. For example, a sideway representation for the case n = 3 squares and 2 flaps is \\., .//, \./, ./., .\., where . is an empty square. - Jean M. Morales, Sep 18 2013
Define a(-n) to be a(n) for n odd and -a(n) for n even. Then a(n) = A005319(k)*(a(n-2k+1) - a(n-2k)) + a(n-4k) = A075870(k)*(a(n-2k+2) - a(n-2k+1)) - a(n-4k+2). - Charlie Marion, Nov 26 2013
An alternative formulation of the combinatorial tiling interpretation listed above: Except for n=0, a(n-1) is the number of ways of partial tiling a 1 X n board with 1 X 1 squares and 1 X 2 dominoes. - Matthew Lehman, Dec 25 2013
Define a(-n) to be a(n) for n odd and -a(n) for n even. Then a(n) = A077444(k)*a(n-2k+1) + a(n-4k+2). This formula generalizes the formula used to define this sequence. - Charlie Marion, Jan 30 2014
a(n-1) is the top left entry of the n-th power of any of the 3 X 3 matrices [0, 1, 1; 1, 1, 1; 0, 1, 1], [0, 1, 1; 0, 1, 1; 1, 1, 1], [0, 1, 0; 1, 1, 1; 1, 1, 1] or [0, 0, 1; 1, 1, 1; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
a(n+1) counts closed walks on K2 containing two loops on the other vertex. Equivalently the (1,1) entry of A^(n+1) where the adjacency matrix of digraph is A=(0,1;1,2). - David Neil McGrath, Oct 28 2014
For n >= 1, a(n) equals the number of ternary words of length n-1 avoiding runs of zeros of odd lengths. - Milan Janjic, Jan 28 2015
This is a divisibility sequence (i.e., if n|m then a(n)|a(m)). - Tom Edgar, Jan 28 2015
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
a(n) is the number of compositions (ordered partitions) of n-1 into two kinds of parts, n and n', when the order of the 1 does not matter, or equivalently, when the order of the 1' does not matter. Example: When the order of the 1 does not matter, the a(3)=5 compositions of 3-1=2 are 1+1, 1+1'=1+1, 1'+1', 2 and 2'. (Contrast with entry from Bob Selcoe dated Jun 21 2013.) - Gregory L. Simay, Sep 07 2017
Number of weak orderings R on {1,...,n} that are weakly single-peaked w.r.t. the total ordering 1 < ... < n and for which {1,...,n} has exactly one minimal element for the weak ordering R. - J. Devillet, Sep 28 2017
Also the number of matchings in the (n-1)-centipede graph. - Eric W. Weisstein, Sep 30 2017
Let A(r,n) be the total number of ordered arrangements of an n+r tiling of r red squares and white tiles of total length n, where the individual tile lengths can range from 1 to n. A(r,0) corresponds to a tiling of r red squares only, and so A(r,0)=1. Let A_1(r,n) = Sum_{j=0..n} A(r,j) and let A_s(r,n) = Sum_{j=0..n} A_(s-1)(r,j). Then A_0(1,n) + A_2(3,n-4) + A_4(5,n-8) + ... + A_(2j) (2j+1, n-4j) = a(n) without the initial 0. - Gregory L. Simay, May 25 2018
(1, 2, 5, 12, 29, ...) is the fourth INVERT transform of (1, -2, 5, -12, 29, ...), as shown in A073133. - Gary W. Adamson, Jul 17 2019
Number of 2-compositions of n restricted to odd parts (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 17 2020
Also called the 2-metallonacci sequence; the g.f. 1/(1-k*x-x^2) gives the k-metallonacci sequence. - Michael A. Allen, Jan 23 2023
Named by Lucas (1878) after the English mathematician John Pell (1611-1685). - Amiram Eldar, Oct 02 2023
a(n) is the number of compositions of n when there are F(i) parts of size i, with i,n >= 1, F(n) the Fibonacci numbers, A000045(n) (see example below). - Enrique Navarrete, Dec 15 2023

Examples

			G.f. = x + 2*x^2 + 5*x^3 + 12*x^4 + 29*x^5 + 70*x^6 + 169*x^7 + 408*x^8 + 985*x^9 + ...
From _Enrique Navarrete_, Dec 15 2023: (Start)
From the comment on compositions with Fibonacci number of parts, F(n), there are F(1)=1 type of 1, F(2)=1 type of 2, F(3)=2 types of 3, F(4)=3 types of 4, F(5)=5 types of 5 and F(6)=8 types of 6.
The following table gives the number of compositions of n=6 with Fibonacci number of parts:
Composition, number of such compositions, number of compositions of this type:
6,           1,     8;
5+1,         2,    10;
4+2,         2,     6;
3+3,         1,     4;
4+1+1,       3,     9;
3+2+1,       6,    12;
2+2+2,       1,     1;
3+1+1+1,     4,     8;
2+2+1+1,     6,     6;
2+1+1+1+1,   5,     5;
1+1+1+1+1+1, 1,     1;
for a total of a(6)=70 compositions of n=6. (End).
		

References

  • J. Austin and L. Schneider, Generalized Fibonacci sequences in Pythagorean triple preserving sequences, Fib. Q., 58:1 (2020), 340-350.
  • P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 76.
  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 122-125, 1964.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 941.
  • J. M. Borwein, D. H. Bailey, and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 53.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 204.
  • John Derbyshire, Prime Obsession, Joseph Henry Press, 2004, see p. 16.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.1.
  • Shaun Giberson and Thomas J. Osler, Extending Theon's Ladder to Any Square Root, Problem 3858, Elementa, No. 4 1996.
  • R. P. Grimaldi, Ternary strings with no consecutive 0's and no consecutive 1's, Congressus Numerantium, 205 (2011), 129-149.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.5 The Fibonacci and Related Sequences, p. 288.
  • Thomas Koshy, Pell and Pell-Lucas Numbers with Applications, Springer, New York, 2014.
  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 43.
  • 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. 46, 61.
  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 224.
  • Manfred R. Schroeder, "Number Theory in Science and Communication", 5th ed., Springer-Verlag, 2009, p. 90.
  • 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).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987, p. 34.
  • D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 62.

Crossrefs

Partial sums of A001333.
2nd row of A172236.
a(n) = A054456(n-1, 0), n>=1 (first column of triangle).
Cf. A175181 (Pisano periods), A214028 (Entry points), A214027 (number of zeros in a fundamental period).
A077985 is a signed version.
INVERT transform of Fibonacci numbers (A000045).
Cf. A038207.
The following sequences (and others) belong to the same family: A001333, A000129, A026150, A002605, A046717, A015518, A084057, A063727, A002533, A002532, A083098, A083099, A083100, A015519.
Cf. A048739.
Cf. A073133.
Cf. A041085.
Sequences with g.f. 1/(1-k*x-x^2) or x/(1-k*x-x^2): A000045 (k=1), this sequence (k=2), A006190 (k=3), A001076 (k=4), A052918 (k=5), A005668 (k=6), A054413 (k=7), A041025 (k=8), A099371 (k=9), A041041 (k=10), A049666 (k=11), A041061 (k=12), A140455 (k=13), A041085 (k=14), A154597 (k=15), A041113 (k=16), A178765 (k=17), A041145 (k=18), A243399 (k=19), A041181 (k=20).

Programs

  • GAP
    a := [0,1];; for n in [3..10^3] do a[n] := 2 * a[n-1] + a[n-2]; od; A000129 := a; # Muniru A Asiru, Oct 16 2017
    
  • Haskell
    a000129 n = a000129_list !! n
    a000129_list = 0 : 1 : zipWith (+) a000129_list (map (2 *) $ tail a000129_list)
    -- Reinhard Zumkeller, Jan 05 2012, Feb 05 2011
    
  • Magma
    [0] cat [n le 2 select n else 2*Self(n-1) + Self(n-2): n in [1..35]]; // Vincenzo Librandi, Aug 08 2015
    
  • Maple
    A000129 := proc(n) option remember; if n <=1 then n; else 2*procname(n-1)+procname(n-2); fi; end;
    a:= n-> (<<2|1>, <1|0>>^n)[1, 2]: seq(a(n), n=0..40); # Alois P. Heinz, Aug 01 2008
    A000129 := n -> `if`(n<2, n, 2^(n-1)*hypergeom([1-n/2, (1-n)/2], [1-n], -1)):
    seq(simplify(A000129(n)), n=0..31); # Peter Luschny, Dec 17 2015
  • Mathematica
    CoefficientList[Series[x/(1 - 2*x - x^2), {x, 0, 60}], x] (* Stefan Steinerberger, Apr 08 2006 *)
    Expand[Table[((1 + Sqrt[2])^n - (1 - Sqrt[2])^n)/(2Sqrt[2]), {n, 0, 30}]] (* Artur Jasinski, Dec 10 2006 *)
    LinearRecurrence[{2, 1}, {0, 1}, 60] (* Harvey P. Dale, Jan 04 2012 *)
    a[ n_] := With[ {s = Sqrt@2}, ((1 + s)^n - (1 - s)^n) / (2 s)] // Simplify; (* Michael Somos, Jun 01 2013 *)
    Table[Fibonacci[n, 2], {n, 0, 20}] (* Vladimir Reshetnikov, May 08 2016 *)
    Fibonacci[Range[0, 20], 2] (* Eric W. Weisstein, Sep 30 2017 *)
    a[ n_] := ChebyshevU[n - 1, I] / I^(n - 1); (* Michael Somos, Oct 30 2021 *)
  • Maxima
    a[0]:0$
    a[1]:1$
    a[n]:=2*a[n-1]+a[n-2]$
    A000129(n):=a[n]$
    makelist(A000129(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
    
  • Maxima
    makelist((%i)^(n-1)*ultraspherical(n-1,1,-%i),n,0,24),expand; /* Emanuele Munarini, Mar 07 2018 */
    
  • PARI
    for (n=0, 4000, a=contfracpnqn(vector(n, i, 1+(i>1)))[2, 1]; if (a > 10^(10^3 - 6), break); write("b000129.txt", n, " ", a)); \\ Harry J. Smith, Jun 12 2009
    
  • PARI
    {a(n) = imag( (1 + quadgen( 8))^n )}; /* Michael Somos, Jun 01 2013 */
    
  • PARI
    {a(n) = if( n<0, -(-1)^n, 1) * contfracpnqn( vector( abs(n), i, 1 + (i>1))) [2, 1]}; /* Michael Somos, Jun 01 2013 */
    
  • PARI
    a(n)=([2, 1; 1, 0]^n)[2,1] \\ Charles R Greathouse IV, Mar 04 2014
    
  • PARI
    {a(n) = polchebyshev(n-1, 2, I) / I^(n-1)}; /* Michael Somos, Oct 30 2021 */
    
  • Python
    from itertools import islice
    def A000129_gen(): # generator of terms
        a, b = 0, 1
        yield from [a,b]
        while True:
            a, b = b, a+2*b
            yield b
    A000129_list = list(islice(A000129_gen(),20)) # Chai Wah Wu, Jan 11 2022
  • Sage
    [lucas_number1(n, 2, -1) for n in range(30)]  # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/(1 - 2*x - x^2). - Simon Plouffe in his 1992 dissertation.
a(2n+1)=A001653(n). a(2n)=A001542(n). - Ira Gessel, Sep 27 2002
G.f.: Sum_{n >= 0} x^(n+1) *( Product_{k = 1..n} (2*k + x)/(1 + 2*k*x) ) = Sum_{n >= 0} x^(n+1) *( Product_{k = 1..n} (x + 1 + k)/(1 + k*x) ) = Sum_{n >= 0} x^(n+1) *( Product_{k = 1..n} (x + 3 - k)/(1 - k*x) ) may all be proved using telescoping series. - Peter Bala, Jan 04 2015
a(n) = 2*a(n-1) + a(n-2), a(0)=0, a(1)=1.
a(n) = ((1 + sqrt(2))^n - (1 - sqrt(2))^n)/(2*sqrt(2)).
For initial values a(0) and a(1), a(n) = ((a(0)*sqrt(2)+a(1)-a(0))*(1+sqrt(2))^n + (a(0)*sqrt(2)-a(1)+a(0))*(1-sqrt(2))^n)/(2*sqrt(2)). - Shahreer Al Hossain, Aug 18 2019
a(n) = integer nearest a(n-1)/(sqrt(2) - 1), where a(0) = 1. - Clark Kimberling
a(n) = Sum_{i, j, k >= 0: i+j+2k = n} (i+j+k)!/(i!*j!*k!).
a(n)^2 + a(n+1)^2 = a(2n+1) (1999 Putnam examination).
a(2n) = 2*a(n)*A001333(n). - John McNamara, Oct 30 2002
a(n) = ((-i)^(n-1))*S(n-1, 2*i), with S(n, x) := U(n, x/2) Chebyshev's polynomials of the second kind. See A049310. S(-1, x)=0, S(-2, x)= -1.
Binomial transform of expansion of sinh(sqrt(2)x)/sqrt(2). E.g.f.: exp(x)sinh(sqrt(2)x)/sqrt(2). - Paul Barry, May 09 2003
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2k+1)*2^k. - Paul Barry, May 13 2003
a(n-2) + a(n) = (1 + sqrt(2))^(n-1) + (1 - sqrt(2))^(n-1) = A002203(n-1). (A002203(n))^2 - 8(a(n))^2 = 4(-1)^n. - Gary W. Adamson, Jun 15 2003
Unreduced g.f.: x(1+x)/(1 - x - 3x^2 - x^3); a(n) = a(n-1) + 3*a(n-2) + a(n-2). - Mario Catalani (mario.catalani(AT)unito.it), Jul 23 2004
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*2^(n-2k). - Mario Catalani (mario.catalani(AT)unito.it), Jul 23 2004
Apart from initial terms, inverse binomial transform of A052955. - Paul Barry, May 23 2004
a(n)^2 + a(n+2k+1)^2 = A001653(k)*A001653(n+k); e.g., 5^2 + 70^2 = 5*985. - Charlie Marion Aug 03 2005
a(n+1) = Sum_{k=0..n} binomial((n+k)/2, (n-k)/2)*(1+(-1)^(n-k))*2^k/2. - Paul Barry, Aug 28 2005
a(n) = a(n-1) + A001333(n-1) = A001333(n) - a(n-1) = A001109(n)/A001333(n) = sqrt(A001110(n)/A001333(n)^2) = ceiling(sqrt(A001108(n)/2)). - Henry Bottomley, Apr 18 2000
a(n) = F(n, 2), the n-th Fibonacci polynomial evaluated at x=2. - T. D. Noe, Jan 19 2006
Define c(2n) = -A001108(n), c(2n+1) = -A001108(n+1) and d(2n) = d(2n+1) = A001652(n); then ((-1)^n)*(c(n) + d(n)) = a(n). [Proof given by Max Alekseyev.] - Creighton Dement, Jul 21 2005
a(r+s) = a(r)*a(s+1) + a(r-1)*a(s). - Lekraj Beedassy, Sep 03 2006
a(n) = (b(n+1) + b(n-1))/n where {b(n)} is the sequence A006645. - Sergio Falcon, Nov 22 2006
From Miklos Kristof, Mar 19 2007: (Start)
Let F(n) = a(n) = Pell numbers, L(n) = A002203 = companion Pell numbers (A002203):
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)) = 8*F(n)*F(m)*F(k). (End)
a(n+1)*a(n) = 2*Sum_{k=0..n} a(k)^2 (a similar relation holds for A001333). - Creighton Dement, Aug 28 2007
a(n+1) = Sum_{k=0..n} binomial(n+1,2k+1) * 2^k = Sum_{k=0..n} A034867(n,k) * 2^k = (1/n!) * Sum_{k=0..n} A131980(n,k) * 2^k. - Tom Copeland, Nov 30 2007
Equals row sums of unsigned triangle A133156. - Gary W. Adamson, Apr 21 2008
a(n) (n >= 3) is the determinant of the (n-1) X (n-1) tridiagonal matrix with diagonal entries 2, superdiagonal entries 1 and subdiagonal entries -1. - Emeric Deutsch, Aug 29 2008
a(n) = A000045(n) + Sum_{k=1..n-1} A000045(k)*a(n-k). - Roger L. Bagula and Gary W. Adamson, Sep 07 2008
From Hieronymus Fischer, Jan 02 2009: (Start)
fract((1+sqrt(2))^n) = (1/2)*(1 + (-1)^n) - (-1)^n*(1+sqrt(2))^(-n) = (1/2)*(1 + (-1)^n) - (1-sqrt(2))^n.
See A001622 for a general formula concerning the fractional parts of powers of numbers x > 1, which satisfy x - x^(-1) = floor(x).
a(n) = round((1+sqrt(2))^n/(2*sqrt(2))) for n > 0. (End) [last formula corrected by Josh Inman, Mar 05 2024]
a(n) = ((4+sqrt(18))*(1+sqrt(2))^n + (4-sqrt(18))*(1-sqrt(2))^n)/4 offset 0. - Al Hakanson (hawkuu(AT)gmail.com), Aug 08 2009
If p[i] = Fibonacci(i) and if A is the Hessenberg matrix of order n defined by A[i,j] = p[j-i+1] when i<=j, A[i,j]=-1 when i=j+1, and A[i,j]=0 otherwise, then, for n >= 1, a(n) = det A. - Milan Janjic, May 08 2010
a(n) = 3*a(n-1) - a(n-2) - a(n-3), n > 2. - Gary Detlefs, Sep 09 2010
From Charlie Marion, Apr 13 2011: (Start)
a(n) = 2*(a(2k-1) + a(2k))*a(n-2k) - a(n-4k).
a(n) = 2*(a(2k) + a(2k+1))*a(n-2k-1) + a(n-4k-2). (End)
G.f.: x/(1 - 2*x - x^2) = sqrt(2)*G(0)/4; G(k) = ((-1)^k) - 1/(((sqrt(2) + 1)^(2*k)) - x*((sqrt(2) + 1)^(2*k))/(x + ((sqrt(2) - 1)^(2*k + 1))/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 02 2011
In general, for n > k, a(n) = a(k+1)*a(n-k) + a(k)*a(n-k-1). See definition of Pell numbers and the formula for Sep 04 2008. - Charlie Marion, Jan 17 2012
Sum{n>=1} (-1)^(n-1)/(a(n)*a(n+1)) = sqrt(2) - 1. - Vladimir Shevelev, Feb 22 2013
From Vladimir Shevelev, Feb 24 2013: (Start)
(1) Expression a(n+1) via a(n): a(n+1) = a(n) + sqrt(2*a^2(n) + (-1)^n);
(2) a(n+1)^2 - a(n)*a(n+2) = (-1)^n;
(3) Sum_{k=1..n} (-1)^(k-1)/(a(k)*a(k+1)) = a(n)/a(n+1);
(4) a(n)/a(n+1) = sqrt(2) - 1 + r(n), where |r(n)| < 1/(a(n+1)*a(n+2)). (End)
a(-n) = -(-1)^n * a(n). - Michael Somos, Jun 01 2013
G.f.: G(0)/(2+2*x) - 1/(1+x), where G(k) = 1 + 1/(1 - x*(2*k-1)/(x*(2*k+1) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Aug 10 2013
G.f.: Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 + x)/( x*(4*k+4 + x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 30 2013
a(n) = Sum_{r=0..n-1} Sum_{k=0..n-r-1} binomial(r+k,k)*binomial(k,n-k-r-1). - Peter Luschny, Nov 16 2013
a(n) = Sum_{k=1,3,5,...<=n} C(n,k)*2^((k-1)/2). - Vladimir Shevelev, Feb 06 2014
a(2n) = 2*a(n)*(a(n-1) + a(n)). - John Blythe Dobson, Mar 08 2014
a(k*n) = a(k)*a(k*n-k+1) + a(k-1)*a(k*n-k). - Charlie Marion, Mar 27 2014
a(k*n) = 2*a(k)*(a(k*n-k)+a(k*n-k-1)) + (-1)^k*a(k*n-2k). - Charlie Marion, Mar 30 2014
a(n+1) = (1+sqrt(2))*a(n) + (1-sqrt(2))^n. - Art DuPre, Apr 04 2014
a(n+1) = (1-sqrt(2))*a(n) + (1+sqrt(2))^n. - Art DuPre, Apr 04 2014
a(n) = F(n) + Sum_{k=1..n} F(k)*a(n-k), n >= 0 where F(n) the Fibonacci numbers A000045. - Ralf Stephan, May 23 2014
a(n) = round(sqrt(a(2n) + a(2n-1)))/2. - Richard R. Forberg, Jun 22 2014
a(n) = Product_{k divides n} A008555(k). - Tom Edgar, Jan 28 2015
a(n+k)^2 - A002203(k)*a(n)*a(n+k) + (-1)^k*a(n)^2 = (-1)^n*a(k)^2. - Alexander Samokrutov, Aug 06 2015
a(n) = 2^(n-1)*hypergeom([1-n/2, (1-n)/2], [1-n], -1) for n >= 2. - Peter Luschny, Dec 17 2015
a(n+1) = Sum_{k=0..n} binomial(n,k)*2^floor(k/2). - Tony Foster III, May 07 2017
a(n) = exp((i*Pi*n)/2)*sinh(n*arccosh(-i))/sqrt(2). - Peter Luschny, Mar 07 2018
From Rogério Serôdio, Mar 30 2018: (Start)
Some properties:
(1) a(n)^2 - a(n-2)^2 = 2*a(n-1)*(a(n) + a(n-2)) (see A005319);
(2) a(n-k)*a(n+k) = a(n)^2 + (-1)^(n+k+1)*a(k)^2;
(3) Sum_{k=2..n+1} a(k)*a(k-1) = a(n+1)^2 if n is odd, else a(n+1)^2 - 1 if n is even;
(4) a(n) - a(n-2*k+1) = (A077444(k) - 1)*a(n-2*k+1) + a(n-4*k+2);
(5) Sum_{k=n..n+9} a(k) = 41*A001333(n+5). (End)
From Kai Wang, Dec 30 2019: (Start)
a(m+r)*a(n+s) - a(m+s)*a(n+r) = -(-1)^(n+s)*a(m-n)*a(r-s).
a(m+r)*a(n+s) + a(m+s)*a(n+r) = (2*A002203(m+n+r+s) - (-1)^(n+s)*A002203(m-n)*A002203(r-s))/8.
A002203(m+r)*A002203(n+s) - A002203(m+s)*A002203(n+r) = (-1)^(n+s)*8*a(m-n)*a(r-s).
A002203(m+r)*A002203(n+s) - 8*a(m+s)*a(n+r) = (-1)^(n+s)*A002203(m-n)*A002203(r-s).
A002203(m+r)*A002203(n+s) + 8*a(m+s)*a(n+r) = 2*A002203(m+n+r+s)+ (-1)^(n+s)*8*a(m-n)*a(r-s). (End)
From Kai Wang, Jan 12 2020: (Start)
a(n)^2 - a(n+1)*a(n-1) = (-1)^(n-1).
a(n)^2 - a(n+r)*a(n-r) = (-1)^(n-r)*a(r)^2.
a(m)*a(n+1) - a(m+1)*a(n) = (-1)^n*a(m-n).
a(m-n) = (-1)^n (a(m)*A002203(n) - A002203(m)*a(n))/2.
a(m+n) = (a(m)*A002203(n) + A002203(m)*a(n))/2.
A002203(n)^2 - A002203(n+r)*A002203(n-r) = (-1)^(n-r-1)*8*a(r)^2.
A002203(m)*A002203(n+1) - A002203(m+1)*A002203(n) = (-1)^(n-1)*8*a(m-n).
A002203(m-n) = (-1)^(n)*(A002203(m)*A002203(n) - 8*a(m)*a(n) )/2.
A002203(m+n) = (A002203(m)*A002203(n) + 8*a(m)*a(n) )/2. (End)
From Kai Wang, Mar 03 2020: (Start)
Sum_{m>=1} arctan(2/a(2*m+1)) = arctan(1/2).
Sum_{m>=2} arctan(2/a(2*m+1)) = arctan(1/12).
In general, for n > 0,
Sum_{m>=n} arctan(2/a(2*m+1)) = arctan(1/a(2*n)). (End)
a(n) = (A001333(n+3*k) + (-1)^(k-1)*A001333(n-3*k)) / (20*A041085(k-1)) for any k>=1. - Paul Curtz, Jun 23 2021
Sum_{i=0..n} a(i)*J(n-i) = (a(n+1) + a(n) - J(n+2))/2 for J(n) = A001045(n). - Greg Dresden, Jan 05 2022
From Peter Bala, Aug 20 2022: (Start)
Sum_{n >= 1} 1/(a(2*n) + 1/a(2*n)) = 1/2.
Sum_{n >= 1} 1/(a(2*n+1) - 1/a(2*n+1)) = 1/4. Both series telescope - see A075870 and A005319.
Product_{n >= 1} ( 1 + 2/a(2*n) ) = 1 + sqrt(2).
Product_{n >= 2} ( 1 - 2/a(2*n) ) = (1/3)*(1 + sqrt(2)). (End)
G.f. = 1/(1 - Sum_{k>=1} Fibonacci(k)*x^k). - Enrique Navarrete, Dec 17 2023
Sum_{n >=1} 1/a(n) = 1.84220304982752858079237158327980838... - R. J. Mathar, Feb 05 2024
a(n) = ((3^(n+1) + 1)^(n-1) mod (9^(n+1) - 2)) mod (3^(n+1) - 1). - Joseph M. Shunia, Jun 06 2024

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

Original entry on oeis.org

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

Views

Author

Keywords

Comments

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

Examples

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

References

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

Crossrefs

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

Programs

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

Formula

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

Extensions

Chebyshev comments from Wolfdieter Lang, Jan 10 2003

A016825 Positive integers congruent to 2 (mod 4): a(n) = 4*n+2, for n >= 0.

Original entry on oeis.org

2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234
Offset: 0

Views

Author

Keywords

Comments

Twice the odd numbers, also called singly even numbers.
Numbers having equal numbers of odd and even divisors: A001227(a(n)) = A000005(2*a(n)). - Reinhard Zumkeller, Dec 28 2003
Continued fraction for coth(1/2) = (e+1)/(e-1). The continued fraction for tanh(1/2) = (e-1)/(e+1) would be a(0) = 0, a(n) = A016825(n-1), n >= 1.
No solutions to a(n) = b^2 - c^2. - Henry Bottomley, Jan 13 2001
Sequence gives m such that 8 is the largest power of 2 dividing A003629(k)^m-1 for any k. - Benoit Cloitre, Apr 05 2002
k such that Sum_{d|k} (-1)^d = A048272(k) = 0. - Benoit Cloitre, Apr 15 2002
Also k such that Sum_{d|k} phi(d)*mu(k/d) = A007431(k) = 0. - Benoit Cloitre, Apr 15 2002
Also k such that Sum_{d|k} (d/A000005(d))*mu(k/d) = 0, k such that Sum_{d|k}(A000005(d)/d)*mu(k/d) = 0. - Benoit Cloitre, Apr 19 2002
Solutions to phi(x) = phi(x/2); primorial numbers are here. - Labos Elemer, Dec 16 2002
Together with 1, numbers that are not the leg of a primitive Pythagorean triangle. - Lekraj Beedassy, Nov 25 2003
For n > 0: complement of A107750 and A023416(a(n)-1) = A023416(a(n)) <> A023416(a(n)+1). - Reinhard Zumkeller, May 23 2005
Also the minimal value of Sum_{i=1..n+2} (p(i) - p(i+1))^2, where p(n+3) = p(1), as p ranges over all permutations of {1,2,...,n+2} (see the Mihai reference). Example: a(2)=10 because the values of the sum for the permutations of {1,2,3,4} are 10 (8 times), 12 (8 times) and 18 (8 times). - Emeric Deutsch, Jul 30 2005
Except for a(n)=2, numbers having 4 as an anti-divisor. - Alexandre Wajnberg, Oct 02 2005
A139391(a(n)) = A006370(a(n)) = A005408(n). - Reinhard Zumkeller, Apr 17 2008
Also a(n) = (n-1) + n + (n+1) + (n+2), so a(n) and -a(n) are all the integers that are sums of four consecutive integers. - Rick L. Shepherd, Mar 21 2009
The denominator in Pi/8 = 1/2 - 1/6 + 1/10 - 1/14 + 1/18 - 1/22 + .... - Mohammad K. Azarian, Oct 13 2011
This sequence gives the positive zeros of i^x + 1 = 0, x real, where i^x = exp(i*x*Pi/2). - Ilya Gutkovskiy, Aug 08 2015
Numbers k such that Sum_{j=1..k} j^3 is not a multiple of k. - Chai Wah Wu, Aug 23 2017
Numbers k such that Lucas(k) is a multiple of 3. - Bruno Berselli, Oct 17 2017
Also numbers k such that t^k == -1 (mod 5), where t is a term of A047221. - Bruno Berselli, Dec 28 2017
The even numbers form a ring, and these are the primes in that ring. Note that unique factorization into primes does not hold, since 60 = 2*30 = 6*10. - N. J. A. Sloane, Nov 11 2019
Also numbers ending with 10 in base 2. - John Keith, May 09 2022

Examples

			0.4621171572600097585023184... = 0 + 1/(2 + 1/(6 + 1/(10 + 1/(14 + ...)))), i.e., c.f. for tanh(1/2).
2.1639534137386528487700040... = 2 + 1/(6 + 1/(10 + 1/(14 + 1/(18 + ...)))), i.e., c.f. for coth(1/2).
		

References

  • H. Bass, Mathematics, Mathematicians and Mathematics Education, Bull. Amer. Math. Soc. (N.S.) 42 (2004), no. 4, 417-430.
  • Arthur Beiser, Concepts of Modern Physics, 2nd Ed., McGraw-Hill, 1973.
  • J. R. Goldman, The Queen of Mathematics, 1998, p. 70.
  • Granino A. Korn and Theresa M. Korn, Mathematical Handbook for Scientists and Engineers, McGraw-Hill Book Company, New York (1968).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 262, 278.

Crossrefs

First differences of A001105.
Cf. A160327 (decimal expansion).
Subsequence of A042963.
Essentially the complement of A042965.

Programs

Formula

a(n) = 4*n + 2, for n >= 0.
a(n) = 2*A005408(n). - Lekraj Beedassy, Nov 28 2003
a(n) = A118413(n+1,2) for n>1. - Reinhard Zumkeller, Apr 27 2006
From Michael Somos, Apr 11 2007: (Start)
G.f.: 2*(1+x)/(1-x)^2.
E.g.f.: 2*(1+2*x)*exp(x).
a(n) = a(n-1) + 4.
a(-1-n) = -a(n). (End)
a(n) = 8*n - a(n-1) for n > 0, a(0)=2. - Vincenzo Librandi, Nov 20 2010
From Reinhard Zumkeller, Jun 11 2012, Jun 30 2012 and Jul 20 2012: (Start)
A080736(a(n)) = 0.
A007814(a(n)) = 1;
A037227(a(n)) = 3.
A214546(a(n)) = 0. (End)
a(n) = T(n+2) - T(n-2) where T(n) = n*(n+1)/2 = A000217(n). In general, if M(k,n) = 2*k*n + k, then M(k,n) = T(n+k) - T(n-k). - Charlie Marion, Feb 24 2020
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 1/sqrt(2-sqrt(2)) (A285871).
Product_{n>=1} (1 + (-1)^n/a(n)) = sqrt(1-1/sqrt(2)) (A154739). (End)

A040000 a(0)=1; a(n)=2 for n >= 1.

Original entry on oeis.org

1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Continued fraction expansion of sqrt(2) is 1 + 1/(2 + 1/(2 + 1/(2 + ...))).
Inverse binomial transform of Mersenne numbers A000225(n+1) = 2^(n+1) - 1. - Paul Barry, Feb 28 2003
A Chebyshev transform of 2^n: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))A(x/(1+x^2)). - Paul Barry, Oct 31 2004
An inverse Catalan transform of A068875 under the mapping g(x)->g(x(1-x)). A068875 can be retrieved using the mapping g(x)->g(xc(x)), where c(x) is the g.f. of A000108. A040000 and A068875 may be described as a Catalan pair. - Paul Barry, Nov 14 2004
Sequence of electron arrangement in the 1s 2s and 3s atomic subshells. Cf. A001105, A016825. - Jeremy Gardiner, Dec 19 2004
Binomial transform of A165326. - Philippe Deléham, Sep 16 2009
Let m=2. We observe that a(n) = Sum_{k=0..floor(n/2)} binomial(m,n-2*k). Then there is a link with A113311 and A115291: it is the same formula with respectively m=3 and m=4. We can generalize this result with the sequence whose g.f. is given by (1+z)^(m-1)/(1-z). - Richard Choulet, Dec 08 2009
With offset 1: number of permutations where |p(i) - p(i+1)| <= 1 for n=1,2,...,n-1. This is the identical permutation and (for n>1) its reversal.
Equals INVERT transform of bar(1, 1, -1, -1, ...).
Eventual period is (2). - Zak Seidov, Mar 05 2011
Also decimal expansion of 11/90. - Vincenzo Librandi, Sep 24 2011
a(n) = 3 - A054977(n); right edge of the triangle in A182579. - Reinhard Zumkeller, May 07 2012
With offset 1: minimum cardinality of the range of a periodic sequence with (least) period n. Of course the range's maximum cardinality for a purely periodic sequence with (least) period n is n. - Rick L. Shepherd, Dec 08 2014
With offset 1: n*a(1) + (n-1)*a(2) + ... + 2*a(n-1) + a(n) = n^2. - Warren Breslow, Dec 12 2014
With offset 1: decimal expansion of gamma(4) = 11/9 where gamma(n) = Cp(n)/Cv(n) is the n-th Poisson's constant. For the definition of Cp and Cv see A272002. - Natan Arie Consigli, Sep 11 2016
a(n) equals the number of binary sequences of length n where no two consecutive terms differ. Also equals the number of binary sequences of length n where no two consecutive terms are the same. - David Nacin, May 31 2017
a(n) is the period of the continued fractions for sqrt((n+2)/(n+1)) and sqrt((n+1)/(n+2)). - A.H.M. Smeets, Dec 05 2017
Also, number of self-avoiding walks and coordination sequence for the one-dimensional lattice Z. - Sean A. Irvine, Jul 27 2020

Examples

			sqrt(2) = 1.41421356237309504... = 1 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + ...)))). - _Harry J. Smith_, Apr 21 2009
G.f. = 1 + 2*x + 2*x^2 + 2*x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 2*x^7 + 2*x^8 + ...
11/90 = 0.1222222222222222222... - _Natan Arie Consigli_, Sep 11 2016
		

References

  • A. Beiser, Concepts of Modern Physics, 2nd Ed., McGraw-Hill, 1973.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.4 Powers and Roots, p. 144.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 276-278.

Crossrefs

Convolution square is A008574.
See A003945 etc. for (1+x)/(1-k*x).
From Jaume Oliver Lafont, Mar 26 2009: (Start)
Sum_{0<=k<=n} a(k) = A005408(n).
Prod_{0<=k<=n} a(k) = A000079(n). (End)
Cf. A000674 (boustrophedon transform).
Cf. A001333/A000129 (continued fraction convergents).
Cf. A000122, A002193 (sqrt(2) decimal expansion), A006487 (Egyptian fraction).
Cf. Other continued fractions for sqrt(a^2+1) = (a, 2a, 2a, 2a....): A040002 (contfrac(sqrt(5)) = (2,4,4,...)), A040006, A040012, A040020, A040030, A040042, A040056, A040072, A040090, A040110 (contfrac(sqrt(122)) = (11,22,22,...)), A040132, A040156, A040182, A040210, A040240, A040272, A040306, A040342, A040380, A040420 (contfrac(sqrt(442)) = (21,42,42,...)), A040462, A040506, A040552, A040600, A040650, A040702, A040756, A040812, A040870, A040930 (contfrac(sqrt(962)) = (31,62,62,...)).

Programs

  • Haskell
    a040000 0 = 1; a040000 n = 2
    a040000_list = 1 : repeat 2  -- Reinhard Zumkeller, May 07 2012
  • Maple
    Digits := 100: convert(evalf(sqrt(2)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[2],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
    a[ n_] := 2 - Boole[n == 0]; (* Michael Somos, Dec 28 2014 *)
    PadRight[{1},120,2] (* or *) RealDigits[11/90, 10, 120][[1]] (* Harvey P. Dale, Jul 12 2025 *)
  • PARI
    {a(n) = 2-!n}; /* Michael Somos, Apr 16 2007 */
    
  • PARI
    a(n)=1+sign(n)  \\ Jaume Oliver Lafont, Mar 26 2009
    
  • PARI
    allocatemem(932245000); default(realprecision, 21000); x=contfrac(sqrt(2)); for (n=0, 20000, write("b040000.txt", n, " ", x[n+1]));  \\ Harry J. Smith, Apr 21 2009
    

Formula

G.f.: (1+x)/(1-x). - Paul Barry, Feb 28 2003
a(n) = 2 - 0^n; a(n) = Sum_{k=0..n} binomial(1, k). - Paul Barry, Oct 16 2004
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k, k)*2^(n-2*k)/(n-k). - Paul Barry, Oct 31 2004
A040000(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(-1)^k*A068875(n-k). - Paul Barry, Nov 14 2004
From Michael Somos, Apr 16 2007: (Start)
Euler transform of length 2 sequence [2, -1].
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = (u-v)*(u+v) - 2*v*(u-w).
E.g.f.: 2*exp(x) - 1.
a(n) = a(-n) for all n in Z (one possible extension to n<0). (End)
G.f.: (1-x^2)/(1-x)^2. - Jaume Oliver Lafont, Mar 26 2009
G.f.: exp(2*atanh(x)). - Jaume Oliver Lafont, Oct 20 2009
a(n) = Sum_{k=0..n} A108561(n,k)*(-1)^k. - Philippe Deléham, Nov 17 2013
a(n) = 1 + sign(n). - Wesley Ivan Hurt, Apr 16 2014
10 * 11/90 = 11/9 = (11/2 R)/(9/2 R) = Cp(4)/Cv(4) = A272005/A272004, with R = A081822 (or A070064). - Natan Arie Consigli, Sep 11 2016
a(n) = A001227(A000040(n+1)). - Omar E. Pol, Feb 28 2018

A001076 Denominators of continued fraction convergents to sqrt(5).

Original entry on oeis.org

0, 1, 4, 17, 72, 305, 1292, 5473, 23184, 98209, 416020, 1762289, 7465176, 31622993, 133957148, 567451585, 2403763488, 10182505537, 43133785636, 182717648081, 774004377960, 3278735159921, 13888945017644, 58834515230497, 249227005939632, 1055742538989025
Offset: 0

Views

Author

Keywords

Comments

a(2*n+1) with b(2*n+1) := A001077(2*n+1), n >= 0, give all (positive integer) solutions to Pell equation b^2 - 5*a^2 = -1, a(2*n) with b(2*n) := A001077(2*n), n >= 1, give all (positive integer) solutions to Pell equation b^2 - 5*a^2 = +1 (cf. Emerson reference).
Bisection: a(2*n+1) = T(2*n+1, sqrt(5))/sqrt(5) = A007805(n), n >= 0 and a(2*n) = 4*S(n-1,18), n >= 0, with T(n,x), resp. S(n,x), Chebyshev's polynomials of the first, resp. second kind. S(-1,x)=0. See A053120, resp. A049310. S(n,18)=A049660(n+1). - Wolfdieter Lang, Jan 10 2003
Apart from initial terms, this is the Pisot sequence E(4,17), a(n) = floor(a(n-1)^2/a(n-2) + 1/2).
This is also the Horadam sequence (0,1,1,4), having the recurrence relation a(n) = s*a(n-1) + r*a(n-2); for n > 1, where a(0) = 0, a(1) = 1, s = 4, r = 1. a(n) / a(n-1) converges to 5^1/2 + 2 as n approaches infinity. 5^(1/2) + 2 can also be written as (2 * Phi) + 1 and Phi^2 + Phi. - Ross La Haye, Aug 18 2003
Numerators of continued fraction [4, 4, 4, ...], where the convergents to [4, 4, 4, ...] = (4/1, 17/4, 72/17, ...). Let X = the 2 X 2 matrix [0, 1; 1, 4]; then X^n = [a(n-1), a(n); a(n), a(n+1)]; e.g., X^3 = [4, 17; 17, 72]. Let C = the limit of a(n)/a(n-1) = 2 + sqrt(5) = 4.236067977...; then C^n = a(n+1) + (1/C)*a(n), where (1/C) = 0.236067977... . Example: C^3 = 76.01315556..., = 72 + 17*(0.2360679...). - Gary W. Adamson, Dec 15 2007, corrected by Greg Dresden, Sep 16 2019, corrected by Alex Mark, Jul 21 2020
Sqrt(5) = 4/2 + 4/17 + 4/(17*305) + 4/(305*5473) + 4/(5473*98209) + ... . - Gary W. Adamson, Dec 15 2007
a(p) == 20^((p-1)/2) (mod p) for odd primes p. - Gary W. Adamson, Feb 22 2009
a(n) = A167808(3*n). - Reinhard Zumkeller, Nov 12 2009
For n >= 2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 4's along the main diagonal and 1's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 08 2011
Moreover, a(n) is the second binomial transform of (0,1,0,5,0,25,...) (see also A033887). This fact can be proved similarly like the proof of Paul Barry's remark in A033887 by using the following scaling identity for delta-Fibonacci numbers: y^n b(n;x/y) = Sum_{k=0..n} binomial(n,k) (y-1)^(n-k) b(k;x) and the fact that b(n;2) = (1-(-1)^n) 5^floor(n/2). - Roman Witula, Jul 12 2012
Binomial transform of 0, 1, 2, 8, 24, 80, 256, ... (A063727 with offset 1). - R. J. Mathar, Feb 05 2014
For n >= 1, a(n) equals the number of words of length n-1 on alphabet {0,1,...,4} avoiding runs of zeros of odd lengths. - Milan Janjic, Jan 28 2015
With offset 1 is the INVERT transform of A006190: (1, 3, 10, 33, 109, 360, ...). - Gary W. Adamson, Jul 24 2015
From Rogério Serôdio, Mar 30 2018: (Start)
This is a divisibility sequence (i.e., if n|m then a(n)|a(m)).
gcd(a(n),a(n+k)) = a(gcd(n, k)) for all positive integers n and k. (End)
The initial 0 of this sequence is in contradiction with the fact that 0 is no valid denominator and according to all standard references, the first convergent of a continued fraction is p(0)/q(0) = b(0)/1 where b(0) is the first term of the continued fraction, given by the integer part of the number. One may artificially define q(-1) = 0 to have a recurrent relation q(n) = b(n)*q(n-1) + q(n-2), n >= 1, but then its index should be -1. - M. F. Hasler, Nov 01 2019
Number of 4-compositions of n restricted to odd parts (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 17 2020
From Michael A. Allen, Feb 15 2023: (Start)
Also called the 4-metallonacci sequence; the g.f. 1/(1-k*x-x^2) gives the k-metallonacci sequence.
a(n+1) is the number of tilings of an n-board (a board with dimensions n X 1) using unit squares and dominoes (with dimensions 2 X 1) if there are 4 kinds of squares available. (End)
a(n) is the smallest nonnegative integer that is the sum of n, but no fewer, Fibonacci numbers including negative-index Fibonacci numbers (A039834), with that sum being a(n) = Sum_{i=0..n-1} A000045(3*i+1). a(n) is also the smallest nonnegative integer that is the sum of n, but no fewer, terms each of which is either a Fibonacci number or the negative of a Fibonacci number. (See A027941 for negatives disallowed.) - Mike Speciner, Oct 08 2023
From Enrique Navarrete, Dec 16 2023: (Start)
a(n) is the number of compositions of n when there are P(k) sorts of parts k, with k,n > = 1, where P(k) = A006190(k) is the k-th 3-metallonacci number (see example below).
In general, the number of compositions with k-metallonacci number of parts is counted by the (k+1)-st metallonacci sequence (note k=1 and k=2 are the Fibonacci and the Pell numbers, respectively). (End).
a(n) is the number of tilings of a 2 X n rectangle missing the top right 1 X 1 cell, using 1 X 1 squares, dominoes and right trominoes. Compare to A110679 which is the same problem but without the missing top right cell. - Greg Dresden and Yilin Zhu, Jul 10 2025

Examples

			1 2 9 38 161 (A001077)
-,-,-,--,---, ...
0 1 4 17 72 (A001076)
G.f. = x + 4*x^2 + 17*x^3 + 72*x^4 + 305*x^5 + 1292*x^6 + 5473*x^7 + 23184*x^8 + ...
From _Enrique Navarrete_, Dec 16 2023: (Start)
From the comment on compositions with 3-metallonacci sorts of parts, A006190(k), there are A006190(1)=1 type of 1, A006190(2)=3 types of 2, A006190(3)=10 types of 3, A006190(4)=33 types of 4, A006190(5)=109 types of 5 and A006190(6)=360 types of 6. The following table gives the number of compositions of n=6:
Composition, number of such compositions, number of compositions of this type:
 6,              1,      360;
 5+1,            2,      218;
 4+2,            2,      198;
 3+3,            1,      100;
 4+1+1,          3,       99;
 3+2+1,          6,      180;
 2+2+2,          1,       27;
 3+1+1+1,        4,       40;
 2+2+1+1,        6,       54;
 2+1+1+1+1,      5,       15;
 1+1+1+1+1+1,    1,        1;
for a total of a(6)=1292 compositions of n=6. (End)
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 23.
  • S. Koshkin, Non-classical linear divisibility sequences ..., Fib. Q., 57 (No. 1, 2019), 68-80. See Table 1.
  • 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).
  • V. Thébault, Les Récréations Mathématiques. Gauthier-Villars, Paris, 1952, p. 282.

Crossrefs

Row n=4 of A073133, A172236 and A352361.
Cf. A000045, A001077, A015448, A175183 (Pisano periods).
Partial sums of A033887. First differences of A049652. Bisection of A059973.
Third column of array A028412.

Programs

  • GAP
    a:=[0,1];; for n in [3..30] do a[n]:=4*a[n-1]+a[n-2]; od; a; # Muniru A Asiru, Mar 31 2018
    
  • Magma
    I:=[0,1]; [n le 2 select I[n] else 4*Self(n-1) + Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 24 2018
    
  • Maple
    A001076:=-1/(-1+4*z+z**2); # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Join[{0}, Denominator[Convergents[Sqrt[5], 30]]] (* Harvey P. Dale, Dec 10 2011 *)
    a[ n_] := Fibonacci[3*n] / 2; (* Michael Somos, Feb 23 2014 *)
    a[ n_] := ((2 + Sqrt[5])^n - (2 - Sqrt[5])^n) /(2 Sqrt[5]) // Simplify; (* Michael Somos, Feb 23 2014 *)
    LinearRecurrence[{4, 1}, {0, 1}, 26] (* Jean-François Alcover, Sep 23 2017 *)
    a[ n_] := Fibonacci[n, 4]; (* Michael Somos, Nov 02 2021 *)
  • Maxima
    a(n):=sum(4^(n-1-2*k)*binomial(n-k-1,n-2*k-1),k,0,floor((n)/2));/* Vladimir Kruchinin, Oct 02 2022 */
  • MuPAD
    numlib::fibonacci(3*n)/2 $ n = 0..30; // Zerinvary Lajos, May 09 2008
    
  • PARI
    {a(n) = fibonacci(3*n) / 2}; /* Michael Somos, Aug 11 2009 */
    
  • PARI
    {a(n) = imag( (2 + quadgen(20))^n )}; /* Michael Somos, Feb 23 2014 */
    
  • PARI
    {a(n) = polchebyshev(n-1, 2, 2*I)/I^(n-1)}; /* Michael Somos, Nov 02 2021 */
    
  • Sage
    [lucas_number1(n,4,-1) for n in range(23)] # Zerinvary Lajos, Apr 23 2009
    
  • Sage
    [fibonacci(3*n)/2 for n in range(23)] # Zerinvary Lajos, May 15 2009
    

Formula

a(n) = 4*a(n-1) + a(n-2), n > 1. a(0)=0, a(1)=1.
G.f.: x/(1 - 4*x - x^2).
a(n) = ((2+sqrt(5))^n - (2-sqrt(5))^n)/(2*sqrt(5)).
a(n) = A014445(n)/2 = F(3n)/2.
a(n) = ((-i)^(n-1))*S(n-1, 4*i), with i^2 = -1 and S(n, x) := U(n, x/2) Chebyshev's polynomials of the second kind. See A049310. S(-1, x) = 0.
a(n) = Sum_{i=0..n} Sum_{j=0..n} Fibonacci(i+j)*n!/(i!j!(n-i-j)!)/2. - Paul Barry, Feb 06 2004
E.g.f.: exp(2*x)*sinh(sqrt(5)*x)/sqrt(5). - Vladeta Jovovic, Sep 01 2004
a(n) = F(1) + F(4) + F(7) + ... + F(3n-2), for n > 0.
Conjecture: 2a(n+1) = a(n+2) - A001077(n+1). - Creighton Dement, Nov 28 2004
a(n) = Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*F(j)/2. - Paul Barry, Feb 14 2005
a(n) = A048876(n) - A048875(n). - Creighton Dement, Mar 19 2005
Let M = {{0, 1}, {1, 4}}, v[1] = {0, 1}, v[n] = M.v[n - 1]; then a(n) = v[n][[1]]. - Roger L. Bagula, May 29 2005
a(n) = F(n, 4), the n-th Fibonacci polynomial evaluated at x=4. - T. D. Noe, Jan 19 2006
[A015448(n), a(n)] = [1,4; 1,3]^n * [1,0]. - Gary W. Adamson, Mar 21 2008
a(n) = (Sum_{k=0..n} Fibonacci(3*k-2)) + 1. - Gary Detlefs, Dec 26 2010
a(n) = (3*(-1)^n*F(n) + 5*F(n)^3)/2, n >= 0. See the general D. Jennings formula given in a comment on triangle A111125, where also the reference is given. Here the second (k=1) row [3,1] applies. - Wolfdieter Lang, Sep 01 2012
Sum_{k>=1} (-1)^(k-1)/(a(k)*a(k+1)) = (Sum_{k>=1} (-1)^(k-1)/(F_k*F_(k+1)))^3 = phi^(-3), where F_n is the n-th Fibonacci numbers (A000045) and phi is golden ratio (A001622). - Vladimir Shevelev, Feb 23 2013
G.f.: Q(0)*x/(2-4*x), where Q(k) = 1 + 1/(1 - x*(5*k-4)/(x*(5*k+1) - 2/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Oct 11 2013
a(-n) = -(-1)^n * a(n). - Michael Somos, Feb 23 2014
The o.g.f. A(x) = x/(1 - 4*x - x^2) satisfies A(x) + A(-x) + 8*A(x)*A(-x) = 0 or equivalently (1 + 8*A(x))*(1 + 8*A(-x)) = 1. The o.g.f. for A049660 equals -A(sqrt(x))*A(-sqrt(x)). - Peter Bala, Apr 02 2015
From Rogério Serôdio, Mar 30 2018: (Start)
Some properties:
(1) a(n)*a(n+1) = 4*Sum_{k=1..n} a(k)^2;
(2) a(n)^2 + a(n+1)^2 = a(2*n+1);
(3) a(n)^2 - a(n-2)^2 = 4*a(n-1)*(a(n) + a(n-2));
(4) a(m*(p+1)) = a(m*p)*a(m+1) + a(m*p-1)*a(m);
(5) a(n-k)*a(n+k) = a(n)^2 + (-1)^(n+k+1)*a(k)^2;
(6) a(n-1)*a(n+1) = a(n)^2 + (-1)^n (particular case of (5)!);
(7) a(2*n) = 2*a(n)*(2*a(n) + a(n-1));
(8) 3*Sum_{k=2..n+1} a(k)*a(k-1) is equal to a(n+1)^2 if n odd, and is equal to a(n+1)^2 - 1 if n is even;
(9) a(n) - a(n-2*k+1) = alpha(k)*a(n-2*k+1) + a(n-4*k+2), where alpha(k) = (2+sqrt(5))^(2*k-1) + (2-sqrt(5))^(2*k-1);
(10) 31|Sum_{k=n..n+9} a(k), for all positive n. (End)
O.g.f.: x*exp(Sum_{n >= 1} Lucas(3*n)*x^n/n) = x + 4*x^2 + 17*x^3 + .... - Peter Bala, Oct 11 2019
a(n) = Sum_{k=0..floor(n/2)} 4^(n-2*k-1)*C(n-k-1,n-2*k-1). - Vladimir Kruchinin, Oct 02 2022
a(n) = i^(n-1)*S(n-1, -4*i), with i = sqrt(-1), and the Chebyshev S-polynomials (see A049310) with S(n, -1) = 0. - Gary Detlefs and Wolfdieter Lang, Mar 06 2023
G.f.: x/(1 - 4*x - x^2) = Sum_{n >= 0} x^(n+1) * ( Product_{k = 1..n} (m*k + 4 - m + x)/(1 + m*k*x) ) for arbitrary m (a telescoping series). - Peter Bala, May 08 2024
a(n) = 4^(n-1)*hypergeom([(1-n)/2, 1-n/2], [1-n], -1/4) for n > 0. - Peter Luschny, Mar 30 2025
a(n) = a(n-1) + A110679(n-1) + A110679(n-2) = a(n-1) + Fibonacci(3*n-2). - Greg Dresden and Yilin Zhu, Jul 10 2025

A040001 1 followed by {1, 2} repeated.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
Offset: 0

Views

Author

Keywords

Comments

Continued fraction for sqrt(3).
Also coefficient of the highest power of q in the expansion of the polynomial nu(n) defined by: nu(0)=1, nu(1)=b and for n>=2, nu(n)=b*nu(n-1)+lambda*(n-1)_q*nu(n-2) with (b,lambda)=(1,1), where (n)_q=(1+q+...+q^(n-1)) and q is a root of unity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
nu(0)=1 nu(1)=1; nu(2)=2; nu(3)=3+q; nu(4)=5+3q+2q^2; nu(5)=8+7q+6q^2+4q^3+q^4; nu(6)=13+15q+16q^2+14q^3+11q^4+5q^5+2q^6.
From Jaroslav Krizek, May 28 2010: (Start)
a(n) = denominators of arithmetic means of the first n positive integers for n >= 1.
See A026741(n+1) or A145051(n) - denominators of arithmetic means of the first n positive integers. (End)
From R. J. Mathar, Feb 16 2011: (Start)
This is a prototype of multiplicative sequences defined by a(p^e)=1 for odd primes p, and a(2^e)=c with some constant c, here c=2. They have Dirichlet generating functions (1+(c-1)/2^s)*zeta(s).
Examples are A153284, A176040 (c=3), A040005 (c=4), A021070, A176260 (c=5), A040011, A176355 (c=6), A176415 (c=7), A040019, A021059 (c=8), A040029 (c=10), A040041 (c=12). (End)
a(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = A000325(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012
For n > 0: denominators of row sums of the triangular enumeration of rational numbers A226314(n,k) / A054531(n,k), 1 <= k <= n; see A226555 for numerators. - Reinhard Zumkeller, Jun 10 2013
From Jianing Song, Nov 01 2022: (Start)
For n > 0, a(n) is the minimal gap of distinct numbers coprime to n. Proof: denote the minimal gap by b(n). For odd n we have A058026(n) > 0, hence b(n) = 1. For even n, since 1 and -1 are both coprime to n we have b(n) <= 2, and that b(n) >= 2 is obvious.
The maximal gap is given by A048669. (End)

Examples

			1.732050807568877293527446341... = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...))))
G.f. = 1 + x + 2*x^2 + x^3 + 2*x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + x^9 + ...
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.4 Powers and Roots, p. 144.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A000034, A002194, A133566, A083329 (binomial Transf).
Apart from a(0) the same as A134451.

Programs

  • Haskell
    a040001 0 = 1; a040001 n = 2 - mod n 2
    a040001_list = 1 : cycle [1, 2]  -- Reinhard Zumkeller, Apr 16 2015
  • Maple
    Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
  • Mathematica
    ContinuedFraction[Sqrt[3],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
    PadRight[{1},120,{2,1}] (* Harvey P. Dale, Nov 26 2015 *)
  • PARI
    {a(n) = 2 - (n==0) - (n%2)} /* Michael Somos, Jun 11 2003 */
    
  • PARI
    { allocatemem(932245000); default(realprecision, 12000); x=contfrac(sqrt(3)); for (n=0, 20000, write("b040001.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009
    

Formula

Multiplicative with a(p^e) = 2 if p even; 1 if p odd. - David W. Wilson, Aug 01 2001
G.f.: (1 + x + x^2) / (1 - x^2). E.g.f.: (3*exp(x)-2*exp(0)+exp(-x))/2. - Paul Barry, Apr 27 2003
a(n) = (3-2*0^n +(-1)^n)/2. a(-n)=a(n). a(2n+1)=1, a(2n)=2, n nonzero.
a(n) = sum{k=0..n, F(n-k+1)*(-2+(1+(-1)^k)/2+C(2, k)+0^k)}. - Paul Barry, Jun 22 2007
Row sums of triangle A133566. - Gary W. Adamson, Sep 16 2007
Euler transform of length 3 sequence [ 1, 1, -1]. - Michael Somos, Aug 04 2009
Moebius transform is length 2 sequence [ 1, 1]. - Michael Somos, Aug 04 2009
a(n) = sign(n) + ((n+1) mod 2) = 1 + sign(n) - (n mod 2). - Wesley Ivan Hurt, Dec 13 2013

A001203 Simple continued fraction expansion of Pi.

Original entry on oeis.org

3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, 15, 3, 13, 1, 4, 2, 6, 6, 99, 1, 2, 2, 6, 3, 5, 1, 1, 6, 8, 1, 7, 1, 2, 3, 7, 1, 2, 1, 1, 12, 1, 1, 1, 3, 1, 1, 8, 1, 1, 2, 1, 6, 1, 1, 5, 2, 2, 3, 1, 2, 4, 4, 16, 1, 161, 45, 1, 22, 1, 2, 2, 1, 4, 1, 2, 24, 1, 2, 1, 3, 1, 2, 1
Offset: 0

Views

Author

Keywords

Comments

The first 5821569425 terms were computed by Eric W. Weisstein on Sep 18 2011.
The first 10672905501 terms were computed by Eric W. Weisstein on Jul 17 2013.
The first 15000000000 terms were computed by Eric W. Weisstein on Jul 27 2013.
The first 30113021586 terms were computed by Syed Fahad on Apr 27 2021.

Examples

			Pi = 3.1415926535897932384...
   = 3 + 1/(7 + 1/(15 + 1/(1 + 1/(292 + ...))))
   = [a_0; a_1, a_2, a_3, ...] = [3; 7, 15, 1, 292, ...].
		

References

  • P. Beckmann, "A History of Pi".
  • C. Brezinski, History of Continued Fractions and Padé Approximants, Springer-Verlag, 1991; pp. 151-152.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • J. R. Goldman, The Queen of Mathematics, 1998, p. 50.
  • R. S. Lehman, A Study of Regular Continued Fractions. Report 1066, Ballistic Research Laboratories, Aberdeen Proving Ground, Maryland, Feb 1959.
  • G. Lochs, Die ersten 968 Kettenbruchnenner von Pi. Monatsh. Math. 67 1963 311-316.
  • C. D. Olds, Continued Fractions, Random House, NY, 1963; front cover of paperback edition.
  • 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, page 274.

Crossrefs

Cf. A000796 for decimal expansion. See A007541 or A033089, A033090 for records.

Programs

  • Maple
    cfrac (Pi,70,'quotients'); # Zerinvary Lajos, Feb 10 2007
  • Mathematica
    ContinuedFraction[Pi, 98]
  • PARI
    contfrac(Pi) \\ contfracpnqn(%) is also useful!
    
  • PARI
    { allocatemem(932245000); default(realprecision, 21000); x=contfrac(Pi); for (n=1, 20000, write("b001203.txt", n, " ", x[n])); } \\ Harry J. Smith, Apr 14 2009
    
  • Python
    import itertools as it; import sympy as sp
    list(it.islice(sp.continued_fraction_iterator(sp.pi),100))
    # Nicholas Stefan Georgescu, Feb 27 2023
  • Sage
    continued_fraction(RealField(333)(pi)) # Peter Luschny, Feb 16 2015
    

Extensions

Word "Simple" added to the title by David Covert, Dec 06 2016

A188635 Continued fraction expansion of length/width of metagolden rectangle.

Original entry on oeis.org

2, 10, 2, 40, 10, 2, 2, 1, 14, 1, 12, 3, 2, 1, 3, 9, 2, 12, 3, 1, 5, 1, 51, 29, 1, 3, 2, 35, 1, 27, 3, 75, 5, 1, 3, 2, 36, 1, 5, 1, 1, 3, 1, 2, 40, 1, 2, 7, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 8, 11, 6, 1, 2, 1, 3, 1, 2, 7, 1, 9, 1, 1, 9, 2, 1, 2, 1, 2, 7, 2, 34, 9, 13, 1, 2, 2, 24, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 1, 2, 4, 11, 3, 1, 3, 1, 6, 1, 5, 20, 2, 1, 1, 4, 10
Offset: 0

Views

Author

Clark Kimberling, Apr 06 2011

Keywords

Comments

The metagolden rectangle is introduced here as a rectangle such that if a golden rectangle is removed from one end, the remaining rectangle is metagolden. That is, using mu to represent the metagolden ratio, mu - phi = 1/mu, so that when the phi X 1 golden rectangle is removed, the remaining rectangle is 1/mu X 1, the same metagolden shape as the original mu X 1 rectangle. - Geoffrey Caveney, Apr 20 2014
(Recall that a rectangle is golden if the removal of a square from one end leaves a rectangle having the same shape as the original.)
To generalize, suppose that a rectangle R of length L and width W is to be partitioned into a set of squares. One way to do this matches the ordinary continued fraction of the shape (defined as L/W). Explicitly, if L/W = [a(0), a(1), a(2), ...] (finite or infinite), then a(0) squares are removed in step 1, then a(1) squares in step 2, then a(2) squares, and so on. An example is the golden rectangle, of shape [1,1,1,...].
To generalize from squares to rectangles all having a common shape s >= 1, in such a manner that a(n) of these rectangles are removed at step k, the original rectangle must have shape given by the continued fraction [s*a(0), s*a(1), s*a(2), ...]. This result follows easily from the Euclidean algorithm for two positive real numbers (as in the paper cited below on golden triangles, generalized to match continued fractions). Here, the terms of the continued fraction need not be integers, and by Seidel's theorem of 1846, the continued fraction converges (e.g., Roberts, pages 97-105). We shall refer to the geometric partitioning of the original rectangle as the continued fraction partition (matching the continued fraction [s*a(0), s*a(1), s*a(2), ...]).
Thus, the constant at A136319 is the shape of a rectangle whose continued fraction partition is an infinite collection of golden rectangles.

References

  • Joe Roberts, Elementary Number Theory: A Problem Oriented Approach, MIT Press, Cambridge, Massachusetts, 1977.

Crossrefs

Cf. A136319 (decimal expansion), A188636, A188637.

Programs

  • Mathematica
    t=(1+5^(1/2))/2; r=(t+(t^2+4)^(1/2))/2
    FullSimplify[r]
    N[r, 130]
    RealDigits[N[r, 130]][[1]]
    ContinuedFraction[r,120]
    (*End.  Following is another approach.*)
    r = (1 + 5^(1/2))/2;
    FromContinuedFraction[{r, {r}}]
    FullSimplify[%]
    N[%, 150]
    RealDigits[%]  (*A136319*)
    ContinuedFraction[%%, 120] (*A188635*)

Formula

A188635 is the continued fraction of the number given by the decimal expansion at A136319. It is also the continued fraction [r,r,r,...], where r=(golden ratio).

Extensions

Offset changed by Andrew Howroyd, Jul 08 2024

A005668 Denominators of continued fraction convergents to sqrt(10).

Original entry on oeis.org

0, 1, 6, 37, 228, 1405, 8658, 53353, 328776, 2026009, 12484830, 76934989, 474094764, 2921503573, 18003116202, 110940200785, 683644320912, 4212806126257, 25960481078454, 159975692596981, 985814636660340, 6074863512559021, 37434995712014466, 230684837784645817
Offset: 0

Views

Author

Keywords

Comments

a(2*n+1) with b(2*n+1) := A005667(2*n+1), n >= 0, give all (positive integer) solutions to Pell equation b^2 - 10*a^2 = -1, a(2*n) with b(2*n) := A005667(2*n), n>=1, give all (positive integer) solutions to Pell equation b^2 - 10*a^2 = +1 (cf. Emerson reference).
Bisection: a(2*n)= 6*S(n-1,2*19) = 6*A078987(n-1), n >= 0 and a(2*n+1) = A097315(n), n >= 0, with S(n,x) Chebyshev's polynomials of the second kind. S(-1,x)=0. See A049310.
Sqrt(10) = 6/2 + 6/37 + 6/(37*1405) + 6/(1405*53353) + ... - Gary W. Adamson, Dec 21 2007
a(p) == 40^((p-1)/2) mod p, for odd primes p. - Gary W. Adamson, Feb 22 2009
For n>=2, a(n) equals the permanent of the (n-1)X(n-1) tridiagonal matrix with 6's along the main diagonal and 1's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 08 2011
For n>=1, a(n) equals the number of words of length n-1 on alphabet {0,1,...,6} avoiding runs of zeros of odd lengths. - Milan Janjic, Jan 28 2015
From Michael A. Allen, Feb 15 2023: (Start)
Also called the 6-metallonacci sequence; the g.f. 1/(1-k*x-x^2) gives the k-metallonacci sequence.
a(n+1) is the number of tilings of an n-board (a board with dimensions n X 1) using unit squares and dominoes (with dimensions 2 X 1) if there are 6 kinds of squares available. (End)

Examples

			G.f. = x + 6*x^2 + 37*x^3 + 228*x^4 + 1405*x^5 + 8658*x^6 + 53353*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row n=6 of A073133, A172236, A352361.

Programs

  • Magma
    [n le 2 select n-1 else 6*Self(n-1)+Self(n-2): n in [1..25]]; // Vincenzo Librandi, Feb 23 2013
    
  • Maple
    evalf(sqrt(10),200); convert(%,confrac,fractionlist); fractionlist;
    A005668:=-z/(-1+6*z+z**2); - Simon Plouffe in his 1992 dissertation.
    a := n -> `if`(n<2,n,6^(n-1)*hypergeom([1-n/2,(1-n)/2], [1-n], -1/9)):
    seq(simplify(a(n)), n=0..23); # Peter Luschny, Jun 28 2017
  • Mathematica
    LinearRecurrence[{6,1}, {0,1}, 30] (* Vincenzo Librandi, Feb 23 2013 *)
    a[ n_] := (-I)^(n - 1) ChebyshevU[ n - 1, 3 I]; (* Michael Somos, May 28 2014 *)
    a[ n_] := MatrixPower[ {{0, 1}, {1, 6}}, n + 1][[1, 1]]; (* Michael Somos, May 28 2014 *)
    Fibonacci[Range[0,30],6] (* G. C. Greubel, Jun 06 2019 *)
    Join[{0},Convergents[Sqrt[10],30]//Denominator] (* Harvey P. Dale, Dec 28 2022 *)
  • PARI
    {a(n) = ([0, 1; 1, 6]^(n+1)) [1, 1]}; /* Michael Somos, May 28 2014 */
    
  • PARI
    {a(n) = (-I)^(n-1) * polchebyshev( n-1, 2, 3*I)}; /* Michael Somos, May 28 2014 */
  • Sage
    from sage.combinat.sloane_functions import recur_gen3; it = recur_gen3(0,1,6,6,1,0); [next(it) for i in range(1,22)] # Zerinvary Lajos, Jul 09 2008
    
  • Sage
    [lucas_number1(n,6,-1) for n in range(0, 21)]# Zerinvary Lajos, Apr 24 2009
    

Formula

G.f.: x / (1 - 6*x - x^2).
a(n) = 6*a(n-1) + a(n-2).
a(n) = ((-i)^(n-1))*S(n-1, 3*i) with S(n, x) Chebyshev's polynomials of the second kind (see A049310) and i^2=-1.
a(n) = F(n, 6), the n-th Fibonacci polynomial evaluated at x=6. - T. D. Noe, Jan 19 2006
From Sergio Falcon, Sep 24 2007: (Start)
a(n) = ((3+sqrt(10))^n - (3-sqrt(10))^n)/(2*sqrt(10)).
a(n) = Sum_{i=0..floor((n-1)/2)} binomial(n-1-i,i)*6^(n-1-2*i). (End)
Sum_{n>=1}(-1)^(n-1)/(a(n)*a(n+1)) = sqrt(10) - 3. - Vladimir Shevelev, Feb 23 2013
a(-n) = -(-1)^n * a(n). - Michael Somos, May 28 2014
a(n) = 6^(n-1)*hypergeom([1-n/2, (1-n)/2], [1-n], -1/9) for n >= 2. - Peter Luschny, Jun 28 2017
G.f.: x/(1 - 6*x - x^2) = Sum_{n >= 0} x^(n+1) *( Product_{k = 1..n} (m*k + 6 - m + x)/(1 + m*k*x) ) for arbitrary m (a telescoping series). - Peter Bala, May 08 2024

Extensions

Chebyshev comments from Wolfdieter Lang, Jan 21 2003
Showing 1-10 of 2827 results. Next