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 21-30 of 35 results. Next

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

Original entry on oeis.org

1, 0, 0, 2, -1, 0, 4, -4, 1, 8, -12, 6, 15, -32, 24, 24, -79, 80, 24, -182, 239, -32, -388, 660, -303, -744, 1708, -1266, -1185, 4160, -4240, -1104, 9505, -12640, 2032, 20114, -34785, 16704, 38196, -89684, 68193, 59688, -217564, 226070, 51183, -494816, 669704, -123704, -1040815, 1834224
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Examples

			G.f. = 1 + 2*x^3 - x^4 + 4*x^6 - 4*x^7 + x^8 + 8*x^9 - 12*x^10 + 6*x^11 + ...
		

Crossrefs

Cf. A008937.

Programs

  • Maple
    a:= n-> -(<<0|0|1|0>, <1|0|-1|0>, <0|1|-1|0>, <0|0|-1|1>>^(n+3))[4, 1]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jul 24 2008
  • Mathematica
    a[n_] := -MatrixPower[{{0, 0, 1, 0}, {1, 0, -1, 0}, {0, 1, -1, 0}, {0, 0, -1, 1}}, n+3][[4, 1]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 14 2016, after Alois P. Heinz *)
    LinearRecurrence[{0,0,2,-1},{1,0,0,2},50] (* Harvey P. Dale, Oct 25 2020 *)
  • PARI
    Vec((1-x)^(-1)/(1+x+x^2-x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • PARI
    {a(n) = if( n<0, polcoeff( - x^4 / (1 - 2*x + x^4) + x * O(x^-n), -n), polcoeff( 1 / (1 - 2*x^3 + x^4) + x * O(x^n), n))}; /* Michael Somos, Aug 19 2014 */

Formula

a(n) = -1 * term (4,1) in the 4x4 matrix [0,0,1,0; 1,0,-1,0; 0,1,-1,0; 0,0,-1,1]^(n+3) - Alois P. Heinz, Jul 24 2008
a(n) = -A008937(-n-3). - Alois P. Heinz, Jul 24 2008
G.f.: 1 / (1 - 2*x^3 + x^4). - Michael Somos, Aug 19 2014
a(n) = -a(n-1) - a(n-2) + a(n-3) + 1 = 2*a(n-3) - a(n-4) for all n in Z. - Michael Somos, Aug 19 2014
a(n) - a(n-1) = A057597(n+2). (first differences). - R. J. Mathar, Oct 16 2017

A118884 Triangle read by rows: T(n,k) is the number of binary sequences of length n containing k subsequences 0011 (n,k>=0).

Original entry on oeis.org

1, 2, 4, 8, 15, 1, 28, 4, 52, 12, 96, 32, 177, 78, 1, 326, 180, 6, 600, 400, 24, 1104, 864, 80, 2031, 1827, 237, 1, 3736, 3800, 648, 8, 6872, 7800, 1672, 40, 12640, 15840, 4128, 160, 23249, 31884, 9846, 556, 1, 42762, 63704, 22844, 1752, 10, 78652, 126480
Offset: 0

Views

Author

Emeric Deutsch, May 03 2006

Keywords

Comments

Row n has 1+floor(n/4) terms. Sum of entries in row n is 2^n (A000079). T(n,0) = A008937(n+1). T(n,1) = A118885(n). Sum(k*T(n,k), k=0..n-1) = (n-3)*2^(n-4) (A001787).

Examples

			T(9,2) = 6 because we have aa0, aa1, a0a, a1a, 0aa and 1aa, where a=0011.
Triangle starts:
1;
2;
4;
8;
15, 1;
28, 4;
52, 12;
96, 32;
		

Crossrefs

Programs

  • Maple
    G:=1/(1-2*z+(1-t)*z^4): Gser:=simplify(series(G,z=0,23)): P[0]:=1: for n from 1 to 19 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 19 do seq(coeff(P[n],t,j),j=0..floor(n/4)) od; # yields sequence in triangular form
  • Mathematica
    nn=12;c=0;Map[Select[#,#>0&]&,CoefficientList[Series[1/(1-2x - (y-1)x^4/ (1-(y-1)c)), {x,0,nn}],{x,y}]]//Grid (* Geoffrey Critzer, Dec 25 2013 *)

Formula

G.f.: G(t,z) = 1/[1-2z+(1-t)z^4]. T(n,k) = 2T(n-1,k)-T(n-4,k)+T(n-4,k-1) (n>=4,k>=1).

A189155 Number of nX3 binary arrays without the pattern 0 0 1 1 diagonally, vertically or horizontally.

Original entry on oeis.org

8, 64, 512, 3375, 21952, 140608, 884736, 5545233, 34645976, 216000000, 1345572864, 8377795791, 52145952256, 324525966848, 2019487744000, 12566456507249, 78194107594728, 486552055503808, 3027480871826944, 18837870152811039
Offset: 1

Views

Author

R. H. Hardin Apr 17 2011

Keywords

Comments

Column 3 of A189161

Examples

			Some solutions for 4X3
..0..0..1....1..0..1....0..0..0....0..1..1....1..1..0....1..0..0....0..0..1
..0..0..0....0..1..0....0..0..0....1..0..1....0..1..0....0..1..1....1..0..0
..0..1..0....0..0..1....0..0..0....0..0..0....1..0..0....1..1..0....0..0..1
..0..0..0....1..0..0....0..1..1....0..1..0....1..1..0....0..1..1....0..0..0
		

Crossrefs

A008937(n+1)^3

Formula

Empirical: a(n) = 7*a(n-1) -a(n-2) +a(n-3) -164*a(n-4) +28*a(n-5) +68*a(n-6) +684*a(n-7) +66*a(n-8) +66*a(n-9) -726*a(n-10) -138*a(n-11) -132*a(n-12) +220*a(n-13) +20*a(n-14) +28*a(n-15) -25*a(n-16) -a(n-17) -a(n-18) +a(n-19)

A192804 Constant term in the reduction of the polynomial 1+x+x^2+...+x^n by x^3->x^2+x+1. See Comments.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 9, 16, 29, 53, 97, 178, 327, 601, 1105, 2032, 3737, 6873, 12641, 23250, 42763, 78653, 144665, 266080, 489397, 900141, 1655617, 3045154, 5600911, 10301681, 18947745, 34850336, 64099761, 117897841, 216847937, 398845538
Offset: 0

Views

Author

Clark Kimberling, Jul 10 2011

Keywords

Comments

For discussions of polynomial reduction, see A192232 and A192744.
This sequence provides the most-significant place-values in the construction of a tribonacci code. - James Dow Allen, Jul 12 2021

Examples

			The first five polynomials p(n,x) and their reductions:
  p(1,x)=1 -> 1,
  p(2,x)=x+1 -> x+1,
  p(3,x)=x^2+x+1 -> x^2+x+1,
  p(4,x)=x^3+x^2+x+1 -> 2x^2+2x+2,
  p(5,x)=x^4+x^3+x^2+x+1 -> 4x^2+4*x+3, so that
A192804=(1,1,1,2,3,...), A000073=(0,1,1,2,4,...), A008937=(0,0,1,2,4,...).
		

Crossrefs

Programs

  • Mathematica
    q = x^3; s = x^2 + x + 1; z = 40;
    p[0, x_] := 1; p[n_, x_] := x^n + p[n - 1, x];
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] :=
    FixedPoint[(s PolynomialQuotient @@ #1 +
           PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}]
      (* A192804 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}]
      (* A000073 *)
    u3 = Table[Coefficient[Part[t, n], x, 2], {n, 1, z}]
      (* A008937 *)

Formula

a(n) = 2*a(n-1) - a(n-4).
a(n) = a(n-1) + a(n-2) + a(n-3) - 1. - Alzhekeyev Ascar M, Feb 05 2012
G.f.: ( 1-x-x^2 ) / ( (x-1)*(x^3+x^2+x-1) ). - R. J. Mathar, May 06 2014
a(n) - a(n-1) = A000073(n-1). - R. J. Mathar, May 06 2014

A027083 a(n) = A027082(n, n+2).

Original entry on oeis.org

2, 6, 14, 28, 54, 102, 190, 352, 650, 1198, 2206, 4060, 7470, 13742, 25278, 46496, 85522, 157302, 289326, 532156, 978790, 1800278, 3311230, 6090304, 11201818, 20603358, 37895486, 69700668, 128199518, 235795678, 433695870
Offset: 2

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, 0, 0, -1}, {2, 6, 14, 28}, 50] (* Paolo Xausa, Sep 16 2024 *)

