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

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

Original entry on oeis.org

1, 4, 9, 22, 53, 128, 309, 746, 1801, 4348, 10497, 25342, 61181, 147704, 356589, 860882, 2078353, 5017588, 12113529, 29244646, 70602821, 170450288, 411503397, 993457082, 2398417561, 5790292204
Offset: 0

Views

Author

Keywords

Comments

Generalized Pellian with second term equal to 4.
The generalized Pellian with second term equal to s has the terms a(n) = A000129(n)*s + A000129(n-1). The generating function is -(1+s*x-2*x)/(-1+2*x+x^2). - R. J. Mathar, Nov 22 2007

Crossrefs

Programs

  • Haskell
    a048654 n = a048654_list !! n
    a048654_list =
       1 : 4 : zipWith (+) a048654_list (map (* 2) $ tail a048654_list)
    -- Reinhard Zumkeller, Aug 01 2011
    
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!((1+2*x)/(1-2*x-x^2))); // G. C. Greubel, Jul 26 2018
    
  • Mathematica
    LinearRecurrence[{2,1},{1,4},30] (* Harvey P. Dale, Jul 27 2011 *)
  • Maxima
    a[0]:1$
    a[1]:4$
    a[n]:=2*a[n-1]+a[n-2]$
    A048654(n):=a[n]$
    makelist(A048654(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
    
  • PARI
    a(n)=(([0, 1; 1,2]^n)*[1,4]~)[1] \\ Charles R Greathouse IV, May 18 2015
    
  • SageMath
    [lucas_number1(n+1,2,-1) +2*lucas_number1(n,2,-1) for n in (0..40)] # G. C. Greubel, Aug 09 2022

Formula

a(n) = ((3+sqrt(2))*(1+sqrt(2))^n - (3-sqrt(2))*(1-sqrt(2))^n)/2*sqrt(2).
a(n) = 2*A000129(n+2) - 3*A000129(n+1). - Creighton Dement, Oct 27 2004
G.f.: (1+2*x)/(1-2*x-x^2). - Philippe Deléham, Nov 03 2008
a(n) = binomial transform of 1, 3, 2, 6, 4, 12, ... . - Al Hakanson (hawkuu(AT)gmail.com), Aug 08 2009
E.g.f.: exp(x)*cosh(sqrt(2)*x) + 3*exp(x)*sinh(sqrt(2)*x)/sqrt(2). - Vaclav Kotesovec, Feb 16 2015
a(n) is the denominator of the continued fraction [4, 2, ..., 2, 4] with n-1 2's in the middle. For the numerators, see A221174. - Greg Dresden and Tongjia Rao, Sep 02 2021
a(n) = A001333(n) + A000129(n). - G. C. Greubel, Aug 09 2022

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

A221172 a(0)=-2, a(1)=3; thereafter a(n) = 2*a(n-1) + a(n-2).

Original entry on oeis.org

-2, 3, 4, 11, 26, 63, 152, 367, 886, 2139, 5164, 12467, 30098, 72663, 175424, 423511, 1022446, 2468403, 5959252, 14386907, 34733066, 83853039, 202439144, 488731327, 1179901798, 2848534923, 6876971644, 16602478211, 40081928066, 96766334343, 233614596752, 563995527847
Offset: 0

Views

Author

N. J. A. Sloane, Jan 04 2013

Keywords

Crossrefs

Programs

  • Haskell
    a221172 n = a221172_list !! n
    a221172_list = -2 : 3 : zipWith (+)
                            (map (* 2) $ tail a221172_list) a221172_list
    -- Reinhard Zumkeller, Jan 04 2013
  • Mathematica
    LinearRecurrence[{2,1},{-2,3},40] (* Harvey P. Dale, May 30 2013 *)
    Table[7 Fibonacci[n, 2] - 2 Fibonacci[n + 1, 2], {n, 0, 30}] (* Vladimir Reshetnikov, Sep 27 2016 *)

Formula

G.f.: (2-7*x)/(-1+2*x+x^2). - R. J. Mathar, Jan 04 2013
a(n) = 7*Pell(n) - 2*Pell(n+1), where Pell = A000129. - Vladimir Reshetnikov, Sep 27 2016
E.g.f.: -2*exp(x)*cosh(sqrt(2)*x) + 5*exp(x)*sinh(sqrt(2)*x)/sqrt(2). - Stefano Spezia, May 26 2024

A221173 a(0)=-3, a(1)=4; thereafter a(n) = 2*a(n-1) + a(n-2).

Original entry on oeis.org

-3, 4, 5, 14, 33, 80, 193, 466, 1125, 2716, 6557, 15830, 38217, 92264, 222745, 537754, 1298253, 3134260, 7566773, 18267806, 44102385, 106472576, 257047537, 620567650, 1498182837, 3616933324, 8732049485, 21081032294, 50894114073, 122869260440, 296632634953
Offset: 0

Views

Author

N. J. A. Sloane, Jan 04 2013

Keywords

Crossrefs

Programs

  • Haskell
    a221173 n = a221173_list !! n
    a221173_list = -3 : 4 : zipWith (+)
                            (map (* 2) $ tail a221173_list) a221173_list
    -- Reinhard Zumkeller, Jan 04 2013
    
  • Mathematica
    LinearRecurrence[{2,1},{-3,4},50] (* Harvey P. Dale, Apr 09 2022 *)
  • PARI
    Vec(-(10*x-3)/(x^2+2*x-1) + O(x^100)) \\ Colin Barker, Jul 10 2015

Formula

a(n) = 10*A000129(n)-3*A000129(n+1). - R. J. Mathar, Jan 14 2013
G.f.: -(10*x-3) / (x^2+2*x-1). - Colin Barker, Jul 10 2015

A221175 a(0)=-5, a(1)=6; thereafter a(n) = 2*a(n-1) + a(n-2).

Original entry on oeis.org

-5, 6, 7, 20, 47, 114, 275, 664, 1603, 3870, 9343, 22556, 54455, 131466, 317387, 766240, 1849867, 4465974, 10781815, 26029604, 62841023, 151711650, 366264323, 884240296, 2134744915, 5153730126, 12442205167, 30038140460, 72518486087, 175075112634
Offset: 0

Views

Author

N. J. A. Sloane, Jan 04 2013

Keywords

Crossrefs

Programs

  • Haskell
    a221175 n = a221175_list !! n
    a221175_list = -5 : 6 : zipWith (+)
                            (map (* 2) $ tail a221175_list) a221175_list
    -- Reinhard Zumkeller, Jan 04 2013
    
  • PARI
    Vec(-(16*x-5)/(x^2+2*x-1) + O(x^50)) \\ Colin Barker, Jul 10 2015

Formula

a(n) = 16*A000129(n)-5*A000129(n+1). - R. J. Mathar, Jan 14 2013
G.f.: -(16*x-5) / (x^2+2*x-1). - Colin Barker, Jul 10 2015

A335747 Number of ways to tile vertically-fault-free 3 X n strip with squares and dominoes.

Original entry on oeis.org

1, 3, 13, 26, 66, 154, 380, 904, 2204, 5286, 12818, 30854, 74636, 179948, 434820, 1049122, 2533818, 6115538, 14766868, 35646080, 86064196, 207766110, 501609946, 1210964110, 2923573588, 7058053972, 17039774268
Offset: 0

Views

Author

Keywords

Comments

By "vertically-fault-free" we mean that the tilings of the 3 X n strip do not split along any interior vertical line. Here are two of the 66 possible vertically-fault-free tilings of a 3 X 4 strip with squares and dominoes:
. _ _
| |_ | | _|_| |
|| _| | | | |_|
|| _|| ||_| |

Examples

			a(2) = 13 thanks to these thirteen vertically-fault-free tilings of a 3 X 2 strip:
._ _     _ _     _ _     _ _     _ _     _ _     _ _
|_ _|   |_|_|   |_|_|   |_ _|   |_|_|   |_ _|   |_ _|
|_|_|   |_ _|   |_|_|   |_ _|   |_ _|   |_|_|   |_ _|
|_|_|   |_|_|   |_ _|   |_|_|   |_ _|   |_ _|   |_ _|
._ _     _ _     _ _     _ _     _ _     _ _
|_ _|   |_ _|   |_ _|   | |_|   |_| |   | | |
| |_|   |_| |   | | |   |_|_|   |_|_|   |_|_|
|_|_|   |_|_|   |_|_|   |_ _|   |_ _|   |_ _|
		

Crossrefs

Cf. A033506 (which gives all tilings of 3 X n strip), A112577, A134438, A291227.

Programs

  • Magma
    I:=[26, 66, 154, 380]; [1,3,13] cat [n le 4 select I[n] else Self(n-1) +4*Self(n-2) -Self(n-3) -Self(n-4): n in [1..40]]; // G. C. Greubel, Jan 15 2022
    
  • Mathematica
    CoefficientList[Series[(1+2x+6x^2+2x^3-8x^4+x^6)/((1+x-x^2)(1-2x-x^2)), {x, 0, 26}], x] (* Michael De Vlieger, Jul 03 2020 *)
    LinearRecurrence[{1,4,-1,-1}, {1,3,13,26,66,154,380}, 40] (* G. C. Greubel, Jan 15 2022 *)
  • Sage
    def P(n): return lucas_number1(n,2,-1)
    def A335747(n): return (1/3)*(-9*bool(n==0) - 3*bool(n==1) + 3*bool(n==2) + 2*(3*P(n+1) + 2*P(n-1)) + 2*(-1)^n*fibonacci(n-1))
    [A335747(n) for n in (0..40)] # G. C. Greubel, Jan 15 2022

Formula

a(n) = a(n-1) + 4*a(n-2) - a(n-3) - a(n-4) for n >= 7.
a(n) = 2*A291227(n) - 8*A112577(n-2) + 2*A112577(n-4) for n >= 4.
a(n) = (2/3)*(A221174(n+1) + (-1)^n*A000045(n-1)) for n >= 3. - Greg Dresden, Jul 03 2020
G.f.: (1 + 2*x + 6*x^2 + 2*x^3 - 8*x^4 + x^6) / ((1 + x - x^2)*(1 - 2*x - x^2)). - Colin Barker, Jun 21 2020
a(n) = (1/3)*(-9*[n=0] - 3*[n=1] + 3*[n=2] + 2*(3*A000129(n+1) + 2*A000129(n-1)) + 2*(-1)^n*Fibonacci(n-1)). - G. C. Greubel, Jan 15 2022
Showing 1-6 of 6 results.