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 58 results. Next

A106805 Expansion of g.f.: 1/(1 - 2*x - x^2 + x^3).

Original entry on oeis.org

1, 2, 5, 11, 25, 56, 126, 283, 636, 1429, 3211, 7215, 16212, 36428, 81853, 183922, 413269, 928607, 2086561, 4688460, 10534874, 23671647, 53189708, 119516189, 268550439, 603427359, 1355888968, 3046654856, 6845771321, 15382308530, 34563733525, 77664004259
Offset: 0

Views

Author

Roger L. Bagula, May 17 2005

Keywords

Comments

Essentially the same as A006054. - Joerg Arndt, Nov 08 2022

Crossrefs

A006054 shifted left twice.

Programs

  • Magma
    I:=[1,2,5]; [n le 3 select I[n] else 2*Self(n-1) +Self(n-2) -Self(n-3): n in [1..36]]; // G. C. Greubel, Sep 11 2021
    
  • Mathematica
    LinearRecurrence[{2,1,-1}, {1,2,5}, 35] (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)
  • PARI
    Vec( 1/(1-2*x-x^2+x^3) + O(x^66) )  /* Joerg Arndt, Sep 30 2012 */
    
  • Sage
    def A106805_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1-2*x-x^2+x^3) ).list()
    A106805_list(35) # G. C. Greubel, Sep 11 2021

Formula

G.f. for sequence with 1 prepended: 1/( 1 - Sum_{k>=0} x*(x+x^2-x^3)^k ). - Joerg Arndt, Sep 30 2012

Extensions

Edited by the Associate Editors of the OEIS, Apr 09 2009
Name corrected by Joerg Arndt, Sep 30 2012

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

Original entry on oeis.org

0, 1, 0, 2, 1, 3, 4, 5, 10, 11, 21, 27, 43, 64, 92, 144, 205, 316, 462, 693, 1035, 1532, 2301, 3406, 5099, 7581, 11303, 16855, 25088, 37432, 55728, 83097, 123800, 184490, 274969, 409683, 610628, 909845, 1355970, 2020635, 3011157, 4487395, 6686979
Offset: 0

Views

Author

Roger L. Bagula, Sep 16 2006

Keywords

Comments

a(n) is the number of compositions of n+2 such that: i) the first part is odd, ii) the last part is even, and iii) no two consecutive parts have the same parity. - Geoffrey Critzer, Mar 04 2012

Examples

			a(7) = 5 because there are 5 such compositions of the integer 9: 1+8, 7+2, 3+6, 5+4, 1+2+1+2+1+2. - _Geoffrey Critzer_, Mar 04 2012
		

Crossrefs

Programs

  • Mathematica
    nn = 44; a = x/(1 - x^2); b = x^2/(1 - x^2); Drop[ CoefficientList[Series[1/(1 - a b), {x, 0, nn}], x], 2] (* Geoffrey Critzer, Mar 04 2012 *)
    CoefficientList[Series[x/(1-2x^2-x^3+x^4),{x,0,50}],x] (* Harvey P. Dale, Jul 17 2019 *)

A181336 Triangle read by rows: T(n,k) is the number of 2-compositions of n having k even entries in the top row. A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n.

Original entry on oeis.org

1, 1, 1, 2, 4, 1, 5, 11, 7, 1, 11, 31, 29, 10, 1, 25, 83, 102, 56, 13, 1, 56, 217, 329, 245, 92, 16, 1, 126, 556, 1000, 938, 487, 137, 19, 1, 283, 1403, 2917, 3292, 2180, 855, 191, 22, 1, 636, 3498, 8247, 10865, 8740, 4406, 1376, 254, 25, 1, 1429, 8636, 22756, 34248
Offset: 0

Views

Author

Emeric Deutsch, Oct 14 2010

Keywords

Comments

The sum of entries in row n is A003480(n).
T(n,0)=A006054(n+1) (n>=1).
Sum(k*T(n,k), k>=0)=A181337(n).
For the statistic "number of odd entries in the top row" see A181304.

