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

A100525 Bisection of A048654.

Original entry on oeis.org

4, 22, 128, 746, 4348, 25342, 147704, 860882, 5017588, 29244646, 170450288, 993457082, 5790292204, 33748296142, 196699484648, 1146448611746, 6681992185828, 38945504503222, 226991034833504, 1323000704497802, 7711013192153308, 44943078448422046
Offset: 0

Views

Author

Lambert Klasen (lambert.klasen(AT)gmx.de), Nov 24 2004

Keywords

Crossrefs

Programs

  • Magma
    I:=[4,22,128]; [n le 3 select I[n] else 6*Self(n-1)-Self(n-2): n in [1..40]]; // Vincenzo Librandi, Oct 13 2015
    
  • Mathematica
    CoefficientList[Series[(4-2x)/(1-6x+x^2), {x, 0, 33}], x] (* Vincenzo Librandi, Oct 13 2015 *)
    LinearRecurrence[{6,-1},{4,22},30] (* Harvey P. Dale, Mar 25 2016 *)
  • PARI
    Vec((4-2*x)/(1-6*x+x^2) + O(x^40)) \\ Colin Barker, Oct 13 2015
    
  • SageMath
    [2*(2*chebyshev_U(n,3) - chebyshev_U(n-1,3)) for n in (0..30)] # G. C. Greubel, Jun 28 2022

Formula

G.f.: 2*(2-x)/(1-6*x+x^2). - Philippe Deléham, Nov 17 2008
a(0)=4, a(1)=22, a(n) = 6*a(n-1) - a(n-2) for n>1. - Philippe Deléham, Sep 19 2009
a(n) = 2*A038725(n+1). - R. J. Mathar, Sep 27 2014
a(n) = ( (5 + 4*sqrt(2))*(3 + 2*sqrt(2))^n - (5 - 4*sqrt(2))*(3 - 2*sqrt(2))^n )/(2*sqrt(2)). - Colin Barker, Oct 13 2015
From G. C. Greubel, Jun 28 2022: (Start)
a(n) = 2*( 2*ChebyshevU(n, 3) - ChenyshevU(n-1, 3) ).
E.g.f.: 2*exp(3*x)*( 2*cosh(2*sqrt(2)*x) + (5/(2*sqrt(2)))*sinh(2*sqrt(2)*x) ). (End)

A111567 Binomial transform of A048654: generalized Pellian with second term equal to 4.

Original entry on oeis.org

1, 5, 18, 62, 212, 724, 2472, 8440, 28816, 98384, 335904, 1146848, 3915584, 13368640, 45643392, 155836288, 532058368, 1816560896, 6202126848, 21175385600, 72297288704, 246838383616, 842758957056, 2877359060992
Offset: 0

Views

Author

Creighton Dement, Aug 06 2005

Keywords

Comments

Dropping the leading 1, this becomes the 4th row of the 2-shuffle Phi_2(W(sqrt(2))) of the Fraenkel-Kimberling publication. - R. J. Mathar, Aug 17 2009
Floretion Algebra Multiplication Program, FAMP Code: 1lesseq[K*J] with K = + .5'i + .5'j + .5k' + .5'kk' and J = + .5i' + .5j' + 2'kk' + .5'ki' + .5'kj'.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{4,-2},{1,5},30] (* Harvey P. Dale, Jul 01 2016 *)
  • Maxima
    a[0]:1$
    a[1]:5$
    a[n]:=4*a[n-1]-2*a[n-2]$
    A111567(n):=a[n]$
    makelist(A111567(n),n,0,30); /* Martin Ettl, Nov 03 2012 */

Formula

a(n) = 4*a(n-1) - 2*a(n-2), a(0) = 1, a(1) = 5. Program "FAMP" returns: A111566(n) = A007052(n) - A006012(n) + a(n).
From R. J. Mathar, Apr 02 2008: (Start)
O.g.f.: (1+x)/(1-4*x+2*x^2).
a(n) = A007070(n) + A007070(n-1). (End)
a(n) = ((2+sqrt(18))*(2+sqrt(2))^n + (2-sqrt(18))*(2-sqrt(2))^n)/4, offset 0. - Al Hakanson (hawkuu(AT)gmail.com), Aug 08 2009
a(n) = ((5+sqrt(32))(2+sqrt(2))^n+(5-sqrt(32))(2-sqrt(2))^n)/2 offset 0. - Al Hakanson (hawkuu(AT)gmail.com), Aug 15 2009