Formula

G.f.: (2x^2(1+x+x^2))/((1-x)(1-x-x^2-x^3)). Cf. A008937.
a(n) = A027024(n) + 1.
a(n) = A000213(n+3) -3. - R. J. Mathar, Jun 24 2020

A113301 Sum of odd-indexed terms of tribonacci numbers.

Original entry on oeis.org

0, 1, 5, 18, 62, 211, 715, 2420, 8188, 27701, 93713, 317030, 1072506, 3628263, 12274327, 41523752, 140473848, 475219625, 1607656477, 5438662906, 18398864822, 62242913851, 210566269283, 712340586524, 2409830942708, 8152399683933, 27579370581033, 93300342369742
Offset: 0

Views

Author

Jonathan Vos Post, Oct 24 2005

Keywords

Comments

A000073 is the tribonacci numbers. A113300 is the sum of even-indexed terms of tribonacci numbers. A099463 is the bisection of the tribonacci numbers. A113300(n) + A113301(n) = cumulative sum of tribonacci numbers = A008937(n). Primes in A113300 include a(2) = 5, a(5) = 211, a(9) = 27701, .... A113300 is semiprime for n = 4, 10, 14, ...

Examples

			a(0) = 0 = A000073(1);
a(1) = 0+1 = A000073(1) + A000073(3) = 1;
a(2) = 0+1+4 = A000073(1) + A000073(3) + A000073(5) = 5, prime;
a(3) = 0+1+4+13 = A000073(1) + A000073(3) + A000073(5) + A000073(7) = 18;
a(4) = 0+1+4+13+44 = A000073(1) + A000073(3) + A000073(5) + A000073(7) + A000073(9) = 62 = 2 * 31, semiprime;
a(5) = 0+1+4+13+44+149 = A000073(1) + A000073(3) + A000073(5) + A000073(7) + A000073(9) + A000073(11) = 211, prime.
		