Examples

			T(2,1)=4 because we have (0/2), (2/0), (1,0/0,1), and (0,1/1,0) (the 2-compositions are written as (top row / bottom row)).
Triangle starts:
1;
1,1;
2,4,1;
5,11,7,1;
11,31,29,10,1;
25,83,102,56,13,1;
		

References

  • G. Castiglione, A. Frosini, E. Munarini, A. Restivo and S. Rinaldi, Combinatorial aspects of L-convex polyominoes, European Journal of Combinatorics, 28, 2007, 1724-1741.

Crossrefs

Programs

  • Maple
    G := (1+z)*(1-z)^2/(1-2*z-z^2+z^3-s*z*(1+z-z^2)): Gser := simplify(series(G, z = 0, 13)): for n from 0 to 10 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 10 do seq(coeff(P[n], s, k), k = 0 .. n) end do; # yields sequence in triangular form

Formula

G.f.=G(s,z)=(1+z)(1-z)^2/[1-2z-z^2+z^3-sz(1+z-z^2)].
The g.f. of column k is z^k*(1+z)(1-z)^2*(1+z-z^2)^k/(1-2z-z^2+z^3)^{k+1} (we have a Riordan array).
The g.f. H=H(t,s,z), where z marks size and t (s) marks odd (even) entries in the top row, is given by H = (1+z)(1-z)^2/[(1+z)(1-z)^2-(t+s)z-sz^2*(1-z)].

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

Original entry on oeis.org

0, 0, 1, 4, 14, 42, 119, 322, 847, 2180, 5521, 13804, 34160, 83818, 204204, 494494, 1191227, 2856666, 6823334, 16240714, 38534657, 91175154, 215179125, 506670394, 1190534467, 2792076392, 6536567296, 15278103876, 35656587624, 83101366684
Offset: 0

Views

Author

L. Edson Jeffery, Apr 22 2011

Keywords

Comments