Extensions

Typo in definition corrected by Klaus Brockhaus, Aug 09 2009

A048745 Partial sums of A048654.

Original entry on oeis.org

1, 5, 14, 36, 89, 217, 526, 1272, 3073, 7421, 17918, 43260, 104441, 252145, 608734, 1469616, 3547969, 8565557, 20679086, 49923732, 120526553, 290976841, 702480238, 1695937320, 4094354881, 9884647085, 23863649054, 57611945196, 139087539449, 335787024097
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,5,14]; [n le 3 select I[n] else 3*Self(n-1) -Self(n-2) -Self(n-3): n in [1..31]]; // G. C. Greubel, May 23 2021
    
  • Mathematica
    t={1,5}; Do[AppendTo[t, t[[-2]] + 2*t[[-1]] + 3], {n,40}]; t (* Vladimir Joseph Stephan Orlovsky, Jan 27 2012 *)
    Accumulate[LinearRecurrence[{2,1},{1,4},30]] (* or *) LinearRecurrence[{3,-1,-1},{1,5,14},30] (* Harvey P. Dale, Aug 03 2020 *)
  • PARI
    a(n)=polcoeff((1+2*x)/(1-3*x+x^2+x^3)+x*O(x^n),n) \\ Paul D. Hanna
    
  • Sage
    [(5*lucas_number1(n+1,2,-1) + 3*lucas_number1(n,2,-1) -3)/2 for n in (0..30)] # G. C. Greubel, May 23 2021

Formula

a(n) = 2*a(n-1) + a(n-2) + 3, a(0)=1, a(1)=5.
a(n) = ( ((4+(5/2)*sqrt(2))*(1+sqrt(2))^n - (4-(5/2)*sqrt(2))*(1-sqrt(2))^n)/ 2*sqrt(2) ) - 3/2.
G.f.: (1+2*x)/((1-x)*(1-2*x-x^2)). - Paul D. Hanna, Feb 22 2005
a(n) = 3*a(n-1) - a(n-2) - a(n-3), n>2, a(0)=1, a(1)=5, a(2)=14. - Philippe Deléham, Dec 16 2008
2*a(n) = A135532(n+2) - 3. - R. J. Mathar, Mar 06 2013
a(n) = (1/2)*( 5*P(n+1) + 3*P(n) - 3), where P(n) = A000129(n). - G. C. Greubel, May 23 2021

A048778 First partial sums of A048745; second partial sums of A048654.

Original entry on oeis.org

1, 6, 20, 56, 145, 362, 888, 2160, 5233, 12654, 30572, 73832, 178273, 430418, 1039152, 2508768, 6056737, 14622294, 35301380, 85225112, 205751665, 496728506, 1199208744, 2895146064, 6989500945, 16874148030, 40737797084, 98349742280, 237437281729, 573224305826, 1383885893472
Offset: 0

Views

Author

Keywords

Comments

Define a triangle T by T(n,0) = n*(n+1) + 1, T(n,n) = (n+1)*(n+2)/2, and T(r,c) = T(r-1,c) + T(r-1,c-1) + T(r-2,c-1). Then a(n) is the sum of row n. - J. M. Bergot, Mar 06 2013

Crossrefs

Programs

  • Magma
    I:=[1, 6, 20, 56]; [n le 4 select I[n] else 4*Self(n-1) - 4*Self(n-2) + Self(n-4): n in [1..41]]; // G. C. Greubel, Aug 09 2022
    
  • Mathematica
    Table[(Fibonacci[n+3,2] +2*Fibonacci[n+2,2] -(3*n+7))/2, {n, 0, 40}] (* G. C. Greubel, Aug 09 2022 *)
  • PARI
    N=66;  x='x+O('x^N);
    gf= ( -1-2*x ) / ( (x^2+2*x-1)*(x-1)^2 );  Vec(Ser(gf))
    /* Joerg Arndt, Mar 07 2013 */
    
  • SageMath
    [(lucas_number1(n+3, 2, -1) + 2*lucas_number1(n+2, 2, -1) -3*n-7)/2 for n in (0..40)] # G. C. Greubel, Aug 09 2022

