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 11-20 of 20 results.

A118923 Triangle T(n,k) built by placing T(n,0)=A000012(n) in the left edge, T(n,n)=A079978(n) on the right edge and filling the body with the Pascal recurrence T(n,k) = T(n-1,k) + T(n-1,k-1).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 1, 3, 3, 2, 0, 1, 4, 6, 5, 2, 0, 1, 5, 10, 11, 7, 2, 1, 1, 6, 15, 21, 18, 9, 3, 0, 1, 7, 21, 36, 39, 27, 12, 3, 0, 1, 8, 28, 57, 75, 66, 39, 15, 3, 1, 1, 9, 36, 85, 132, 141, 105, 54, 18, 4, 0, 1, 10, 45, 121, 217, 273, 246, 159, 72, 22, 4, 0, 1, 11, 55, 166
Offset: 0

Views

Author

Alford Arnold, May 05 2006

Keywords

Comments

The fourth diagonal is 1, 2, 5, 11, 21, ..., which is 1 + A000292. The fifth diagonal is 0, 2, 7, 18, 39, 75, 132, 217, 338, 504, 725, 1012, ..., which is A051743.
The array A007318 is generated by placing A000012 on both edges with the same Pascal-like recurrence, and the array A059259 uses edges defined by A000012 and A059841. - R. J. Mathar, Jan 21 2008
From Michael A. Allen, Nov 30 2021: (Start)
T(n,n-k) is the (n,k)-th entry of the (1/(1-x^3), x/(1-x)) Riordan array.
Sums of rows give A077947.
Sums of antidiagonals give A079962. (End)

Examples

			The table begins
  1
  1  0
  1  1  0
  1  2  1  1
  1  3  3  2  0
  1  4  6  5  2  0
  1  5 10 11  7  2  1
  1  6 15 21 18  9  3  0
		

Crossrefs

Programs

  • Maple
    A000012 := proc(n) 1 ; end: A079978 := proc(n) if n mod 3 = 0 then 1; else 0 ; fi ; end: A118923 := proc(n,k) if k = 0 then A000012(n); elif k = n then A079978(n) ; else A118923(n-1,k)+A118923(n-1,k-1) ; fi ; end: for n from 0 to 15 do for k from 0 to n do printf("%d, ",A118923(n,k)) ; od: od: # R. J. Mathar, Jan 21 2008
  • Mathematica
    Flatten@Table[CoefficientList[Series[1/((1 + x*y + x^2*y^2)(1 - x - x*y)), {x, 0, 23}, {y, 0, 11}], {x, y}][[n + 1, k + 1]], {n, 0, 11}, {k, 0, n}] (* Michael A. Allen, Nov 30 2021 *)

Formula

From Michael A. Allen, Nov 30 2021: (Start)
For 0 <= k < n, T(n,k) = (n-k)*Sum_{j=0..floor(k/3)} binomial(n-3*j,n-k)/(n-3*j).
G.f.: 1/((1+x*y+(x*y)^2)*(1-x-x*y)). (End)

Extensions

Edited and extended by R. J. Mathar, Jan 21 2008
Offset changed by Michael A. Allen, Nov 30 2021

A122552 a(0)=a(1)=a(2)=1, a(n) = a(n-1) + a(n-2) + 2*a(n-3) for n > 2.

Original entry on oeis.org

1, 1, 1, 4, 7, 13, 28, 55, 109, 220, 439, 877, 1756, 3511, 7021, 14044, 28087, 56173, 112348, 224695, 449389, 898780, 1797559, 3595117, 7190236, 14380471, 28760941, 57521884, 115043767, 230087533, 460175068, 920350135, 1840700269, 3681400540
Offset: 0

Views

Author

Philippe Deléham, Sep 20 2006

Keywords

Comments

Equals INVERT transform of (1, 0, 3, 0, 3, 0, 3, ...). - Gary W. Adamson, Apr 27 2009
No term is divisible by 3. - Vladimir Joseph Stephan Orlovsky, Mar 24 2011
For n > 3, a(n) is the number of quaternary sequences of length n-1 starting with q(0) = 0, in which all triples (q(i), q(i+1), q(i+2)) contain digits 0 and 3; cf. A294627. - Wojciech Florek, Jul 30 2018
For n > 0, a(n) is the number of ways to tile a strip of length n with squares, dominoes, and two colors of trominoes, with the restriction that the first tile cannot be a domino. - Greg Dresden and Bora Bursalı, Aug 31 2023

