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

A090390 Repeatedly multiply (1,0,0) by ([1,2,2],[2,1,2],[2,2,3]); sequence gives leading entry.

Original entry on oeis.org

1, 1, 9, 49, 289, 1681, 9801, 57121, 332929, 1940449, 11309769, 65918161, 384199201, 2239277041, 13051463049, 76069501249, 443365544449, 2584123765441, 15061377048201, 87784138523761, 511643454094369, 2982076586042449, 17380816062160329, 101302819786919521, 590436102659356801
Offset: 0

Views

Author

Vim Wenders, Jan 30 2004

Keywords

Comments

The values of a and b in (a,b,c)*A give all (positive integer) solutions to Pell equation a^2 - 2*b^2 = -1; the values of c are A000129(2n)
Binomial transform of A086348. - Johannes W. Meijer, Aug 01 2010
All values of a(n) are squares. sqrt(a(n+1)) = A001333(n). The ratio a(n+1)/a(n) converges to 3 + 2*sqrt(2). - Richard R. Forberg, Aug 14 2013

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 60 at p. 123.

Crossrefs

Programs

  • Haskell
    a090390 n = a090390_list !! n
    a090390_list = 1 : 1 : 9 : zipWith (-) (map (* 5) $
       tail $ zipWith (+) (tail a090390_list) a090390_list) a090390_list
    -- Reinhard Zumkeller, Aug 17 2013
    
  • Magma
    [Evaluate(DicksonFirst(n,-1),2)^2/4: n in [0..40]]; // G. C. Greubel, Aug 21 2022
    
  • Maple
    a:= n-> (<<1|0|0>>. <<1|2|2>, <2|1|2>, <2|2|3>>^n)[1, 1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 17 2013
  • Mathematica
    CoefficientList[Series[(1-4x-x^2)/((1+x)(1-6x+x^2)),{x, 0, 30}], x] (* Harvey P. Dale, May 20 2012 *)
    LinearRecurrence[{5,5,-1}, {1,1,9}, 30] (* Harvey P. Dale, May 20 2012 *)
    Table[(ChebyshevT[n,3]+(-1)^n)/2, {n,0,30}] (* Eric W. Weisstein, Apr 17 2018 *)
    (LucasL[Range[0, 40], 2]/2)^2 (* G. C. Greubel, Aug 21 2022 *)
  • PARI
    a(n)=polcoeff((1-4*x-x^2)/((1+x)*(1-6*x+x^2))+x*O(x^n),n)
    
  • PARI
    a(n)=if(n<0,0,([1,2,2;2,1,2;2,2,3]^n)[1,1])
    
  • PARI
    Vec( (1-4*x-x^2)/((1+x)*(1-6*x+x^2)) + O(x^66) ) \\ Joerg Arndt, Aug 16 2013
    
  • Perl
    use Math::Matrix; use Math::BigInt; $a = new Math::Matrix ([ 1, 2, 2], [ 2, 1, 2], [ 2, 2, 3]); $p = new Math::Matrix ([1, 0, 0]); $p->print(); for ($i=1; $i<20;$i++) { $p = $p->multiply($a); $p->print(); }
    
  • SageMath
    [lucas_number2(n,2,-1)^2/4 for n in (0..40)] # G. C. Greubel, Aug 21 2022

Formula

G.f.: (1-4*x-x^2)/((1+x)*(1-6*x+x^2)).
a(n) = A001333(n)^2
(a, b, c) = (1, 0, 0). Recursively multiply (a, b, c)*( [1, 2, 2], [2, 1, 2], [2, 2, 3] ).
M^n * [ 1 1 1] = [a(n+1) q a(n)], where M = the 3 X 3 matrix [4 4 1 / 2 1 0 / 1 0 0]. E.g. M^5 * [1 1 1] = [9801 4059 1681] where 9801 = a(6), 1681 = a(5). Similarly, M^n * [1 0 0] generates A079291 (Pell number squares). - Gary W. Adamson, Oct 31 2004
a(n) = (((1+sqrt(2))^(2*n) + (1-sqrt(2))^(2*n)) + 2*(-1)^n)/4 - Lambert Klasen (lambert.klasen(AT)gmx.net), Oct 09 2005
a(n) = (A001541(n) + (-1)^n)/2. - R. J. Mathar, Nov 20 2009
a(n) = 5*a(n-1) + 5*a(n-2) - a(n-3), with a(0)=1, a(1)=1, a(2)=9. - Harvey P. Dale, May 20 2012
(a(n)) = tesseq(- .5'j + .5'k - .5j' + .5k' - 2'ii' + 'jj' - 'kk' + .5'ij' + .5'ik' + .5'ji' + 'jk' + .5'ki' + 'kj' + e), apart from initial term. - Creighton Dement, Nov 16 2004
a(n) = A302946(n)/4. - Eric W. Weisstein, Apr 17 2018
E.g.f.: exp(-x)*(1 + exp(4*x)*cosh(2*sqrt(2)*x))/2. - Stefano Spezia, Aug 03 2024

A302941 Number of total dominating sets in the 2n-crossed prism graph.

Original entry on oeis.org

9, 121, 1296, 14161, 154449, 1684804, 18378369, 200477281, 2186871696, 23855111401, 260219353689, 2838557779204, 30963916217529, 337764520613641, 3684445810532496, 40191139395243841, 438418087537149729, 4782407823513403204, 52168067971110285489
Offset: 1

Views

Author

Eric W. Weisstein, Apr 16 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[2 (-1)^n + ((11 - 3 Sqrt[13])/2)^n + ((11 + 3 Sqrt[13])/2)^n, {n, 20}] // FullSimplify
    Table[LucasL[n, 3]^2, {n, 20}]
    LucasL[Range[20], 3]^2
    LinearRecurrence[{10, 10, -1}, {9, 121, 1296}, 20]
    CoefficientList[Series[(9 + 31 x - 4 x^2)/(1 - 10 x - 10 x^2 + x^3), {x, 0, 20}], x]
  • PARI
    Vec((9 + 31*x - 4*x^2)/((1 + x)*(1 - 11*x + x^2)) + O(x^30)) \\ Andrew Howroyd, Apr 16 2018

Formula

From Andrew Howroyd, Apr 16 2018: (Start)
G.f.: x*(9 + 31*x - 4*x^2)/((1 + x)*(1 - 11*x + x^2)).
a(n) = 10*a(n-1) + 10*a(n-2) - a(n-3) for n > 3.
a(n) = A006497(n)^2. (End)

Extensions

a(1) and terms a(6) and beyond from Andrew Howroyd, Apr 16 2018

A347551 Number of minimum dominating sets in the 2n-crossed prism graph.

Original entry on oeis.org

4, 51, 8, 170, 16, 476, 32, 1224, 64, 2992, 128, 7072, 256, 16320, 512, 36992, 1024, 82688, 2048, 182784, 4096, 400384, 8192, 870400, 16384, 1880064, 32768, 4038656, 65536, 8634368, 131072, 18382848, 262144, 38993920, 524288, 82444288, 1048576, 173801472
Offset: 2

Views

Author

Eric W. Weisstein, Sep 06 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Piecewise[{{17 n 2^((n - 3)/2), Mod[n, 2] == 1}, {2^((n/2) + 1), Mod[n, 2] == 0}}], {n, 2, 20}] (* Eric W. Weisstein, Feb 27 2025 *)
    CoefficientList[Series[(4 + 51 x - 8 x^2 - 34 x^3)/(1 - 2 x^2)^2, {x, 0, 20}], x] (* Eric W. Weisstein, Feb 27 2025 *)
  • PARI
    a(n) = if(n%2, 17*n*2^((n-3)/2), 2^((n/2)+1)) \\ Andrew Howroyd, Jan 18 2022

Formula

a(n) = 2^((n/2)+1) for n even.
From Andrew Howroyd, Jan 18 2022: (Start)
a(n) = 17*n*2^((n-3)/2) for n odd.
a(n) = 4*a(n-2) - 4*a(n-4) for n > 5.
G.f.: x^2*(4 + 51*x - 8*x^2 - 34*x^3)/(1 - 2*x^2)^2.
(End)

Extensions

Terms a(11) and beyond from Andrew Howroyd, Jan 18 2022
Showing 1-4 of 4 results.