Formula

a(n) = 2*a(n-1) + a(n-2) + 3*n + 1, with a(0)=1, a(1)=6.
a(n) = ( ((13 + 9*sqrt(2))/2)*(1 + sqrt(2))^n - ((13 - 9*sqrt(2))/2)*(1 -sqrt(2))^n )/2*sqrt(2) - (3*n + 7)/2.
From R. J. Mathar, Nov 08 2012: (Start)
G.f.: (1 + 2*x) / ( (1-x-x^2)*(1-x)^2 ).
a(n) = A048776(n) + 2*A048776(n-1). (End)
a(n) = (Pell(n+3) + 2*Pell(n+2) - 3*n - 7)/2, where Pell(n) = A000129(n). - G. C. Greubel, Aug 09 2022

Extensions

Corrected by T. D. Noe, Nov 08 2006

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

A048739 Expansion of 1/((1 - x)*(1 - 2*x - x^2)).

Original entry on oeis.org

1, 3, 8, 20, 49, 119, 288, 696, 1681, 4059, 9800, 23660, 57121, 137903, 332928, 803760, 1940449, 4684659, 11309768, 27304196, 65918161, 159140519, 384199200, 927538920, 2239277041, 5406093003, 13051463048, 31509019100, 76069501249
Offset: 0

Views

Author

Keywords

Comments

Partial sums of Pell numbers A000129.
W(n){1,3;2,-1,1} = Sum_{i=1..n} W(i){1,2;2,-1,0}, where W(n){a,b; p,q,r} implies x(n) = p*x(n-1) - q*x(n-2) + r; x(0)=a, x(1)=b.
Number of 2 X (n+1) binary arrays with path of adjacent 1's from upper left to lower right corner. - R. H. Hardin, Mar 16 2002
Binomial transform of A029744. - Paul Barry, Apr 23 2004
Number of (s(0), s(1), ..., s(n+2)) such that 0 < s(i) < 4 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n+2, s(0) = 1, s(n+2) = 3. - Herbert Kociemba, Jun 16 2004
Equals row sums of triangle A153346. - Gary W. Adamson, Dec 24 2008
Equals the sum of the terms of the antidiagonals of A142978. - J. M. Bergot, Nov 13 2012
a(p-2) == 0 mod p where p is an odd prime, see A270342. - Altug Alkan, Mar 15 2016
Also, the lexicographically earliest sequence of positive integers such that for n > 3, {sqrt(2)*a(n)} is located strictly between {sqrt(2)*a(n-1)} and {sqrt(2)*a(n-2)} where {} denotes the fractional part. - Ivan Neretin, May 02 2017
a(n+1) is the number of weak orderings on {1,...,n} that are weakly single-peaked w.r.t. the total ordering 1 < ... < n. - J. Devillet, Oct 06 2017

References

  • Allombert, Bill, Nicolas Brisebarre, and Alain Lasjaunias. "On a two-valued sequence and related continued fractions in power series fields." The Ramanujan Journal 45.3 (2018): 859-871. See Theorem 3, d_{4n+3}.

Crossrefs

First row of table A083087.
With a different offset, a(4n)=A008843(n), a(4n-2)=8*A001110(n), a(2n-1)=A001652(n).

Programs

  • Maple
    a:=n->sum(fibonacci(i,2), i=0..n): seq(a(n), n=1..29); # Zerinvary Lajos, Mar 20 2008
  • Mathematica
    Join[{a=1,b=3},Table[c=2*b+a+1;a=b;b=c,{n,60}]] (* Vladimir Joseph Stephan Orlovsky, Feb 01 2011 *)
    CoefficientList[Series[1/(1-3x+x^2+x^3),{x,0,30}],x] (* or *) LinearRecurrence[{3,-1,-1},{1,3,8},30] (* Harvey P. Dale, Jun 13 2011 *)
  • PARI
    a(n)=local(w=quadgen(8));-1/2+(3/4+1/2*w)*(1+w)^n+(3/4-1/2*w)*(1-w)^n
    
  • PARI
    vector(100, n, n--; floor((1+sqrt(2))^(n+2)/4)) \\ Altug Alkan, Oct 07 2015
    
  • PARI
    Vec(1/((1-x)*(1-2*x-x^2)) + O(x^40)) \\ Michel Marcus, May 06 2017