Examples

			It is shown in A294627 that there are 42 quaternary sequences (i.e., build from four digits 0, 1, 2, 3) and having both 0 and 3 in every (consecutive) triple. Only a(5=4+1) = 13 of them start with 0: 003x, 030x, 03y0, 0y30, 0330, where x = 0, 1, 2, 3 and y = 1, 2.
		

Crossrefs

Cf. A294627.

Programs

  • GAP
    a:=[1,1,1];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+2*a[n-3]; od; a; # Muniru A Asiru, Jul 30 2018
  • Maple
    seq(coeff(series((1-x^2)/(1-x-x^2-2*x^3), x,n+1),x,n),n=0..40); # Muniru A Asiru, Aug 02 2018
  • Mathematica
    LinearRecurrence[{1, 1, 2}, {1, 1, 1}, 40]
    CoefficientList[ Series[(x^2 - 1)/(2x^3 + x^2 + x - 1), {x, 0, 35}], x] (* Robert G. Wilson v, Jul 30 2018 *)
  • PARI
    Vec((1-x^2)/(1-x-x^2-2*x^3)+O(x^99)) \\ Charles R Greathouse IV, Jan 17 2012
    
  • Sage
    from sage.combinat.sloane_functions import recur_gen3; it = recur_gen3(1,1,1,1,1,2); [next(it) for i in range(30)] # Zerinvary Lajos, Jun 25 2008
    

Formula

a(3*n) = 2*a(3*n-1)+2, a(3*n+1) = 2*a(3*n)-1, a(3*n+2) = 2*a(3*n+1)-1, a(0)=1.
G.f.: (1-x^2)/(1-x-x^2-2*x^3).
a(n) = ((-1)^n*A130815(n+2) + 3*2^n)/7. - R. J. Mathar, Nov 30 2008
From Paul Curtz, Oct 02 2009: (Start)
a(n) = A140295(n+2)/4.
a(n+1) - 2a(n) = period 3: repeat -1,-1,2 = -A061347.
a(n) - a(n-1) = 0,0,3,3,6,15,27,54,111,... = 3*A077947.
a(n) - a(n-2) = 0,3,6,9,21,42,81,....
a(n) - a(n-3) = 3,6,12,24,... = A007283 = 3*A000079.
a(3n) + a(3n+1) + a(3n+2) = 3,24,192,... = A103333(n+1) = A140295(3n) + A140295(3n+1) + A140295(3n+2).
See A078010, A139217, A139218. (End)

Extensions

Corrected by T. D. Noe, Nov 01 2006, Nov 07 2006
Typo in definition corrected by Paul Curtz, Oct 02 2009

A186575 Expansion of (1 + 2*x + 6*x^2)/(1 - x - x^2 - 2*x^3) in powers of x.

Original entry on oeis.org

1, 3, 10, 15, 31, 66, 127, 255, 514, 1023, 2047, 4098, 8191, 16383, 32770, 65535, 131071, 262146, 524287, 1048575, 2097154, 4194303, 8388607, 16777218, 33554431, 67108863, 134217730, 268435455, 536870911, 1073741826, 2147483647, 4294967295
Offset: 0

Views

Author

Vladimir Kruchinin, Feb 23 2011

Keywords

Comments

From Kai Wang, May 23 2020: (Start)
Let f(t) = t^3 + u*t^2 + v*t + w and {x,y,z} be the simple roots of f(t).
For n >= 0, let p(n) = x^n/((x-y)*(x-z)) + y^n/((y-x)*(y-z)) + z^n/((z-x)*(z-y)) and q(n) = x^n + y^n + z^n.
Then for n >= 0, q(n) = 3*p(n+2) + 2*u*p(n+1) + v*p(n).
In this case, f(t) = t^3 - t^2 - t - 2. q(n) = 3*p(n+2) - 2*p(n+1) - p(n).
p(n) = {0, 0, 1, 1, 2, 5, 9,...}, q(n) = {3, 1, 3, 10, 15, 31,...}.
a(n) = q(n+1), A077939(n) = p(n+2). (End)

Examples

			G.f. = 1 + 3*x + 10*x^2 + 15*x^3 + 31*x^4 + 66*x^5 + 127*x^6 + 255*x^7 + ...
		

Crossrefs

