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.

Previous Showing 41-50 of 67 results. Next

A082574 a(1)=1, a(n) = ceiling(r(3)*a(n-1)) where r(3) = (1/2)*(3 + sqrt(13)) is the positive root of X^2 = 3*X + 1.

Original entry on oeis.org

1, 4, 14, 47, 156, 516, 1705, 5632, 18602, 61439, 202920, 670200, 2213521, 7310764, 24145814, 79748207, 263390436, 869919516, 2873148985, 9489366472, 31341248402, 103513111679, 341880583440, 1129154862000, 3729345169441, 12317190370324
Offset: 1

Views

Author

Benoit Cloitre, May 06 2003

Keywords

Comments

More generally the sequence a(1)=1, a(n) = ceiling(r(z)*a(n-1)) where r(z) = (1/2)*(z + sqrt(z^2 + 4)) is the positive root of X^2 = z*X + 1 satisfies the linear recurrence: for n > 3, a(n) = (z+1)*a(n-1) - (z-1)*a(n-2) - a(n-3) and the closed-form formula: a(n) = floor(t(z)*r(z)^n) where t(z) = (1/(2*z))*(1+(z+2)/sqrt(z^2+4)) is the positive root of z*(z^2 + 4)*X^2 = (z^2 + 4)*X + 1.

Crossrefs

