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

A052542 a(n) = 2*a(n-1) + a(n-2), with a(0) = 1, a(1) = 2, a(2) = 4.

Original entry on oeis.org

1, 2, 4, 10, 24, 58, 140, 338, 816, 1970, 4756, 11482, 27720, 66922, 161564, 390050, 941664, 2273378, 5488420, 13250218, 31988856, 77227930, 186444716, 450117362, 1086679440, 2623476242, 6333631924, 15290740090, 36915112104, 89120964298, 215157040700
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Apart from the initial 1, this sequence is simply twice the Pell numbers, A000129. - Antonio Alberto Olivares, Dec 31 2003
Image of 1/(1-2x) under the mapping g(x) -> g(x/(1+x^2)). - Paul Barry, Jan 16 2005
The intermediate convergents to 2^(1/2) begin with 4/3, 10/7, 24/17, 58/41; essentially, numerators = A052542 and denominators = A001333. - Clark Kimberling, Aug 26 2008
a(n) is the number of generalized compositions of n+1 when there are 2*i-2 different types of i, (i=1,2,...). - Milan Janjic, Aug 26 2010
Apart from the initial 1, this is the p-INVERT transform of (1,0,1,0,1,0,...) for p(S) = 1 - 2 S. See A291219. - Clark Kimberling, Sep 02 2017
Conjecture: Apart from the initial 1, a(n) is the number of compositions of two types of n having no even parts. - Gregory L. Simay, Feb 17 2018
For n>0, a(n+1) is the length of tau^n(10) where tau is the morphism: 1 -> 101, 0 -> 1. See Song and Wu. - Michel Marcus, Jul 21 2020
The above conjecture is true, as the g.f. can be written as 1/(1 - (2*x)/(1 - x^2)). - John Tyler Rascoe, Jun 01 2024

Crossrefs

Cf. A052906. Essentially first differences of A001333.