Cf. A099837.

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 35); Coefficients(R!( (1 + 2*x + 6*x^2)/(1 - x - x^2 - 2*x^3))); // Marius A. Burtea, Jan 31 2020
  • Mathematica
    CoefficientList[Series[(1+2x+6x^2)/(1-x-x^2-2x^3),{x,0,40}],x]  (* Harvey P. Dale, Mar 14 2011 *)
  • PARI
    Vec((1 + 2*x + 6*x^2) / ((1 - 2*x)*(1 + x + x^2)) + O(x^40)) \\ Colin Barker, May 03 2019
    
  • PARI
    polsym(polrecip(1 - x - x^2 - 2*x^3),44)[^1] \\ Joerg Arndt, Jun 23 2020
    

Formula

a(n+1) = n*Sum_{k=1..n} Sum_{j=n-3*k..k} 2^(k-j)*binomial(j,n-3*k+2*j)*binomial(k,j)/k.
G.f.: [log(1/(1 - x - x^2 - 2*x^3))]', (x + x^2 + 2*x^3)^k = Sum_{n>=k} Sum_{j=n-3*k..k} 2^(k-j)*binomial(j,n-3*k+2*j)*binomial(k,j)*x^n (see link).
a(n) = 2^(n+1) + A099837(n+1). - R. J. Mathar, Mar 18 2011
a(n) = a(n-1) + a(n-2) + 2*a(n-3) for n>2. - Colin Barker, May 03 2019
From Kai Wang, May 23 2020: (Start)
a(n) = 3*A077947(n+1) - 2*A077947(n) - A077947(n-1).
A077947(n) = (-8*a(n+3) + 27*a(n+2) - a(n+1))/147. (End)

Extensions

More terms from Harvey P. Dale, Mar 14 2011

A096669 Rectangular array T(n,k) read by antidiagonals; generating function of row n is 1/F(n,x), where F(n,x) is the polynomial 1 - x - x^2 - 2*x^3 -...- F(n+1)*x^n and F(n+1) is the (n+1)st Fibonacci number, for n=0,1,2,...

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 5, 5, 2, 1, 1, 1, 8, 9, 5, 2, 1, 1, 1, 13, 18, 12, 5, 2, 1, 1, 1, 21, 37, 24, 12, 5, 2, 1, 1, 1, 34, 73, 52, 29, 12, 5, 2, 1, 1, 1, 55, 146, 115, 62, 29, 12, 5, 2, 1, 1, 1, 89, 293, 251, 140, 70, 29, 12, 5, 2, 1, 1, 1, 144, 585, 542, 321, 156, 70
Offset: 1

Views

Author

Clark Kimberling, Jul 03 2004

Keywords

Examples

			Rows begin:
1 1 1 1 1 ... = A000012, with g.f. 1/(1-x)
1 1 2 3 5 ... = A000045, with g.f. 1/(1-x-x^2)
1 1 2 5 9 ... = A077947, with g.f. 1/(1-x-x^2-2*x^3)
		

Crossrefs

Cf. A000045, A096670. Rows converge to A000129.

A152732 a(n) + a(n+1) + a(n+2) = 2^n.

Original entry on oeis.org

0, 0, 2, 2, 4, 10, 18, 36, 74, 146, 292, 586, 1170, 2340, 4682, 9362, 18724, 37450, 74898, 149796, 299594, 599186, 1198372, 2396746, 4793490, 9586980, 19173962, 38347922, 76695844, 153391690, 306783378, 613566756, 1227133514, 2454267026, 4908534052
Offset: 1

Views

Author

Keywords

Comments

0 + 0 + 2 = 2^1; 0 + 2 + 2 = 2^2; 2 + 2 + 4 = 2^3; 2 + 4 + 10 = 2^4; ...
With a(0)=1, a(n) is the number of length n strings in the language over alphabet {0,1} generated by the regular expression: ((0+1)(0*(11)*)*10)*. - Geoffrey Critzer, Jan 25 2014

Crossrefs

Programs

  • Magma
    I:=[0,0,2]; [n le 3 select I[n] else Self(n-1) +Self(n-2) +2*Self(n-3): n in [1..30]]; // G. C. Greubel, Sep 01 2018
  • Mathematica
    k0=k1=0;lst={k0,k1};Do[kt=k1;k1=2^n-k1-k0;k0=kt;AppendTo[lst,k1],{n,1,5!}];lst
    LinearRecurrence[{1, 1, 2}, {0, 0, 2}, 70] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *)
  • PARI
    concat([0,0],Vec(2/(1-2*x)/(1+x+x^2)+O(x^99))) \\ Charles R Greathouse IV, Feb 24 2012
    

