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.

A002203 Companion Pell numbers: a(n) = 2*a(n-1) + a(n-2), a(0) = a(1) = 2.

Original entry on oeis.org

2, 2, 6, 14, 34, 82, 198, 478, 1154, 2786, 6726, 16238, 39202, 94642, 228486, 551614, 1331714, 3215042, 7761798, 18738638, 45239074, 109216786, 263672646, 636562078, 1536796802, 3710155682, 8957108166, 21624372014, 52205852194, 126036076402, 304278004998
Offset: 0

Views

Author

Keywords

Comments

Also the number of matchings (independent edge sets) of the n-sunlet graph. - Eric W. Weisstein, Mar 09 2016
Apart from first term, same as A099425. - Peter Shor, May 12 2005
The signed sequence 2, -2, 6, -14, 34, -82, 198, -478, 1154, -2786, ... is the Lucas V(-2,-1) sequence. - R. J. Mathar, Jan 08 2013
Also named "Pell-Lucas numbers", apparently by Hoggatt and Alexanderson (1976), after the English mathematician John Pell (1611-1685) and the French mathematician Édouard Lucas (1842-1891). - Amiram Eldar, Oct 02 2023

References

  • Paul Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 76.
  • M. R. Bacon and C. K. Cook, Some properties of Oresme numbers and convolutions ..., Fib. Q., 62:3 (2024), 233-240.
  • 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.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001333 (half), A302946 (squared).
Bisections are A003499 and A077444.