Formula

a(n) = 2*a(n-1) + a(n-2) + 1 with n > 1, a(0)=1, a(1)=3.
a(n) = ((2 + (3*sqrt(2))/2)*(1 + sqrt(2))^n - (2 - (3*sqrt(2))/2)*(1 - sqrt(2))^n )/(2*sqrt(2)) - 1/2.
a(0)=1, a(n+1) = ceiling(x*a(n)) for n > 0, where x = 1+sqrt(2). - Paul D. Hanna, Apr 22 2003
a(n) = 3*a(n-1) - a(n-2) - a(n-3). With two leading zeros, e.g.f. is exp(x)(cosh(sqrt(2)x)-1)/2. a(n) = Sum_{k=0..floor((n+2)/2)} binomial(n+2, 2k+2)2^k. - Paul Barry, Aug 16 2003
-a(-3-n) = A077921(n). - N. J. A. Sloane, Sep 13 2003
E.g.f.: exp(x)(cosh(x/sqrt(2)) + sqrt(2)sinh(x/sqrt(2)))^2. - N. J. A. Sloane, Sep 13 2003
a(n) = floor((1+sqrt(2))^(n+2)/4). - Bruno Berselli, Feb 06 2013
a(n) = (((1-sqrt(2))^(n+2) + (1+sqrt(2))^(n+2) - 2) / 4). - Altug Alkan, Mar 16 2016
2*a(n) = A001333(n+2)-1. - R. J. Mathar, Oct 11 2017
a(n) = Sum_{k=0..n} binomial(n+1,k+1)*2^floor(k/2). - Tony Foster III, Oct 12 2017

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Jun 11 2002

A038761 a(n) = 6*a(n-1) - a(n-2), n >= 2, a(0)=1, a(1)=9.

Original entry on oeis.org

1, 9, 53, 309, 1801, 10497, 61181, 356589, 2078353, 12113529, 70602821, 411503397, 2398417561, 13979001969, 81475594253, 474874563549, 2767771787041, 16131756158697, 94022765165141, 548004834832149, 3194006243827753, 18616032628134369, 108502189524978461
Offset: 0

Views

Author

Barry E. Williams, May 02 2000

Keywords

Comments

Bisection of A048654. - Lambert Klasen (lambert.klasen(AT)gmx.de), Nov 24 2004
This gives part of the (increasingly sorted) positive solutions y to the Pell equation x^2 - 2*y^2 = +7. For the x solutions see A038762. For the other part of solutions see A101386 and A253811. - Wolfdieter Lang, Feb 05 2015

Examples

			A038762(3)^2 - 2*a(4)^2 = 2547^2 - 2*1801^2 = +7. - _Wolfdieter Lang_, Feb 05 2015
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 122-125, 194-196.

Crossrefs

Programs

  • Magma
    I:=[1, 9]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2): n in [1..40]]; // Vincenzo Librandi, Nov 16 2011
    
  • Maple
    a[0]:=1: a[1]:=9: for n from 2 to 26 do a[n]:=6*a[n-1]-a[n-2] od: seq(a[n], n=0..19); # Zerinvary Lajos, Jul 26 2006
  • Mathematica
    LinearRecurrence[{6,-1},{1,9},40] (* Vincenzo Librandi, Nov 16 2011 *)
  • PARI
    a(n)=([0,1; -1,6]^n*[1;9])[1,1] \\ Charles R Greathouse IV, Apr 08 2016

Formula