Formula

From R. J. Mathar, Dec 12 2008: (Start)
a(n) = 2*A077947(n-3).
G.f.: 2*x^3/((1-2*x)*(1+x+x^2)). (End)
a(n) = (1/21)*(3*2^n + 18*cos((2*n*Pi)/3) + 2*sqrt(3)*sin((2*n*Pi)/3)). - Zak Seidov, Dec 12 2008

A213948 Triangle, by rows, generated from the INVERT transforms of (1, 1, 2, 4, 8, 16, ...).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 4, 4, 4, 1, 7, 10, 8, 8, 1, 12, 24, 20, 16, 16, 1, 20, 52, 56, 40, 32, 32, 1, 33, 112, 144, 112, 80, 64, 64, 1, 54, 238, 344, 320, 224, 160, 128, 128, 1, 88, 496, 828, 848, 640, 448, 320, 256, 256
Offset: 1

Views

Author

Gary W. Adamson, Jun 25 2012

Keywords

Comments

Row sums = A001519, the odd-indexed Fibonacci terms. The triangle is a companion to A213947, having row sums of the even-indexed Fibonacci terms.

Examples

			First few rows of the triangle are:
  1;
  1,   1;
  1,   2,   2;
  1,   4,   4,   4;
  1,   7,  20,   8,   8;
  1,  12,  24,  20,  16,  16;
  1,  20,  52,  56,  40,  32,  32;
  1,  33, 112, 144, 112,  80,  64,  64;
  1,  54, 238, 344, 320, 224, 160, 128, 128;
  1,  88, 496, 828, 848, 640, 448, 320, 256, 256;
  ...
		

Crossrefs

Cf. A001519, A213947, A000071 (2nd column), A020714 (subdiagonal), A005009 (subdiagonal).

Programs

  • Maple
    read("transforms") ;
    A213948i := proc(n,k)
        if n = 1 then
            L := [1,seq(0,i=0..k)] ;
        else
            L := [1,seq(2^i,i=0..n-2),seq(0,i=0..k)] ;
        end if;
        INVERT(L) ;
        op(k,%) ;
    end proc:
    A213948 := proc(n,k)
        if k = 1 then
            1;
        else
            A213948i(k,n)-A213948i(k-1,n) ;
        end if;
    end proc: # R. J. Mathar, Jun 30 2012

Formula

Create an array in which the n-th row is the INVERT transform of the first n terms in the sequence (1, 1, 2, 4, 8, 16, 32, ...):
1, 1, 1, 1, 1, 1,
1, 2, 3, 5, 8, 13, (essentially A000045)
1, 2, 5, 9, 18, 37, (essentially A077947)
1, 2, 5, 13, 26, 57,
Terms of the n-th row of the triangle are the finite differences downwards the n-th column of this array.

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

Original entry on oeis.org

1, 1, 2, 4, 8, 17, 33, 66, 132, 264, 529, 1057, 2114, 4228, 8456, 16913, 33825, 67650, 135300, 270600, 541201, 1082401, 2164802, 4329604, 8659208, 17318417, 34636833, 69273666, 138547332, 277094664, 554189329, 1108378657, 2216757314, 4433514628, 8867029256, 17734058513
Offset: 0

Views

Author

Michael A. Allen, Dec 13 2021

Keywords

Comments

Number of ways to tile an n-board (an n X 1 array of 1 X 1 cells) using squares, dominoes, trominoes, tetrominoes, black pentominoes, and white pentominoes.
Row sums of A349841.

Crossrefs

Row sums of triangles in the same family as A349841: A000079, A001045, A077947, A115451.

Programs

  • Mathematica
    CoefficientList[Series[(1 - x)/((1 - x^5)(1 - 2x)), {x, 0, 35}], x]

Formula

a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + 2*a(n-5) + delta(n,0), a(n<0)=0.
a(n) = 2*a(n-1) + a(n-5) - 2*a(n-6) + delta(n,0) - delta(n,1), a(n<0)=0.
G.f.: 1/(1-x-x^2-x^3-x^4-2*x^5).

A341905 a(n) = a(n-1) + a(n-2) + 2*a(n-3) with a(0) = 3, a(1) = 0, a(2) = 2.

Original entry on oeis.org