Programs

  • Haskell
    a002203 n = a002203_list !! n
    a002203_list =
       2 : 2 : zipWith (+) (map (* 2) $ tail a002203_list) a002203_list
    -- Reinhard Zumkeller, Oct 03 2011
    
  • Magma
    I:=[2,2]; [n le 2 select I[n] else 2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Aug 15 2015
    
  • Maple
    A002203 := proc(n)
        option remember;
        if n <= 1 then
            2;
        else
            2*procname(n-1)+procname(n-2) ;
        end if;
    end proc: # R. J. Mathar, May 11 2013
    # second Maple program:
    a:= n-> (<<0|1>, <1|2>>^n. <<2, 2>>)[1, 1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 26 2018
    a := n -> 2*I^n*ChebyshevT(n, -I):
    seq(simplify(a(n)), n = 0..30);  # Peter Luschny, Dec 03 2023
  • Mathematica
    Table[LucasL[n, 2], {n, 0, 30}] (* Zerinvary Lajos, Jul 09 2009 *)
    LinearRecurrence[{2, 1}, {2, 2}, 50] (* Vincenzo Librandi, Aug 15 2015 *)
    Table[(1 - Sqrt[2])^n + (1 + Sqrt[2])^n, {n, 0, 20}] // Expand (* Eric W. Weisstein, Oct 03 2017 *)
    LucasL[Range[0, 20], 2] (* Eric W. Weisstein, Oct 03 2017 *)
    CoefficientList[Series[(2 (1 - x))/(1 - 2 x - x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Oct 03 2017 *)
  • PARI
    first(m)=my(v=vector(m));v[1]=2;v[2]=2;for(i=3,m,v[i]=2*v[i-1]+v[i-2]);v; \\ Anders Hellström, Aug 15 2015
    
  • PARI
    a(n) = my(w=quadgen(8)); (1+w)^n + (1-w)^n; \\ Michel Marcus, Jun 17 2021
  • Sage
    [lucas_number2(n,2,-1) for n in range(0, 29)] # Zerinvary Lajos, Apr 30 2009
    

Formula

a(n) = 2 * A001333(n).
a(n) = A100227(n) + 1.
O.g.f.: (2 - 2*x)/(1 - 2*x - x^2). - Simon Plouffe in his 1992 dissertation
a(n) = (1 + sqrt(2))^n + (1 - sqrt(2))^n. - Mario Catalani (mario.catalani(AT)unito.it), Mar 17 2003
a(n) = A000129(2*n)/A000129(n), n > 0. - Paul Barry, Feb 06 2004
From Miklos Kristof, Mar 19 2007: (Start)
Given F(n) = A000129(n), the Pell numbers, and L(n) = a(n), then:
L(n+m) + (-1)^m*L(n-m) = L(n)*L(m).
L(n+m) - (-1)^m*L(n-m) = 8*F(n)*F(m).
L(n+m+k) + (-1)^k*L(n+m-k) + (-1)^m*(L(n-m+k) + (-1)^k*L(n-m-k)) = L(n)*L(m)*L(k).
L(n+m+k) - (-1)^k*L(n+m-k) + (-1)^m*(L(n-m+k) - (-1)^k*L(n-m-k)) = 8*F(n)*L(m)*F(k).
L(n+m+k) + (-1)^k*L(n+m-k) - (-1)^m*(L(n-m+k) + (-1)^k*L(n-m-k)) = 8*F(n)*F(m)*L(k).
L(n+m+k) - (-1)^k*L(n+m-k) - (-1)^m*(L(n-m+k) - (-1)^k*L(n-m-k)) = 8*L(n)*F(m)*F(k).
(End)
a(n) = 2*(A000129(n+1) - A000129(n)). - R. J. Mathar, Nov 16 2007
G.f.: G(0), where G(k) = 1 + 1/(1 - x*(2*k - 1)/(x*(2*k + 1) - 1/G(k + 1))); (continued fraction). - Sergei N. Gladkovskii, Jun 19 2013
a(n) = [x^n] ( (1 + 2*x + sqrt(1 + 4*x + 8*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
From Kai Wang, Jan 14 2020: (Start)
A000129(m - n) = (-1)^n * (A000129(m) * a(n) - a(m) * A000129(n))/2.
A000129(m + n) = (A000129(m) * a(n) + a(m)*A000129(n))/2.
a(n)^2 - a(n + 1) * a(n - 1) = (-1)^(n) * 8.
a(n)^2 - a(n + r) * a(n - r) = (-1)^(n - r - 1) * 8 * A000129(r)^2.
a(m) * a(n + 1) - a(m + 1) * a(n) = (-1)^(n - 1) * 8 * A000129(m - n).
a(m - n) = (-1)^(n) * (a(m) * a(n) - 8 * A000129(m) * A000129(n))/2.
a(m + n) = (a(m) * a(n) + 8 * A000129(m) * A000129(n))/2.
(End)
E.g.f.: 2*exp(x)*cosh(sqrt(2)*x). - Stefano Spezia, Jan 15 2020
a(n) = A000129(n+1) + A000129(n-1) for n>0 with a(0)=2. - Rigoberto Florez, Jul 12 2020
a(n) = (-1)^n * (a(n)^3 - a(3*n))/3. - Greg Dresden, Jun 16 2021
a(n) = (a(n+2) + a(n-2))/6 for n >= 2. - Greg Dresden, Jun 23 2021
From Greg Dresden and Tongjia Rao, Sep 09 2021: (Start)
a(3n+2)/a(3n-1) = [14, ..., 14, -3] with (n+1) 14's.
a(3n+3)/a( 3n ) = [14, ..., 14, 7] with n 14's.
a(3n+4)/a(3n+1) = [14, ..., 14, 17] with n 14's. (End)
From Peter Bala, Nov 16 2022: (Start)
a(n) = trace([2, 1; 1, 0]^n) for n >= 1.
The Gauss congruences hold: a(n*p^k) == a(n*p^(k-1)) (mod p^k) for all positive integers n and k and all primes p.
a(3^n) == A271222(n) (mod 3^n). (End)
Sum_{n>=1} arctan(2/a(n))*arctan(2/a(n+1)) = Pi^2/32 (A244854) (Ohtsuka, 2019). - Amiram Eldar, Feb 11 2024
From Peter Bala, Jul 09 2025: (Start)
The following series telescope (Cf. A000032):
For k >= 1, Sum_{n >= 1} (-1)^((k+1)*(n+1)) * a(2*n*k)/(a((2*n-1)*k)*a((2*n+1)*k)) = 1/a(k)^2.
For positive even k, Sum_{n >= 1} 1/(a(k*n) - (a(k) + 2)/a(k*n)) = 1/(a(k) - 2) and
Sum_{n >= 1} (-1)^(n+1)/(a(k*n) + (a(k) - 2)/a(k*n)) = 1/(a(k) + 2).
For positive odd k, Sum_{n >= 1} 1/(a(k*n) - (-1)^n*(a(2*k) + 2)/a(k*n)) = (a(k) + 2)/(2*(a(2*k) - 2)) and
Sum_{n >= 1} (-1)^(n+1)/(a(k*n) - (-1)^n*(a(2*k) + 2)/a(k*n)) = (a(k) - 2)/(2*(a(2*k) - 2)). (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 03 2001