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-4 of 4 results.

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

A182143 Number of independent vertex sets in the Moebius ladder graph with 2n nodes (n >= 0).

Original entry on oeis.org

1, 3, 5, 15, 33, 83, 197, 479, 1153, 2787, 6725, 16239, 39201, 94643, 228485, 551615, 1331713, 3215043, 7761797, 18738639, 45239073, 109216787, 263672645, 636562079, 1536796801, 3710155683, 8957108165, 21624372015, 52205852193, 126036076403, 304278004997
Offset: 0

Views

Author

Cesar Bautista, Apr 14 2012

Keywords

Comments

Also the number of vertex covers. - Eric W. Weisstein, Jan 04 2014

Crossrefs

Programs

  • Magma
    I:=[1,3,5]; [n le 3 select I[n] else Self(n-1)+3*Self(n-2)+Self(n-3): n in [1..31]]; // Bruno Berselli, Apr 14 2012
  • Mathematica
    Table[(1 + Sqrt[2])^n + (1 - Sqrt[2])^n - (-1)^n, {n, 0, 30}] (* Bruno Berselli, Apr 14 2012 *)
    Table[LucasL[n, 2] - (-1)^n, {n, 0, 20}] (* Vladimir Reshetnikov, Sep 15 2016 *)
    LinearRecurrence[{1, 3, 1}, {1, 3, 5}, 20] (* Eric W. Weisstein, Mar 31 2017 *)
    CoefficientList[Series[(-1 - 2 x + x^2)/(-1 + x + 3 x^2 + x^3), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
  • PARI
    Vec((x^2-2*x-1)/((x+1)*(x^2+2*x-1))+O(x^31)) \\ Bruno Berselli, Apr 14 2012
    

Formula

G.f.: (x^2-2*x-1)/((x+1)*(x^2+2*x-1)).
a(n) = (1+sqrt(2))^n + (1-sqrt(2))^n - (-1)^n = A002203(n) - (-1)^n.
a(n) = a(n-1) + 3*a(n-2) + a(n-3) with a(0)=1, a(1)=3, a(2)=5.
From Peter Bala, Jun 29 2015: (Start)
a(n) = Pell(n-1) + Pell(n+1) - (-1)^n.
a(n) = [x^n] ( (1 + 2*x + sqrt(1 + 8*x + 8*x^2))/2 )^n.
exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 3*x^2 + 7*x^3 + 17*x^4 + 41*x^5 + ... = Sum_{n >= 0} A001333*x^n. Cf. A098600. (End)

A100225 G.f. A(x) satisfies: 3^n - 1 = Sum_{k=0..n} [x^k]A(x)^n and also satisfies: (3+z)^n - (1+z)^n + z^n = Sum_{k=0..n} [x^k](A(x)+z*x)^n for all z, where [x^k]A(x)^n denotes the coefficient of x^k in A(x)^n.

Original entry on oeis.org

1, 1, 2, 0, -4, 0, 16, 0, -80, 0, 448, 0, -2688, 0, 16896, 0, -109824, 0, 732160, 0, -4978688, 0, 34398208, 0, -240787456, 0, 1704034304, 0, -12171673600, 0, 87636049920, 0, -635361361920, 0, 4634400522240, 0, -33985603829760, 0, 250420238745600, 0, -1853109766717440
Offset: 0

Views

Author

Paul D. Hanna, Nov 28 2004

Keywords

Comments

More generally, if g.f. A(x) satisfies: m^n-b^n = Sum_{k=0..n} [x^k]A(x)^n, then A(x) also satisfies: (m+z)^n - (b+z)^n + z^n = Sum_{k=0..n} [x^k](A(x)+z*x)^n for all z and A(x)=(1+(m-1)*x+sqrt(1+2*(m-2*b-1)*x+(m^2-2*m+4*b+1)*x^2))/2.

Examples

			From the table of powers of A(x) (A100226), we see that
3^n-1 = Sum of coefficients [x^0] through [x^n] in A(x)^n:
A^1=[1,1],2,0,-4,0,16,0,-80,...
A^2=[1,2,5],4,-4,-8,16,32,-80,...
A^3=[1,3,9,13],6,-12,-4,48,0,...
A^4=[1,4,14,28,33],8,-24,16,80,...
A^5=[1,5,20,50,85,81],10,-40,60,..
A^6=[1,6,27,80,171,246,197],12,-60,...
the main diagonal of which is A100227 = [1,5,13,33,81,197,477,...], where Sum_{n>=1} (A100227(n)/n)*x^n = log((1-x)/(1-2*x-x^2)).
		

Crossrefs

Programs

  • PARI
    a(n)=if(n==0,1,(3^n-1-sum(k=0,n,polcoeff(sum(j=0,min(k,n-1),a(j)*x^j)^n+x*O(x^k),k)))/n)
    
  • PARI
    a(n)=if(n==0,1,if(n==1,1,if(n==2,2,-8*(n-3)*a(n-2)/n)))
    
  • PARI
    a(n)=polcoeff((1+2*x+sqrt(1+8*x^2+x^2*O(x^n)))/2,n)

Formula

G.f.: (1+2*x+sqrt(1+8*x^2))/2. G.f.: A(x) = x/(series_reversion[x*(1-x)/(1-2*x-x^2)]). a(n) = -8*(n-3)*a(n-2)/n for n>2, with a(0)=1, a(1)=1, a(2)=2. a(2*n) = 2^n*(-1)^(n-1)*A000108(n-1), a(2*n+1)=0, for n>=1, where A000108=Catalan.

A100226 Triangle, read by rows, of the coefficients of [x^k] in G100225(x)^n such that the row sums are 3^n-1 for n>0, where G100225(x) is the g.f. of A100225.

Original entry on oeis.org

1, 1, 1, 1, 2, 5, 1, 3, 9, 13, 1, 4, 14, 28, 33, 1, 5, 20, 50, 85, 81, 1, 6, 27, 80, 171, 246, 197, 1, 7, 35, 119, 301, 553, 693, 477, 1, 8, 44, 168, 486, 1064, 1724, 1912, 1153, 1, 9, 54, 228, 738, 1854, 3600, 5220, 5193, 2785, 1, 10, 65, 300, 1070, 3012, 6730, 11760
Offset: 0

Views

Author

Paul D. Hanna, Nov 28 2004

Keywords

Comments

Main diagonal forms A100227. Secondary diagonal is: T(n+1,n) = (n+1)*A001333(n), where A001333 is the numerators of continued fraction convergents to sqrt(2). More generally, if g.f. F(x) satisfies: m^n-b^n = Sum_{k=0..n} [x^k]F(x)^n, then F(x) also satisfies: (m+z)^n - (b+z)^n + z^n = Sum_{k=0..n} [x^k](F(x)+z*x)^n for all z and F(x)=(1+(m-1)*x+sqrt(1+2*(m-2*b-1)*x+(m^2-2*m+4*b+1)*x^2))/2; the triangle formed from powers of F(x) will have the g.f.: G(x,y)=(1-2*x*y+m*x^2*y^2)/((1-x*y)*(1-(m-1)*x*y-x^2*y^2-x*(1-x*y))).

Examples

			Rows begin:
  [1],
  [1,1],
  [1,2,5],
  [1,3,9,13],
  [1,4,14,28,33],
  [1,5,20,50,85,81],
  [1,6,27,80,171,246,197],
  [1,7,35,119,301,553,693,477],
  [1,8,44,168,486,1064,1724,1912,1153],...
where row sums form 3^n-1 for n>0:
3^1-1 = 1+1
3^2-1 = 1+2+5
3^3-1 = 1+3+9+13
3^4-1 = 1+4+14+28+33
3^5-1 = 1+5+20+50+85+81.
The main diagonal forms A100227 = [1,1,5,13,33,81,197,477,...], where Sum_{n>=1} (A100227(n)/n)*x^n = log((1-x)/(1-2*x-x^2)).
		

Crossrefs

Programs

  • PARI
    T(n,k,m=3)=if(n
    				

Formula

G.f.: A(x, y)=(1-2*x*y+3*x^2*y^2)/((1-x*y)*(1-2*x*y-x^2*y^2-x*(1-x*y))).
Showing 1-4 of 4 results.