Convolution of A006054={0,0,1,2,5,11,25,56,126,...} with itself.
For n=0,1,2,..., partial sums are given by Sum_{k=0..n} a(k)=A189427(n), where A189427={0,0,1,5,19,61,180,...}.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^2/(1-2x-x^2+x^3)^2,{x,0,40}],x] (* or *) LinearRecurrence[{4,-2,-6,3,2,-1},{0,0,1,4,14,42},40] (* Harvey P. Dale, Feb 29 2012 *)
  • PARI
    Vec((x^2)/(1-2*x-x^2+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012

Formula

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

A052658 Expansion of e.g.f. (1-x^2)*(1-x)/(1-2x-x^2+x^3).

Original entry on oeis.org

1, 1, 4, 30, 264, 3000, 40320, 635040, 11410560, 230791680, 5185555200, 128172844800, 3455996544000, 100952461209600, 3175730791833600, 107037070043904000, 3848161361780736000, 146994587721805824000
Offset: 0

Views

Author

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

Keywords

Programs

  • Maple
    spec := [S,{S=Sequence(Prod(Z,Sequence(Z),Sequence(Prod(Z,Z))))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    With[{nn=20},CoefficientList[Series[((1-x^2)(1-x))/(1-2x-x^2+x^3),{x,0,nn}], x]Range[0,nn]!] (* Harvey P. Dale, May 16 2012 *)

Formula

E.g.f.: (-1+x^2)*(-1+x)/(x^3-x^2-2*x+1)
Recurrence: {a(1)=1, a(0)=1, a(2)=4, (n^3+6*n^2+11*n+6)*a(n)+(-n^2-5*n-6)*a(n+1)+(-2*n-6)*a(n+2)+a(n+3)=0, a(3)=30}
a(n) = Sum(-1/7*(_alpha+_alpha^2-2)*_alpha^(-1-n), _alpha=RootOf(_Z^3-_Z^2-2*_Z+1))*n!.
a(n) = n!*A006054(n+1),n>0. - R. J. Mathar, Jun 03 2022

A091594 Triangle read by rows: T(n,m) := Sum_{k=0..floor((n-m)/2)} binomial(n-2k,m) * binomial(n-m-k,k).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 4, 3, 1, 5, 8, 7, 4, 1, 8, 15, 16, 11, 5, 1, 13, 28, 34, 28, 16, 6, 1, 21, 51, 70, 66, 45, 22, 7, 1, 34, 92, 140, 148, 116, 68, 29, 8, 1, 55, 164, 274, 320, 281, 190, 98, 37, 9, 1, 89, 290, 527, 672, 651, 494, 295, 136, 46, 10, 1, 144, 509, 999, 1379, 1456, 1219, 819, 439, 183, 56, 11, 1
Offset: 0

Views

Author

Paul Barry, Jan 23 2004

Keywords

Comments

A Fibonacci related number triangle.

Examples

			Rows begin:
   1,
   1,  1,
   2,  2,  1,
   3,  4,  3,  1,
   5,  8,  7,  4,  1,
   8, 15, 16, 11,  5,  1,
  13, 28, 34, 28, 16,  6, 1,
  21, 51, 70, 66, 45, 22, 7, 1,
  ...
		

Crossrefs

Columns include A000045, A029907, A054455. Row sums are A006054.

Formula

k-th column has g.f. 1/(1-x-x^2) * ( x*(1-x^2)/(1-x-x^2) )^k.

A095310 a(n+3) = 2*a(n+2) + 3*(n+1) - a(n).

Original entry on oeis.org

1, 5, 12, 38, 107, 316, 915, 2671, 7771, 22640, 65922, 191993, 559112, 1628281, 4741905, 13809541, 40216516, 117119750, 341079507, 993301748, 2892722267, 8424270271, 24533405595, 71446899736, 208069745986, 605946785585
Offset: 1

Views

Author

Gary W. Adamson, Jun 02 2004

Keywords

Comments

Let M = the 3 X 3 matrix [1 1 1 / 3 1 0 / 1 0 0], then M^n * [1 0 0] = [a(n) q a(n-1)] where q is another sequence with the same recursion rule.

Examples

			a(6) = 316 = 2*107 + 3*38 - 12.
a(5) = 107 since M^5 * [1 0 0] = [107 q 38].
		

Crossrefs

Programs

  • Mathematica
    a[n_] := (MatrixPower[{{1, 1, 1}, {3, 1, 0}, {1, 0, 0}}, n].{{1}, {0}, {0}})[[1, 1]]; Table[ a[n], {n, 27}] (* Robert G. Wilson v, Jun 05 2004 *)
    LinearRecurrence[{2,3,-1},{1,5,12},30] (* Harvey P. Dale, Jan 25 2014 *)

Formula

G.f.: (-x^2+3*x+1)/(x^3-3*x^2-2*x+1). - Harvey P. Dale, Jan 25 2014

Extensions

Corrected and extended by Robert G. Wilson v, Jun 05 2004
Edited by N. J. A. Sloane, Jun 07 2004

A179542 Trajectory of 1 under the morphism 1->(1,2,3), 2->(1,2), 3->(1) related to the heptagon and A006356.

Original entry on oeis.org

1, 1, 2, 3, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 1, 2
Offset: 0

Views

Author

Gary W. Adamson, Jul 18 2010

Keywords

Comments

Given M = the generating matrix for the heptagon shown in A006356:
[1,1,1; 1,1,0; 1,0,0] take powers of M, extracting top row getting:
(1,1,1), (3,2,1), (6,5,3), (14,11,6), where left and right columns (offset) =
A006356, and middle column = A006054. n-th iterate of the sequence is
composed of A006356(n) terms parsed into a frequency of 1's, 2's, and 3's
matching the 3-termed vectors with appropriate sums.

Examples

			Starting with 1, the next two iterates are:
(1, 2, 3) -> (1, 2, 3, 1, 2, 1) -> (1, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 2, 3).
The 3rd iterate has 14 terms composed of six 1's, five 2's, and three 3's; matching the top row of M^3 = (6, 5, 3), sum = 14 = A006356(3).
		

Crossrefs

Programs

  • Mathematica
    NestList[ Flatten[ # /. {1 -> {1, 2, 3}, 2 -> {1, 2}, 3 -> 1}] &, {1}, 5] // Flatten (* Robert G. Wilson v, Jul 23 2010 *)

Extensions

More terms from Robert G. Wilson v, Jul 23 2010

A215139 a(n) = (a(n-1) - a(n-3))*7^((1+(-1)^n)/2) with a(6)=5, a(7)=4, a(8)=22.

Original entry on oeis.org

5, 4, 22, 17, 91, 69, 364, 273, 1428, 1064, 5537, 4109, 21315, 15778, 81683, 60368, 312130, 230447, 1190553, 878423, 4535832, 3345279, 17267992, 12732160, 65708167, 48440175, 249956105, 184247938, 950654341, 700698236, 3615152086, 2664497745, 13746596563, 10131444477
Offset: 6

Views

Author

Roman Witula, Aug 04 2012

Keywords

Comments

The Ramanujan-type sequence the number 9 for the argument 2*Pi/7. The sequence is connecting with the following decomposition: (s(4)/s(1))^(1/3)*s(1)^n + (s(1)/s(2))^(1/3)*s(2)^n + (s(2)/s(4))^(1/3)*s(4)^n = x(n)*(4-3*7^(1/3))^(1/3) + y(n)*(11-3*49^(1/3))^(1/3), where s(j) := sin(2*Pi*j/7), x(0)=1, x(1)=-7^(1/6)/2, x(2)=y(0)=y(1)=0, y(2)=7^(1/3)/4 and X(n)=sqrt(7)*(X(n-1)-X(n-3)) for every n=3,4,..., and X=x or X=y. It could be deduced the formula 4*y(n) = a(n)*7^(1/3 + (3+(-1)^n)/4), which implies a(0)=0, a(1)= 0, a(2)= 1/7, a(3)=1/7, a(4)=1, a(5)=6/7, i.e., A163260(n)=7*a(n) for every n=0,1,...,5. The sequence a(n) is discussed in third Witula paper.

Examples

			From values of x(2),y(2) and the identity 2*sin(t)^2=1-cos(2*t) we obtain (s(4)/s(1))^(1/3)*c(1) + (s(1)/s(2))^(1/3)*c(4) + (s(2)/s(4))^(1/3)*c(1) = (4-3*7^(1/3))^(1/3) - (1/2)*(7*(11-3*49^(1/3)))^(1/3), where c(j):=cos(2*Pi*j/7). Further, from values of x(1),x(3),y(1),y(3) and the identity 4*sin(t)^3=3*sin(t)-sin(3*t) we obtain (s(4)/s(1))^(1/3)*s(4) + (s(1)/s(2))^(1/3)*s(1) + (s(2)/s(4))^(1/3)*s(2) = (-3*7^(1/6)/2 +4*7^(1/2))*(4-3*7^(1/3))^(1/3) - 7^(5/6)*(11-3*49^(1/3))^(1/3).
		

References

  • R. Witula, E. Hetmaniok and D. Slota, Sums of the powers of any order roots taken from the roots of a given polynomial, Proceedings of the Fifteenth International Conference on Fibonacci Numbers and Their Applications, Eger, Hungary, 2012.

Crossrefs

Programs

  • Magma
    I:=[5,4,22,17,91,69]; [n le 6 select I[n] else 7*Self(n-2) - 14*Self(n-4) + 7*Self(n-6): n in [1..30]]; // G. C. Greubel, Apr 19 2018
  • Mathematica
    LinearRecurrence[{0,7,0,-14,0,7}, {5,4,22,17,91,69}, {1,50}] (* G. C. Greubel, Apr 19 2018 *)
  • PARI
    Vec(-x*(1+x)*(6*x^4+x^3-12*x^2-x+5)/(-1+7*x^2-14*x^4+7*x^6) + O(x^50)) \\ Michel Marcus, Apr 20 2016
    

Formula

G.f.: -x*(1+x)*(6*x^4+x^3-12*x^2-x+5) / ( -1+7*x^2-14*x^4+7*x^6 ). - R. J. Mathar, Sep 14 2012

Extensions

More terms from Michel Marcus, Apr 20 2016

A219788 Consider the succession rule (x, y, z) -> (z, y+z, x+y+z). Sequence gives z values starting at (0, 1, 2).

Original entry on oeis.org

2, 3, 8, 17, 39, 87, 196, 440, 989, 2222, 4993, 11219, 25209, 56644, 127278, 285991, 642616, 1443945, 3244515, 7290359, 16381288, 36808420, 82707769, 185842670, 417584689, 938304279, 2108350577, 4737420744, 10644887786, 23918845739, 53745158520, 120764274993
Offset: 1

Views

Author

Andrew Pharo, Nov 27 2012

Keywords

Comments

The rule can be generalized for any number of starting terms s: (xs, ..., x2, x1) -> (x1, x1 + x2, ..., x1 + x2 + ... + xs), using (0, 1, ..., s-1) as seed values. This sequence is s=3, and s=2 yields the Fibonacci series.
For s=3 the ratio of S1 (the first in the sub-series) to S3 (the 3rd in the sub-series) converges on 2.2469796 and the ration of S2 (the 2nd in the sub-series) to S3 converges on 1.2469796 thus the difference, S2-S3, converges on 1 regardless of the seed values used.
For s=20 the series is: 19, 190, 2660, 33915, 445949, ....
a(n-2) is the top left entry of the n-th power of the 3 X 3 matrix [0, 1, 1; 1, 1, 1; 1, 0, 1] or of the 3 X 3 matrix [0, 1, 1; 1, 1, 0; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
From Andrew Pharo, Jun 02 2014: (Start)
For s=2 the ratio of successive terms is 1.6180339887... or phi (or phi(2));
for s=3 this ratio is 2.24697960412319..., phi(3) = 4*cos(Pi/7)^2-1 (see Falbo link);
for s=4 this ratio is 3.5133370918694...;
for s=20 this ratio is 13.0538985560545... and so on.
We can define a function phi(s) which approximates to:
phi(s) ~ phi(2) + theta*(s-2) where theta ~ 0.636264133.
(End)

Examples

			The seed values are (0,1,2), giving a(1) = 2. (2, 2+1, 2+1+0) is the next triple, giving a(2) = 2+1+0 = 3. (3, 6, 8) is next, yielding a(3) = 8. The triples that follow begin (8,14,17), (17,31,39), etc.
		

Programs

  • Mathematica
    Rest@ CoefficientList[Series[-x (-2 + x)/(1 - 2 x - x^2 + x^3), {x, 0, 32}], x] (* Michael De Vlieger, Jun 17 2020 *)
    sr[{x_,y_,z_}]:={z,y+z,x+y+z}; NestList[sr,{0,1,2},40][[All,3]] (* Harvey P. Dale, Aug 18 2020 *)
  • PARI
    first(n)=my(x=0,y=1,z=2,v=List([z])); for(i=2, n, [x,y,z]=[z, y+z, x+y+z]; listput(v,c)); Vec(v) \\ Charles R Greathouse IV, Nov 28 2012

Formula

a(n) = 2a(n-1) + a(n-2) - a(n-3). - Charles R Greathouse IV, Nov 28 2012
The essentially identical sequence 1,0,2,3,8,17,39,... with offset 0 is defined by a(n) = 2a(n-1) + a(n-2) - a(n-3) with initial terms a(0)=1, a(1)=0, a(2)=2. - N. J. A. Sloane, Jan 16 2017
G.f.: -x*(-2+x) / ( 1-2*x-x^2+x^3 ). - R. J. Mathar, Feb 03 2014
a(n) = 2*A006054(n+1)-A006054(n). - R. J. Mathar, Aug 22 2016
Previous Showing 41-50 of 58 results. Next