3, 0, 2, 8, 10, 22, 48, 90, 182, 368, 730, 1462, 2928, 5850, 11702, 23408, 46810, 93622, 187248, 374490, 748982, 1497968, 2995930, 5991862, 11983728, 23967450, 47934902, 95869808, 191739610, 383479222, 766958448, 1533916890, 3067833782, 6135667568, 12271335130
Offset: 0

Views

Author

Michael De Vlieger, Jun 04 2021

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <2|1|1>>^n. <<3, 0, 2>>)[1,1]:
    seq(a(n), n=0..34);  # Alois P. Heinz, Jun 04 2021
  • Mathematica
    LinearRecurrence[{1, 1, 2}, {3, 0, 2}, 35] (* or *)
    CoefficientList[Series[(-3 + 3 x + x^2)/(-1 + x + x^2 + 2 x^3), {x, 0, 34}], x]

Formula

G.f.: (-3 + 3*x + x^2)/(-1 + x + x^2 + 2*x^3).
a(n) = (10*2^(n-1) + 13*A049347(n) - 9*A079978(n+1) + 3)/7. - Greg Dresden, Jun 20 2021

A104579 A Padovan-Jacobsthal convolution triangle.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 1, 4, 3, 0, 1, 4, 3, 6, 4, 0, 1, 5, 12, 6, 8, 5, 0, 1, 6, 16, 24, 10, 10, 6, 0, 1, 13, 24, 34, 40, 15, 12, 7, 0, 1, 16, 53, 60, 60, 60, 21, 14, 8, 0, 1, 25, 72, 135, 120, 95, 84, 28, 16, 9, 0, 1, 42, 126, 200, 275, 210, 140, 112, 36, 18, 10, 0, 1, 57, 220, 381
Offset: 0

Views

Author

Paul Barry, Mar 16 2005

Keywords

Comments

First column is A052947. Row sums are A077947. Diagonal sums are A052907.

Examples

			Rows begin {1},{0,1},{1,0,1},{2,2,0,1},{1,4,3,0,1},{4,3,6,4,0,1},..
		

Formula

Riordan array (1/(1-x^2-2x^3), x/(1-x^2-2x^3))
T(n,k) = T(n-1,k-1)+T(n-2,k)+2*T(n-3,k), T(0,0)=1, T(n,k)=0 if k>n or if k<0. - Philippe Deléham, Jan 08 2014

A191239 Triangle T(n,k) = coefficient of x^n in expansion of (x+x^2+2*x^3)^k.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 0, 5, 3, 1, 0, 4, 9, 4, 1, 0, 4, 13, 14, 5, 1, 0, 0, 18, 28, 20, 6, 1, 0, 0, 12, 49, 50, 27, 7, 1, 0, 0, 8, 56, 105, 80, 35, 8, 1, 0, 0, 0, 56, 161, 195, 119, 44, 9, 1, 0, 0, 0, 32, 210, 366, 329, 168, 54, 10, 1, 0, 0, 0, 16, 200, 581, 721, 518, 228, 65, 11, 1, 0, 0, 0, 0, 160, 732, 1337, 1288, 774, 300, 77, 12, 1, 0, 0, 0, 0, 80, 780, 2045, 2716, 2142, 1110, 385, 90, 13, 1
Offset: 1

Views

Author

Vladimir Kruchinin, May 27 2011

Keywords

Comments

1. Riordan Array (1,x+x^2+2*x^3) without first column.
2. Riordan Array (1+x+2*x^3,x+x^2+2*x^3) numbering triangle (0,0).
3. Bell Polynomial of second kind B(n,k){1,2,12,0,0,0,...,0}=n!/k!*T(n,k).
4. For the g.f. 1/(1-x-x^2-2*x^3) we have a(n)=sum(k=1..n, T(n,k)) (see A077947)
For more formulas see preprints.

Examples

			Triangle begins:
  1,
  1,1,
  2,2,1,
  0,5,3,1,
  0,4,9,4,1,
  0,4,13,14,5,1,
  0,0,18,28,20,6,1,
		

Programs

  • Maxima
    T(n,k):=sum(binomial(j,n-3*k+2*j)*2^(k-j)*binomial(k,j),j,0,k);

Formula

T(n,k) = Sum_{j=0..k} binomial(j,n-3*k+2*j)*2^(k-j)*binomial(k,j).
Previous Showing 11-20 of 20 results.