Programs

  • Magma
    I:=[1,4,14]; [n le 3 select I[n] else 4*Self(n-1)-2*Self(n-2)-Self(n-3): n in [1..30]]; // Vincenzo Librandi, Sep 12 2017
    
  • Maple
    a:=n->sum(fibonacci(i,3), i=0..n): seq(a(n), n=1..30); # Zerinvary Lajos, Mar 20 2008
  • Mathematica
    LinearRecurrence[{4, -2, -1}, {1, 4, 14}, 30] (* Vincenzo Librandi, Sep 12 2017 *)
    Table[Sum[Fibonacci[k, 3], {k,0,n}], {n,1,30}] (* G. C. Greubel, May 31 2019 *)
  • PARI
    Vec(1/((1-x)*(1-3*x-x^2)) + O(x^30)) \\ Michel Marcus, Sep 12 2017
    
  • Sage
    (1/((1-x)*(1-3*x-x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, May 31 2019

Formula

a(1)=1, a(2)=4, a(3)=14, a(n) = 4*a(n-1) - 2*a(n-2) - a(n-3).
a(n) = floor(t(3)*r(3)^n) where t(3) = (1/6)*(1 + 5/sqrt(13)) is the positive root of 39*X^2 = 13*X + 1.
G.f.: 1/((1-x)*(1-3*x-x^2)). Partial sums of A006190. - Paul Barry, Jul 10 2004

A096979 Sum of the areas of the first n+1 Pell triangles.

Original entry on oeis.org

0, 1, 6, 36, 210, 1225, 7140, 41616, 242556, 1413721, 8239770, 48024900, 279909630, 1631432881, 9508687656, 55420693056, 323015470680, 1882672131025, 10973017315470, 63955431761796, 372759573255306, 2172602007770041
Offset: 0

Views

Author

Paul Barry, Jul 17 2004

Keywords

Comments

Convolution of A059841(n) and A001109(n+1).
Partial sums of A084158.

Crossrefs

Programs

  • Mathematica
    Accumulate[LinearRecurrence[{5,5,-1},{0,1,5},30]] (* Harvey P. Dale, Sep 07 2011 *)
    LinearRecurrence[{6, 0, -6, 1},{0, 1, 6, 36},22] (* Ray Chandler, Aug 03 2015 *)

Formula

G.f.: x/((1-x)*(1+x)*(1-6*x+x^2)).
a(n) = 6*a(n-1)-6*a(n-3)+a(n-4).
a(n) = (3-2*sqrt(2))^n*(3/32-sqrt(2)/16)+(3+2*sqrt(2))^n*(sqrt(2)/16+3/32)-(-1)^n/16-1/8.
a(n) = Sum_{k=0..n} (sqrt(2)*(sqrt(2)+1)^(2*k)/8-sqrt(2)*(sqrt(2)-1)^(2*k)/8)*(1+(-1)^(n-k))/2.
a(n) = Sum_{k=0..n} A000129(k)*A000129(k+1)/2. [corrected by Jason Yuen, Jan 14 2025]
a(n) = (A001333(n+1)^2 - 1)/8 = ((A000129(n) + A000129(n+1))^2 - 1)/8. - Richard R. Forberg, Aug 25 2013
a(n) = A002620(A000129(n+1)) = A000217(A048739(n-1)), n > 0. - Ivan N. Ianakiev, Jun 21 2014

A193845 Mirror of the triangle A193844.

Original entry on oeis.org

1, 3, 1, 7, 5, 1, 15, 17, 7, 1, 31, 49, 31, 9, 1, 63, 129, 111, 49, 11, 1, 127, 321, 351, 209, 71, 13, 1, 255, 769, 1023, 769, 351, 97, 15, 1, 511, 1793, 2815, 2561, 1471, 545, 127, 17, 1, 1023, 4097, 7423, 7937, 5503, 2561, 799, 161, 19, 1
Offset: 0

Views

Author

Clark Kimberling, Aug 07 2011

Keywords

Comments

This triangle is obtained by reversing the rows of the triangle A193844.
From Philippe Deléham, Jan 17 2014: (Start)
Subtriangle of the triangle in A112857.
T(n,0) = A000225(n+1).
T(n,1) = A000337(n).
T(n+2,2) = A055580(n).
T(n+3,3) = A027608(n).
T(n+4,4) = A211386(n).
T(n+5,5) = A211388(n).
T(n,n) = A000012(n).
T(n+1,n) = A005408(n).
T(n+2,n) = A056220(n+2).
T(n+3,n) = A199899(n+1).
Row sums are A003462(n+1).
Diagonal sums are A048739(n).
Riordan array (1/((1-2*x)*(1-x)), x/(1-2*x)). (End)
Consider the transformation 1 + x + x^2 + x^3 + ... + x^n = A_0*(x-2)^0 + A_1*(x-2)^1 + A_2*(x-2)^2 + ... + A_n*(x-2)^n. This sequence gives A_0, ... A_n as the entries in the n-th row of this triangle, starting at n = 0. - Derek Orr, Oct 14 2014
The n-th row lists the coefficients of the polynomial sum_{k=0..n} (X+2)^k, in order of increasing powers. - M. F. Hasler, Oct 15 2014

Examples

			First six rows:
1
3....1
7....5....1
15...17...7....1
31...49...31...9...1
63...129..111..49..11..1
		

Crossrefs

Programs

  • Mathematica
    z = 10;
    p[n_, x_] := (x + 1)^n;
    q[n_, x_] := (x + 1)^n
    p1[n_, k_] := Coefficient[p[n, x], x^k];
    p1[n_, 0] := p[n, x] /. x -> 0;
    d[n_, x_] := Sum[p1[n, k]*q[n - 1 - k, x], {k, 0, n - 1}]
    h[n_] := CoefficientList[d[n, x], {x}]
    TableForm[Table[Reverse[h[n]], {n, 0, z}]]
    Flatten[Table[Reverse[h[n]], {n, -1, z}]]  (* A193844 *)
    TableForm[Table[h[n], {n, 0, z}]]
    Flatten[Table[h[n], {n, -1, z}]]  (* A193845 *)
    Table[2^k*Binomial[n + 1, k]*Hypergeometric2F1[1, -k, -k + n + 2, 1/2], {n, 0, 9}, {k, n, 0, -1}] // Flatten (* Michael De Vlieger, Nov 09 2021 *)
  • PARI
    for(n=0,20,for(k=0,n,print1(1/k!*sum(i=0,n,(2^(i-k)*prod(j=0,k-1,i-j))),", "))) \\ Derek Orr, Oct 14 2014

Formula

T(n,k) = A193844(n,n-k).
T(n,k) = 3*T(n-1,k) + T(n-1,k-1) - 2*T(n-2,k) - T(n-2,k-1), T(0,0) = 1, T(1,0) = 3, T(1,1) = 1, T(n,k) = 0 if k<0 or if k>n. - Philippe Deléham, Jan 17 2014

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

Original entry on oeis.org

1, 3, 7, 1, 15, 5, 31, 17, 1, 63, 49, 7, 127, 129, 31, 1, 255, 321, 111, 9, 511, 769, 351, 49, 1, 1023, 1793, 1023, 209, 11, 2047, 4097, 2815, 769, 71, 1, 4095, 9217, 7423, 2561, 351, 13, 8191, 20481, 18943, 7937, 1471, 97, 1, 16383, 45057, 47103
Offset: 1

Views

Author

Clark Kimberling, Mar 18 2012

Keywords

Comments

Column 1: -1+2^n
Row sums: A048739
Alternating row sums: triangular numbers, A000217
For a discussion and guide to related arrays, see A208510.

Examples

			First five rows:
1
3
7....1
15...5
31...17...1
First three polynomials u(n,x): 1, 3, 7 + x.
		

Crossrefs

Essentially the same as the triangle in A257597.

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + v[n - 1, x] + 1;
    v[n_, x_] := (x + 1)*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[%]   (* A210197 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A210198 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]  (* A048739 *)
    Table[v[n, x] /. x -> 1, {n, 1, z}]  (* A005409 *)
    Table[u[n, x] /. x -> -1, {n, 1, z}] (* A000217 *)
    Table[v[n, x] /. x -> -1, {n, 1, z}] (* A000027 *)

Formula

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

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

Original entry on oeis.org

0, 0, 2, 6, 16, 40, 98, 238, 576, 1392, 3362, 8118, 19600, 47320, 114242, 275806, 665856, 1607520, 3880898, 9369318, 22619536, 54608392, 131836322, 318281038, 768398400, 1855077840, 4478554082, 10812186006, 26102926096, 63018038200, 152139002498
Offset: 0

Views

Author

J. Devillet, Sep 28 2017

Keywords

Comments

Number of weak orderings R on {1,...,n} that are weakly single-peaked w.r.t. the total ordering 1 < ... < n and for which {1,...,n} has exactly one maximal element for the weak ordering R.

Crossrefs

Essentially the same as A265278.

Programs

  • Magma
    I:=[0,0,2]; [n le 3 select I[n] else 3*Self(n-1)-Self(n-2)-Self(n-3): n in [1..40]]; // Vincenzo Librandi, Oct 09 2017
  • Maple
    A293004:=gfun:-rectoproc({a(n)=3*a(n-1) -a(n-2)-a(n-3),a(0)=0,a(1)=0,a(2)=2},a(n),remember):  map(A293004, [$0..10^3]);  # Muniru A Asiru, Oct 09 2017
  • Mathematica
    CoefficientList[Series[2 x^2/(x^3 + x^2 - 3 x + 1), {x, 0, 30}], x] (* Michael De Vlieger, Oct 06 2017 *)
    RecurrenceTable[{a[1]==a[2]==0, a[3]==2, a[n]==3a[n-1] - a[n-2] - a[n-3]}, a, {n, 40}] (* Vincenzo Librandi, Oct 09 2017 *)
  • PARI
    concat(vector(2), Vec(2*x^2 / (x^3+x^2-3*x+1) + O(x^40))) \\ Colin Barker, Sep 28 2017
    

Formula

G.f.: 2*x^2 / (x^3 + x^2 - 3x + 1).
a(n) = 2*A048739(n-2), a(0) = a(1) = 0.
From Colin Barker, Sep 28 2017: (Start)
a(n) = 3*a(n-1) - a(n-2) - a(n-3) for n > 2.
a(n) = (-2 + (1-sqrt(2))^n + (1+sqrt(2))^n) / 2. (End)
a(n) = A265278(n) for n != 1. - Joerg Arndt, Oct 01 2017

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

Original entry on oeis.org

1, -1, 4, -8, 21, -49, 120, -288, 697, -1681, 4060, -9800, 23661, -57121, 137904, -332928, 803761, -1940449, 4684660, -11309768, 27304197, -65918161, 159140520, -384199200, 927538921, -2239277041, 5406093004, -13051463048, 31509019101, -76069501249, 183648021600
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Partial sums of sequence of signed Pell numbers (-1)^n*A000129(n). - Paul Barry, May 09 2003

Crossrefs

-a(-3-n) = A048739(n).

Programs

  • Mathematica
    CoefficientList[Series[(1/(1-x))/(1+2x-x^2), {x,0,50}], x] (* Harvey P. Dale, Mar 20 2011 *)
  • PARI
    Vec((1-x)^(-1)/(1+2*x-x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012

Formula

G.f.: 1/((1-x)*(1+2*x-x^2)).
From Colin Barker, Apr 15 2016: (Start)
a(n) = -a(n-1)+3*a(n-2)-a(n-3) for n>2.
a(n) = (2-(-1-sqrt(2))^(1+n)-(-1+sqrt(2))^(1+n))/4.
(End)
E.g.f.: (1/4)*(2*exp(x) + (1 + sqrt(2))*exp((-1-sqrt(2))*x) - (sqrt(2) - 1)*exp((sqrt(2)-1)*x)). - Ilya Gutkovskiy, Apr 15 2016

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

Original entry on oeis.org

1, 3, 1, 7, 4, 15, 12, 1, 31, 32, 6, 63, 80, 24, 1, 127, 192, 80, 8, 255, 448, 240, 40, 1, 511, 1024, 672, 160, 10, 1023, 2304, 1792, 560, 60, 1, 2047, 5120, 4608, 1792, 280, 12, 4095, 11264, 11520, 5376, 1120, 84, 1, 8191, 24576, 28160, 15360, 4032
Offset: 1

Views

Author

Clark Kimberling, Mar 18 2012

Keywords

Comments

Row sums: A005409
Column 1: -1+2^n
Alternating row sums: 1, 2,3,4,5,6,..., A000027
For a discussion and guide to related arrays, see A208510.

Examples

			First five rows:
1
3....1
15...12...1
31...32...6
63...80...24...1
First three polynomials v(n,x): 1, 3 + x , 15 + 12x + x^2.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + v[n - 1, x] + 1;
    v[n_, x_] := (x + 1)*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[%]   (* A210197 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A210198 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]  (* A048739 *)
    Table[v[n, x] /. x -> 1, {n, 1, z}]  (* A005409 *)
    Table[u[n, x] /. x -> -1, {n, 1, z}] (* A000217 *)
    Table[v[n, x] /. x -> -1, {n, 1, z}] (* A000027 *)

Formula

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

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

Original entry on oeis.org

1, 2, 1, 3, 3, 2, 4, 6, 7, 3, 5, 10, 16, 13, 5, 6, 15, 30, 35, 25, 8, 7, 21, 50, 75, 76, 46, 13, 8, 28, 77, 140, 181, 157, 84, 21, 9, 36, 112, 238, 371, 413, 317, 151, 34, 10, 45, 156, 378, 686, 924, 911, 625, 269, 55, 11, 55, 210, 570, 1176, 1848, 2206, 1949, 1211, 475, 89
Offset: 1

Views

Author

Clark Kimberling, Mar 23 2012

Keywords

Comments

Row n starts with n and ends with F(n), where F=A000045 (Fibonacci numbers).
Row sums: A048739.
Alternating row sums: 1,1,2,2,3,3,4,4,5,5, ...
For a discussion and guide to related arrays, see A208510.

Examples

			First few rows are:
  1;
  2,  1;
  3,  3,  2;
  4,  6,  7,  3;
  5, 10, 16, 13,  5;
  6, 15, 30, 35, 25,  8;
  7, 21, 50, 75, 76, 46, 13;
First few polynomials v(n,x) are:
  v(1, x) = 1;
  v(2, x) = 2 +  1*x;
  v(3, x) = 3 +  3*x +  2*x^2;
  v(4, x) = 4 +  6*x +  7*x^2 +  3*x^3;
  v(5, x) = 5 + 10*x + 16*x^2 + 13*x^3 + 5*x^4;
		

Crossrefs

Programs

  • Mathematica
    (* First program *)
    u[1, x_]:= 1; v[1, x_]:= 1; z = 16;
    u[n_, x_]:= x*u[n-1, x] + (1+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[%]    (* A210565 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A210595 *)
    (* Second program *)
    v[n_, x_]:= v[n, x]= If[n<2, n+1 +n*x, (1+x)*v[n-1, x] +x^2*v[n-2, x] +1];
    T[n_]:= CoefficientList[Series[v[n, x], {x,0,n}], x];
    Table[T[n-1], {n, 12}]//Flatten (* G. C. Greubel, May 24 2021 *)
  • Sage
    @CachedFunction
    def v(n,x): return n+1+n*x if (n<2) else (1+x)*v(n-1,x) +x^2*v(n-2,x) +1
    def T(n): return taylor( v(n,x) , x,0,n).coefficients(x, sparse=False)
    flatten([T(n-1) for n in (1..12)]) # G. C. Greubel, May 24 2021

Formula

u(n,x) = x*u(n-1,x) + (x+1)*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.
T(n, k) = [x^k]( v(n,x) ), where v(n, x) = (1+x)*v(n-1, x) + x^2*v(n-2, x) + 1, v(1, x) = 1, and v(2, x) = 2 + x. - G. C. Greubel, May 24 2021

A048772 Partial sums of A048696.

Original entry on oeis.org

1, 10, 29, 76, 189, 462, 1121, 2712, 6553, 15826, 38213, 92260, 222741, 537750, 1298249, 3134256, 7566769, 18267802, 44102381, 106472572, 257047533, 620567646, 1498182833
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a048772 n = a048772_list !! n
    a048772_list = scanl1 (+) a048696_list
    -- Reinhard Zumkeller, Dec 15 2013
    
  • Mathematica
    Accumulate[LinearRecurrence[{2,1},{1,9},30]] (* or *) LinearRecurrence[ {3,-1,-1},{1,10,29},30] (* Harvey P. Dale, Apr 20 2012 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -1,-1,3]^n*[1;10;29])[1,1] \\ Charles R Greathouse IV, Feb 10 2017

Formula

a(n)=2*a(n-1)+a(n-2)+8; a(0)=1, a(1)=10.
a(n)=[ {(9+5*sqrt(2))(1+sqrt(2))^n - (9-5*sqrt(2))(1-sqrt(2))^n}/2*sqrt(2) ]-4.
a(0)=1, a(1)=10, a(2)=29, a(n)=3*a(n-1)-a(n-2)-a(n-3). - Harvey P. Dale, Apr 20 2012
G.f. ( 1+7*x ) / ( (x-1)*(x^2+2*x-1) ). a(n)=A048739(n)+7*A048739(n-1). - R. J. Mathar, Nov 08 2012

A153346 Triangle read by rows: A000012 * A153345.

Original entry on oeis.org

1, 3, 0, 7, 1, 0, 14, 5, 1, 0, 26, 16, 6, 1, 0, 46, 42, 23, 7, 1, 0, 79, 98, 71, 31, 8, 1, 0, 133, 212, 192, 109, 40, 9, 1, 0, 221, 435, 475, 332, 157, 50, 10, 1, 0, 364, 859, 1102, 916, 529, 216, 61, 11, 1, 0, 596, 1648, 2436, 2350, 1602, 795, 287, 73, 12, 1, 0, 972, 3092, 5186, 5702, 4481, 2613, 1143, 371, 86, 13, 1, 0
Offset: 0

Views

Author

Gary W. Adamson, Dec 24 2008

Keywords

Comments

Row sums = A048739: (1, 3, 8, 20, 49, 119, 288, ...).
Left border = A001924.

Examples

			First few rows of the triangle:
    1;
    3,    0;
    7,    1,    0;
   14,    5,    1,    0;
   26,   16,    6,    1,    0;
   46,   42,   23,    7,    1,   0
   79,   98,   71,   31,    8,   1,   0;
  133,  212,  192,  109,   40,   9,   1,  0;
  221,  435,  475,  332,  157,  50,  10,  1,  0;
  364,  859, 1102,  916,  529, 216,  61, 11,  1, 0;
  596, 1648, 2436, 2350, 1602, 795, 287, 73, 12, 1, 0;
  ...
		

Crossrefs

Extensions

a(44) = 0 corrected and more terms from Georg Fischer, Jun 05 2023
Previous Showing 41-50 of 67 results. Next