Programs

  • GAP
    a:=[2,4];; for n in [3..40] do a[n]:=2*a[n-1]+a[n-2]; od; a; # G. C. Greubel, May 09 2019
  • Haskell
    a052542 n = a052542_list !! n
    a052542_list = 1 : 2 : 4 : tail (zipWith (+)
                   (map (* 2) $ tail a052542_list) a052542_list)
    -- Reinhard Zumkeller, Feb 24 2015
    
  • Magma
    I:=[2,4]; [n le 2 select I[n] else 2*Self(n-1) +Self(n-2): n in [1..40]]; // G. C. Greubel, May 09 2019
    
  • Maple
    spec := [S,{S=Sequence(Prod(Union(Z,Z),Sequence(Prod(Z,Z))))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    A052542 := proc(n)
        option remember;
        if n <=2 then
            2^n;
        else
            2*procname(n-1)+procname(n-2) ;
        end if;
    end proc: # R. J. Mathar, Sep 23 2016
    A052542List := proc(m) local A, P, n; A := [1,2]; 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: A052542List(31); # Peter Luschny, Mar 26 2022
  • Mathematica
    Join[{1}, LinearRecurrence[{2, 1}, {2, 4}, 40]] (* Vladimir Joseph Stephan Orlovsky, Feb 22 2012 *)
  • PARI
    Vec((1-x^2)/(1-2*x-x^2) +O(x^40)) \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    ((1-x^2)/(1-2*x-x^2)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, May 09 2019
    

Formula

G.f.: (1 - x^2)/(1 - 2*x - x^2).
Recurrence: a(0)=1, a(2)=4, a(1)=2, a(n) + 2*a(n+1) - a(n+2) = 0;
a(n) = Sum_{alpha = RootOf(-1+2*x+x^2)} (1/2)*(1-alpha)*alpha^(-n-1).
a(n) = 2*A001333(n-1) + a(n-1), n > 1. A001333(n)/a(n) converges to sqrt(1/2). - Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003
Binomial transform of A094024. a(n) = 0^n + ((1 + sqrt(2))^n - (1 - sqrt(2))^n)/sqrt(2). - Paul Barry, Apr 22 2004
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k-1, k)2^(n-2k). - Paul Barry, Jan 16 2005
If p[i] = 2*(i mod 2) 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, May 02 2010
a(n) = round(sqrt(Pell(2n) + Pell(2n-1))). - Richard R. Forberg, Jun 22 2014
a(n) = 2*A000129(n) + A000007(n) - Iain Fox, Nov 30 2017
a(n) = A000129(n) - A000129(n-2). - Gregory L. Simay, Feb 17 2018

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

Original entry on oeis.org

1, 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

Paul Barry, Oct 15 2004

Keywords

Comments

Binomial transform of A094024(n+1).
a(n) is the number of matchings of the corona C'(n) of the cycle graph C(n) and the complete graph K(1); in other words, C'(n) is the graph constructed from C(n) to which for each vertex v a new vertex v' and the edge vv' is added. Example: a(3)=14 because in the graph with vertex set {A,B,C,a,b,c} and edge set {AB,AC,BC,Aa,Bb,Cc} we have the following 14 matchings: the empty set, the six singletons containing one of the edges, {Aa,BC}, {Bb,AC}, {Cc,AB}, {Aa,Bb}, {Aa,Cc}, {Bb,Cc} and {Aa,Bb,Cc}. Row sums of A102413. - Emeric Deutsch, Jan 07 2005
Apart from first term, same as A002203. - Peter Shor, May 12 2005
Equals the INVERT transform of integers with repeats. Example: a(4) = 34 = (1, 1, 2, 6, 14) dot (5, 3, 3, 1, 1) = (5 + 3 + 6 + 6 + 14) = 34.

Crossrefs

Cf. A014176 (silver mean).

Programs

  • Haskell
    a099425 = sum . a102413_row  -- Reinhard Zumkeller, Apr 15 2014
  • Maple
    a:= n-> (<<0|1>, <1|2>>^n. <<2, 2>>)[1, 1]-0^n:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 26 2018
  • Mathematica
    CoefficientList[Series[(1+x^2)/(1-2x-x^2),{x,0,30}],x] (* or *) LinearRecurrence[{2,1},{1,2,6},40] (* Harvey P. Dale, Mar 23 2020 *)

Formula

a(n) = (1+sqrt(2))^n + (1-sqrt(2))^n - 0^n see silver mean (A014176).
a(n) = Sum_{k=0..n} A000129(n+1-k)*C(1, k/2)*(1+(-1)^k)/2.
a(n) = 2*A001333(n) - 0^n.
a(n) = round((1+sqrt(2))^n). - Bruno Berselli, Feb 04 2013
G.f.: G(0) - 1, where G(k) = 1 + 1/(1 - x*(2*k-1)/(x*(2*k+1) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jul 30 2013
a(n) = A000129(n+1) + A000129(n-1). - Vladimir Kruchinin, Apr 19 2024

A210552 Triangle of coefficients of polynomials u(n,x) jointly generated with A210553; see the Formula section.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 5, 5, 1, 5, 7, 10, 8, 1, 6, 9, 16, 18, 13, 1, 7, 11, 23, 31, 33, 21, 1, 8, 13, 31, 47, 62, 59, 34, 1, 9, 15, 40, 66, 101, 119, 105, 55, 1, 10, 17, 50, 88, 151, 205, 227, 185, 89, 1, 11, 19, 61, 113, 213, 321, 414, 426, 324, 144, 1, 12, 21, 73
Offset: 1

Views

Author

Clark Kimberling, Mar 22 2012

Keywords

Comments

Let T(n,k) denote the term in row n, column k.
T(n,n): A000045 (Fibonacci numbers)
T(n,n-1): A010049 (second-order Fibonacci numbers)
T(n,1): 1,1,1,1,1,1,1,1,1,1,1,,...
T(n,2): 2,3,4,5,6,7,8,9,10,11,...
T(n,3): 3,5,7,9,11,13,15,17,19,...
T(n,4): A052905
Row sums: A000225
Alternating row sums: A094024 (signed)
For a discussion and guide to related arrays, see A208510.

Examples

			First five rows:
1
1...2
1...3...3
1...4...5...5
1...5...7...10...8
First three polynomials u(n,x): 1, 1 + 2x, 1 + 3x + 3x^2.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + x*v[n - 1, x] + 1;
    v[n_, x_] := x*u[n - 1, x] + v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]   (* A210552 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]   (* A210553 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]  (* A000225 *)
    Table[v[n, x] /. x -> 1, {n, 1, z}]  (* A000225 *)
    Table[u[n, x] /. x -> -1, {n, 1, z}] (* A094024 *)
    Table[v[n, x] /. x -> -1, {n, 1, z}] (* A052551 *)

Formula

u(n,x)=x*u(n-1,x)+x*v(n-1,x)+1,
v(n,x)=x*u(n-1,x)+v(n-1,x)+1,
where u(1,x)=1, v(1,x)=1.

A210553 Triangle of coefficients of polynomials v(n,x) jointly generated with A210552; see the Formula section.

Original entry on oeis.org

1, 2, 1, 3, 2, 2, 4, 3, 5, 3, 5, 4, 9, 8, 5, 6, 5, 14, 15, 15, 8, 7, 6, 20, 24, 31, 26, 13, 8, 7, 27, 35, 54, 57, 46, 21, 9, 8, 35, 48, 85, 104, 108, 80, 34, 10, 9, 44, 63, 125, 170, 209, 199, 139, 55, 11, 10, 54, 80, 175, 258, 360, 404, 366, 240, 89, 12, 11, 65, 99
Offset: 1

Views

Author

Clark Kimberling, Mar 22 2012

Keywords

Comments

Let T(n,k) denote the term in row n, column k.
T(n,n): A000045 (Fibonacci numbers)
T(n,n-1): A006367
T(n,n-2): A105423
T(n,1): 1,2,3,4,5,6,7,8,9,...
T(n,2): 1,2,3,4,5,6,7,8,9,...
T(n,3): A000096
T(n,4): A005563
T(n,5): A055831
T(n,6): A111694
Row sums: A000225
Alternating row sums: A052551
For a discussion and guide to related arrays, see A208510.

Examples

			First five rows:
1
2...1
3...2...2
4...3...5...3
5...4...9...8...5
First three polynomials v(n,x): 1, 2 + x , 3 + 2x + 2x^2.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + x*v[n - 1, x] + 1;
    v[n_, x_] := x*u[n - 1, x] + v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]   (* A210552 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]   (* A210553 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]  (* A000225 *)
    Table[v[n, x] /. x -> 1, {n, 1, z}]  (* A000225 *)
    Table[u[n, x] /. x -> -1, {n, 1, z}] (* A094024 *)
    Table[v[n, x] /. x -> -1, {n, 1, z}] (* A052551 *)

Formula

u(n,x)=x*u(n-1,x)+x*v(n-1,x)+1,
v(n,x)=x*u(n-1,x)+v(n-1,x)+1,
where u(1,x)=1, v(1,x)=1.

A098656 Expansion of x(1-4x)/((1-2x)(1-8x^2)).

Original entry on oeis.org

0, 1, -2, 4, -24, 16, -224, 64, -1920, 256, -15872, 1024, -129024, 4096, -1040384, 16384, -8355840, 65536, -66977792, 262144, -536346624, 1048576, -4292870144, 4194304, -34351349760, 16777216, -274844352512, 67108864, -2198889037824, 268435456, -17591649173504, 1073741824
Offset: 0

Views

Author

Paul Barry, Sep 19 2004

Keywords

Comments

Let A=[1,2,1;2,0,-2;1,-2,1] the 3 X 3 symmetric Krawtchouk matrix. Than a(n) is the 1,3 element of A^n.

References

  • P. Feinsilver and J. Kocik, Krawtchouk matrices from classical and quantum walks, Contemporary Mathematics, 287 2001, pp. 83-96.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x (1-4x)/((1-2x)(1-8x^2)),{x,0,40}],x] (* or *) LinearRecurrence[{2,8,-16},{0,1,-2},40] (* Harvey P. Dale, Jun 30 2011 *)

Formula

a(n)=2^(n-1)-2^(3(n-1)/2)(1+(-1)^n)/sqrt(2); a(n)=2a(n-1)+8a(n-2)-16a(n-3).
a(n) = (-2)^(n-1)*A094024(n-1). - R. J. Mathar, Mar 08 2021
Showing 1-5 of 5 results.