a(n) = (9*((3+2*sqrt(2))^n -(3-2*sqrt(2))^n)-((3+2*sqrt(2))^(n-1) - (3-2*sqrt(2))^(n-1)))/(4*sqrt(2)).
a(n) = sqrt(2*(A038762(n))^2-14)/2.
For n>1, a(n)-4a(n-1)=A001541(n)-A001542(n-2); e.g. 309-4*53=97=99-2. - Charlie Marion, Nov 12 2003
For n>0, a(n)=A046090(n)+A001653(n)+A001652(n-1)=A055997(n+1)+A001652(n-1); e.g., 309=120+169+20. - Charlie Marion, Oct 11 2006
G.f.: (1+3*x)/(1-6*x+x^2). - Philippe Deléham, Nov 03 2008
a(n) = third binomial transform of 1,6,8,48,64,384. - Al Hakanson (hawkuu(AT)gmail.com), Aug 15 2009
a(n)^2 + 2^2 = A124124(2*n+1)^2 + (A124124(2*n+1)+1)^2. - Hermann Stamm-Wilbrandt, Aug 31 2014
a(n) = irrational part of z(n) = (3 + sqrt(2))*(3 + 2*sqrt(2))^n, n >= 0. z(n) gives only part of the general positive solutions to the Pell equation x^2 - 2*y^2 = 7. See the Nagell reference in A038762 on how to find z(n), and a comment above. - Wolfdieter Lang, Feb 05 2015
a(n) = S(n, 6) + 3*S(n-1, 6), n >= 0, with the Chebyshev S-polynomials evaluated at x=6. See S(n-1, 6) = A001109(n). - Wolfdieter Lang, Mar 30 2015
E.g.f.: exp(3*x)*(2*cosh(2*sqrt(2)*x) + 3*sqrt(2)*sinh(2*sqrt(2)*x))/2. - Stefano Spezia, Mar 16 2024

Extensions

Edited: Replaced the unspecific Pell comment. Moved a formula from the comment section to the formula section. - Wolfdieter Lang, Feb 05 2015

A005409 Number of polynomials of height n: a(1)=1, a(2)=1, a(3)=4, a(n) = 2*a(n-1) + a(n-2) + 2 for n >= 4.

Original entry on oeis.org

1, 1, 4, 11, 28, 69, 168, 407, 984, 2377, 5740, 13859, 33460, 80781, 195024, 470831, 1136688, 2744209, 6625108, 15994427, 38613964, 93222357, 225058680, 543339719, 1311738120, 3166815961, 7645370044, 18457556051, 44560482148, 107578520349, 259717522848
Offset: 1

Views

Author

N. J. A. Sloane, S. M. Diano

Keywords

Comments

Starting with n=1, the sum of the antidiagonals of the array in a comment from Cloitre regarding A002002. - Gerald McGarvey, Aug 12 2004
Cumulative sum of A001333. - Sture Sjöstedt, Nov 15 2011
a(n) is the number of self-avoiding walks on a 3 rows X n columns grid of squares, starting top-left, ending bottom-left, using moves of R(ight), L(eft), U(p), D(own). E.g., for 3 X 1 there is just the path (D,D), and a(1) = 1. For 3 X 2, there are 4 paths (D,D) (D,R,D,L) (R,D,D,L) and (R,D,L,D) and a(2) = 4. - Toby Gottfried, Mar 04 2013
Define a triangle to have T(n,1) = n*(n-1)+1 and T(n,n) = n; the other terms T(r,c) = T(r-1,c) + T(r-1,c-1) + T(r-2,c-1). The sum of the terms in row(n+1) minus those in row(n) = a(n+2). - J. M. Bergot, Apr 30 2013
Since the terms of the sequence are all finite, it can be used in enumerating all polynomials with integer coefficients. Since each polynomial has only a finite number of roots, this enumeration can be used in turn to enumerate the algebraic numbers. Cantor uses this to derive the existence of transcendental numbers as a corollary of his stronger result that no enumerable sequence of real numbers can include all of them. - Morgan L. Owens, May 15 2022
For n > 1, also the rank of the (n-1)-Pell graph. - Eric W. Weisstein, Aug 01 2023

References

  • R. Courant and H. Robbins, What is Mathematics?, Oxford Univ. Press, 1941, p. 103.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A214931 (walks on grids with 4 rows), A006189 (grids with 3 columns).
Cf. A216211 (grids with 4 columns).