Crossrefs

Programs

  • Magma
    I:=[0,1,5,18]; [n le 4 select I[n] else 4*Self(n-1) - 2*Self(n-2) -Self(n-4): n in [1..41]]; // G. C. Greubel, Nov 20 2021
    
  • Mathematica
    Accumulate[Take[LinearRecurrence[{1,1,1},{0,1,1},40],{1,-1,2}]] (* or *) LinearRecurrence[{4,-2,0,-1},{0,1,5,18},30] (* Harvey P. Dale, Apr 12 2013 *)
  • Sage
    @CachedFunction
    def T(n): # A000073
        if (n<2): return 0
        elif (n==2): return 1
        else: return T(n-1) +T(n-2) +T(n-3)
    def A113301(n): return sum(T(2*j+1) for j in (0..n))
    [A113301(n) for n in (0..40)] # G. C. Greubel, Nov 20 2021

Formula

a(n) = Sum_{j=0..n} A000073(2*j+1).
a(n) + A113300(n) = A008937(n).
a(n) = 4*a(n-1) - 2*a(n-2) - a(n-4), a(0)=0, a(1)=1, a(2)=5, a(3)=18. - Harvey P. Dale, Apr 12 2013
G.f.: x*(1+x) / ((1-x)*(1-3*x-x^2-x^3)). - Colin Barker, May 06 2013

Extensions

More terms from Colin Barker, May 06 2013

A141579 Numbers k such that the arithmetic mean of the first k tribonacci numbers A000073 is an integer.

Original entry on oeis.org

1, 2, 47, 53, 94, 103, 106, 163, 199, 206, 257, 269, 311, 326, 397, 398, 401, 419, 421, 499, 514, 538, 587, 599, 617, 622, 683, 757, 773, 794, 802, 838, 842, 863, 883, 907, 911, 929, 991, 998, 1021, 1087, 1109, 1123, 1174, 1181, 1198, 1210, 1234, 1237, 1291
Offset: 1

Views

Author

R. J. Mathar, Aug 19 2008

Keywords

Comments

Numbers in this sequence but not in A140973 are 2021 and 2090 (but no others below 8400). - Emeric Deutsch, Aug 19 2008.

Crossrefs