Programs

  • Haskell
    a005409 n = a005409_list !! (n-1)
    a005409_list = 1 : scanl1 (+) (tail a001333_list)
    -- Reinhard Zumkeller, Jul 08 2012
    
  • Magma
    [1] cat [n le 2 select n^2 else 2*Self(n-1) +Self(n-2) +2: n in [1..30]]; // G. C. Greubel, Apr 22 2021
    
  • Mathematica
    Join[{1}, RecurrenceTable[{a[1] == 1, a[2] == 4, a[n] == 2 a[n - 1] + a[n - 2] + 2}, a[n], {n, 30}]] (* Harvey P. Dale, Jul 27 2011 *)
    Join[{1}, CoefficientList[Series[(x + 1)/((x - 1) (x^2 + 2 x - 1)), {x, 0, 40}], x]] (* Vladimir Joseph Stephan Orlovsky, Jan 21 2012 *)
    Join[{1}, Fibonacci[Range[2, 35], 2] -1] (* G. C. Greubel, Apr 22 2021 *)
    Join[{1}, LinearRecurrence[{3, -1, -1}, {1, 4, 11}, 20]] (* Eric W. Weisstein, Aug 01 2023 *)
  • PARI
    a(n)=polcoeff(1+x*(1+x)/(1-3*x+x^2+x^3)+x*O(x^n),n) \\ Paul D. Hanna
    
  • Sage
    [1]+[lucas_number1(n,2,-1) -1 for n in (2..35)] # G. C. Greubel, Apr 22 2021

Formula

a(n) = A000129(n) - 1, n > 1.
a(n) = ((1+sqrt(2))^n - (1-sqrt(2))^n)/(2*sqrt(2))-1 for n > 1, a(1)=1.
G.f.: 1 + x*(1+x)/( (1-x)*(1-2*x-x^2) ). - Simon Plouffe in his 1992 dissertation.
a(n) = 3*a(n-1) - a(n-2) - a(n-3). - Toby Gottfried, Mar 08 2013
(1, 4, 11, 28, ...) = (1, 2, 2, 2, ...) * the Pell sequence starting (1, 2, 5, 12, 29, ...); such that, for example: a(5) = (2, 2, 2, 1) dot (1, 2, 5, 12) = (2 + 4 + 10 + 12) = 48. - Gary W. Adamson May 21 2013
E.g.f.: 1 + exp(x)*(2*(cosh(sqrt(2)*x) - 1) + sqrt(2)*sinh(sqrt(2)*x))/2. - Stefano Spezia, Jun 26 2022

Extensions

Additional comments from Barry E. Williams

A048655 Generalized Pellian with second term equal to 5.

Original entry on oeis.org

1, 5, 11, 27, 65, 157, 379, 915, 2209, 5333, 12875, 31083, 75041, 181165, 437371, 1055907, 2549185, 6154277, 14857739, 35869755, 86597249, 209064253, 504725755, 1218515763, 2941757281, 7102030325, 17145817931, 41393666187, 99933150305, 241259966797, 582453083899
Offset: 0

Views

Author

Keywords

Comments

Equals binomial transform of A143095: (1, 4, 2, 8, 4, 16, 8, 32, ...). - Gary W. Adamson, Jul 23 2008

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+3*x)/(1-2*x-x^2))); // G. C. Greubel, Jul 26 2018
  • Maple
    with(combinat): a:=n->3*fibonacci(n, 2)+fibonacci(n+1, 2): seq(a(n), n=0..26); # Zerinvary Lajos, Apr 04 2008
  • Mathematica
    a[n_]:=(MatrixPower[{{1,2},{1,1}},n].{{4},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 20 2010 *)
    LinearRecurrence[{2,1},{1,5},30] (* Harvey P. Dale, Nov 05 2011 *)
  • Maxima
    a[0]:1$
    a[1]:5$
    a[n]:=2*a[n-1]+a[n-2]$
    A048655(n):=a[n]$
    makelist(A048655(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
    
  • PARI
    a(n)=([0,1; 1,2]^n*[1;5])[1,1] \\ Charles R Greathouse IV, Feb 09 2017
    

Formula

a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=5.
a(n) = ((4+sqrt(2))(1+sqrt(2))^n - (4-sqrt(2))(1-sqrt(2))^n)/2*sqrt(2).
a(n) = P(n) - 3*P(n+1) + 2*P(n+2). - Creighton Dement, Jan 18 2005
G.f.: (1+3*x)/(1 - 2*x - x^2). - Philippe Deléham, Nov 03 2008
E.g.f.: exp(x)*(cosh(sqrt(2)*x) + 2*sqrt(2)*sinh(sqrt(2)*x)). - Vaclav Kotesovec, Feb 16 2015
a(n) = 3*Pell(n) + Pell(n+1), where Pell = A000129. - Vladimir Reshetnikov, Sep 27 2016

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

Original entry on oeis.org

-1, 2, 3, 8, 19, 46, 111, 268, 647, 1562, 3771, 9104, 21979, 53062, 128103, 309268, 746639, 1802546, 4351731, 10506008, 25363747, 61233502, 147830751, 356895004, 861620759, 2080136522, 5021893803, 12123924128, 29269742059, 70663408246, 170596558551, 411856525348
Offset: 0

Views

Author

Benoit Cloitre, Nov 22 2002

Keywords

Comments

Inverse binomial transform of -1, 1, 6, 22, 76, 260, ... (see A111566). Binomial transform of -1, 3, -2, 6, -4, 12, -8, 24, -16, ... (see A162255). - R. J. Mathar, Oct 02 2012

Examples

			G.f. = -1 + 2*x + 3*x^2 + 8*x^3 + 19*x^4 + 46*x^5 + 111*x^6 + ... - _Michael Somos_, Jun 30 2022
		

References

  • H. S. M. Coxeter, 1998, Numerical distances among the circles in a loxodromic sequence, Nieuw Arch. Wisk, 16, pp. 1-9.

Crossrefs

Programs

  • Haskell
    a078343 n = a078343_list !! n
    a078343_list = -1 : 2 : zipWith (+)
                            (map (* 2) $ tail a078343_list) a078343_list
    -- Reinhard Zumkeller, Jan 04 2013
    
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-4*x)/(-1+2*x+x^2))); // G. C. Greubel, Jul 26 2018
  • Maple
    f:=proc(n) option remember; if n=0 then RETURN(-1); fi; if n=1 then RETURN(2); fi; 2*f(n-1)+f(n-2); end;
  • Mathematica
    Table[4 Fibonacci[n, 2] - Fibonacci[n + 1, 2], {n, 0, 30}] (* Vladimir Reshetnikov, Sep 27 2016 *)
    LinearRecurrence[{2,1},{-1,2},40] (* Harvey P. Dale, Apr 15 2019 *)
  • PARI
    a(n)=([0,1;1,2]^n*[-1;2])[1,1] \\ Charles R Greathouse IV, Jun 11 2015
    

Formula

For the unsigned version: a(1)=1; a(2)=2; a(n) = Sum_{k=2..n-1} (a(k) + a(k-1)).
a(n) is asymptotic to (1/4)*(-2+3*sqrt(2))*(1+sqrt(2))^n.
a(n) = A048746(n-3) + 2, for n > 2. - Ralf Stephan, Oct 17 2003
a(n) = 2*A000129(n) - A000129(n-1) if n > 0; abs(a(n)) = Sum_{k=0..floor(n/2)} (C(n-k-1, k) - C(n-k-1, k-1))2^(n-2k). - Paul Barry, Dec 23 2004
O.g.f.: (1-4*x)/(-1 + 2*x + x^2). - R. J. Mathar, Feb 15 2008
a(n) = 4*Pell(n) - Pell(n+1), where Pell = A000129. - Vladimir Reshetnikov, Sep 27 2016
a(n) = -(-1)^n * A048654(-n) = ( (-2+3*sqrt(2))*(1+sqrt(2))^n + (-2-3*sqrt(2))*(1-sqrt(2))^n )/4 for all n in Z. - Michael Somos, Jun 30 2022
2*a(n+1)^2 = A048655(n)^2 + (-1)^n*7. - Philippe Deléham, Mar 07 2023
E.g.f.: 3*exp(x)*sinh(sqrt(2)*x)/sqrt(2) - exp(x)*cosh(sqrt(2)*x). - Stefano Spezia, May 26 2024

Extensions

Entry revised by N. J. A. Sloane, Apr 29 2004
Showing 1-10 of 32 results. Next