Programs

  • Maple
    A000073 := proc(n) option remember ; if n <= 1 then 0 ; elif n =2 then 1 ; else procname(n-1)+procname(n-2)+procname(n-3) ; fi; end: A008937 := proc(n) option remember ; add(A000073(i),i=0..n+1) ; end: isA := proc(n) if n = 1 then RETURN(true) ; fi; if A008937(n-2) mod n = 0 then true; else false ; fi; end: for n from 1 to 2000 do if isA(n) then printf("%d,",n) ; fi; od ;
  • Mathematica
    Module[{nn=1300,tnos},tnos=LinearRecurrence[{1,1,1},{0,0,1},nn];Position[ Table[Mean[Take[tnos,n]],{n,nn}],?(IntegerQ[#]&)]]//Flatten (* _Harvey P. Dale, Oct 05 2020 *)

Formula

{k: k | A008937(k-2)}.

A189154 Number of n X 2 binary arrays without the pattern 0 0 1 1 diagonally, vertically or horizontally.

Original entry on oeis.org

4, 16, 64, 225, 784, 2704, 9216, 31329, 106276, 360000, 1218816, 4124961, 13957696, 47224384, 159769600, 540516001, 1828588644, 6186137104, 20927672896, 70798034241, 239508444816, 810252019600, 2741064339456, 9272956793409
Offset: 1

Views

Author

R. H. Hardin, Apr 17 2011

Keywords

Comments

Column 2 of A189161.

Examples

			Some solutions for 4 X 2:
  1 0   1 0   0 1   1 1   0 1   1 0   1 1   1 1   0 0   1 1
  1 0   1 1   1 0   0 1   1 1   1 1   0 1   1 0   1 1   0 0
  0 1   1 1   1 1   1 0   1 1   1 1   1 1   0 0   1 0   1 1
  1 0   0 0   0 0   0 0   1 0   0 1   0 0   1 1   0 1   0 0
		

Crossrefs

Formula

a(n) = A008937(n+1)^2.
Empirical: a(n) = 4*a(n-1) - a(n-2) - 14*a(n-4) + 4*a(n-5) + 2*a(n-6) + 8*a(n-7) - a(n-8) - a(n-10).
Empirical g.f.: x*(4 + 4*x^2 - 15*x^3 + 4*x^4 + x^5 + 8*x^6 - x^7 - x^9) / ((1 - x)*(1 + x + x^2 - x^3)*(1 - x - x^2 - x^3)*(1 - 3*x - x^2 - x^3)). - Colin Barker, Feb 28 2018

A260056 Irregular triangle read by rows: coefficients T(n, k) of certain polynomials p(n, x) with exponents in increasing order, n >= 0 and 0 <= k <= 2*n.

Original entry on oeis.org

1, 2, 1, 1, 3, 3, 4, 2, 1, 4, 6, 10, 9, 7, 3, 1, 5, 10, 20, 25, 26, 19, 11, 4, 1, 6, 15, 35, 55, 71, 70, 56, 34, 16, 5, 1, 7, 21, 56, 105, 161, 196, 197, 160, 106, 55, 22, 6, 1, 8, 28, 84, 182, 322, 462, 554, 553, 463, 321, 183, 83, 29, 7, 1, 9, 36, 120, 294, 588, 966, 1338, 1569, 1570, 1337, 967, 587, 295, 119, 37, 8, 1, 10, 45, 165, 450, 1002, 1848, 2892, 3873, 4477, 4476, 3874
Offset: 0

Views

Author

Werner Schulte, Nov 08 2015

Keywords

Comments

The triangle is related to the triangle of trinomial coefficients.

Examples

			The irregular triangle T(n,k) begins:
n\k:  0   1   2    3    4    5    6    7    8    9   10  11  12  13  14  ...
0     1;
1     2   1   1;
2     3   3   4    2    1;
3     4   6  10    9    7    3    1;
4     5  10  20   25   26   19   11    4    1;
5     6  15  35   55   71   70   56   34   16    5    1;
6     7  21  56  105  161  196  197  160  106   55   22   6   1;
7     8  28  84  182  322  462  554  553  463  321  183  83  29   7   1;
etc.
The polynomial corresponding to row 2 is p(2,x) = 3+3*x+4*x^2+2*x^3+x^4.
		

Crossrefs

Cf. A000027 (col 0), A000217 (col 1), A000292 (col 2), A001590, A002426, A004524, A005582 (col 3), A008937, A027907, A095662 (col 5), A113682, A246437.

Programs

  • Mathematica
    A027907[n_, k_] := Sum[Binomial[n, j]*Binomial[j, k - j], {j, 0, n}]; Table[ Sum[A027907[j, k], {j, 0, n}], {n,0,10}, {k, 0, 2*n} ] // Flatten (* G. C. Greubel, Mar 07 2017 *)

Formula

T(n,0) = n+1, and T(n,k) = 0 for k < 0 or k > 2*n, and T(n+1,k) = T(n,k) + T(n,k-1) + T(n,k-2) for k > 0.
T(n,k) = Sum_{j=0..n} A027907(j,k) for 0 <= k <= 2*n.
T(n,k) = Sum_{j=0..k} (-1)^(k-j)*A027907(n+1,j+1) for 0 <= k <= 2*n.
T(n,k) = T(n,2*n-1-k) + (-1)^k for 0 <= k < 2*n.
p(n,x) = Sum_{k=0..2*n} T(n,k)*x^k = Sum_{k=0..n} (1+x+x^2)^k for n >= 0.
p(n,x) = ((1+x+x^2)^(n+1)-1)/(x+x^2), p(n,0) = p(n,-1) = n+1 for n >= 0.
p(n+1,x) = (1+x+x^2)*p(n,x)+1 for n >= 0.
Sum_{n>=0} p(n,x)*t^n = 1/((1-t)*(1-t*(1+x+x^2))).
T(n,2*n) = 1, and T(n,n) = A113682(n) for n >= 0.
T(n,n-1) = A246437(n+1), and T(n,n-1)+T(n,n) = A002426(n+1) for n > 0.
If d(n) is n-th antidiagonal sum of the triangle then: d(n) = A008937(n+1), and d(n+2)-d(n) = A001590(n+5) for n >= 0.
Conjecture: If a(n) is n-th antidiagonal alternating sum of the triangle then: a(n) = A004524(n+3).
Sum_{k=0..2*n} (-1)^k*T(n,k)^2 = (3^(n+1)-1)/2 for n >= 0.
Sum_{k=0..2*n} (-1)^k*(y*k+1)*T(n,k) = Sum{k=0..n} y*k+1 = (n+1)*(y*n+2)/2 for real y and n >= 0.
Conjecture of linear recurrence for column k: Sum_{m=0..k+2} (-1)^m*T(n+m,k)* binomial(k+2,m) = 0 for k >= 0 and n >= 0.

A317506 Triangle read by rows: T(0,0) = 1; T(n,k) = 2 T(n-1,k) - T(n-4,k-1) for 0 <= k <= floor(n/4); T(n,k)=0 for n or k < 0.

Original entry on oeis.org

1, 2, 4, 8, 16, -1, 32, -4, 64, -12, 128, -32, 256, -80, 1, 512, -192, 6, 1024, -448, 24, 2048, -1024, 80, 4096, -2304, 240, -1, 8192, -5120, 672, -8, 16384, -11264, 1792, -40, 32768, -24576, 4608, -160, 65536, -53248, 11520, -560, 1, 131072, -114688, 28160, -1792, 10
Offset: 0

Views

Author

Shara Lalo, Aug 31 2018

Keywords

Comments

The numbers in rows of the triangle are along "third layer" skew diagonals pointing top-right in center-justified triangle given in A065109 ((2-x)^n) and along "third layer" skew diagonals pointing top-left in center-justified triangle given in A303872 ((-1+2x)^n), see links. (Note: First layer skew diagonals in center-justified triangles of coefficients in expansions of (2-x)^n and (-1+2x)^n are given in A133156 (coefficients of Chebyshev polynomials of the second kind) and A305098 respectively.) The coefficients in the expansion of 1/(1-2x+x^4) are given by the sequence generated by the row sums. The row sums give A008937. If s(n) is the row sum at n, then the ratio s(n)/s(n-1) is approximately 1.83928675521416113... (A058265: Decimal expansion of the tribonacci constant t, the real root of x^3-x^2-x-1), when n approaches infinity.

Examples

			Triangle begins:
       1;
       2;
       4;
       8;
      16,      -1;
      32,      -4;
      64,     -12;
     128,     -32;
     256,     -80,     1;
     512,    -192,     6;
    1024,    -448,    24;
    2048,   -1024,    80;
    4096,   -2304,   240,    -1;
    8192,   -5120,   672,    -8;
   16384,  -11264,  1792,   -40;
   32768,  -24576,  4608,  -160;
   65536,  -53248, 11520,  -560,  1;
  131072, -114688, 28160, -1792, 10;
  262144, -245760, 67584, -5376, 60;
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3.

Crossrefs

Row sums give A008937.
Cf. A058265.

Programs

  • Mathematica
    t[n_, k_] := t[n, k] = 2^(n - 4 k) * (-1)^k/((n - 4 k)! k!) * (n - 3 k)!; Table[t[n, k], {n, 0, 16}, {k, 0, Floor[n/4]} ]  // Flatten
    t[0, 0] = 1; t[n_, k_] := t[n, k] = If[n < 0 || k < 0, 0, 2 * t[n - 1, k] - t[n - 4, k - 1]]; Table[t[n, k], {n, 0, 16}, {k, 0, Floor[n/4]}] // Flatten

Formula

T(n,k) = 2^(n - 4*k) * (-1)^k / ((n - 4*k)! k!) * (n - 3*k)! where n >= 0 and 0 <= k <= floor(n/4).
Previous Showing 21-30 of 35 results. Next