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

A069009 Let M denote the 6 X 6 matrix with rows / 1,1,1,1,1,1 / 1,1,1,1,1,0 / 1,1,1,1,0,0 / 1,1,1,0,0,0 / 1,1,0,0,0,0 / 1,0,0,0,0,0 / and A(n) the vector (x(n),y(n),z(n),t(n),u(n),v(n)) = M^n*A where A is the vector (1,1,1,1,1,1); then a(n) = t(n).

Original entry on oeis.org

1, 3, 15, 59, 250, 1030, 4283, 17752, 73658, 305513, 1267344, 5257031, 21806850, 90457205, 375227042, 1556484658, 6456477531, 26782210229, 111095686086, 460837670465, 1911607611040, 7929568022610, 32892759309540
Offset: 0

Views

Author

Benoit Cloitre, Apr 02 2002

Keywords

Comments

This sequence is related to the tridecagon or triskaidecagon (13-gon).
The lengths of the diagonals of the regular tridecagon are r[k] = sin(k*Pi/13)/sin(Pi/13), 1 <= k <= 6, where r[1] = 1 is the length of the edge.

Crossrefs

Cf. A066170.
Cf. A006359, A069007, A069008, A069009, A070778, A006359 (offset), for x(n), y(n), z(n), t(n), u(n), v(n).
Cf. A120747 (m = 5: hendecagon or 11-gon)

Programs

  • Maple
    nmax:=22: with(LinearAlgebra): M:=Matrix([[1,1,1,1,1,1], [1,1,1,1,1,0], [1,1,1,1,0,0], [1,1,1,0,0,0], [1,1,0,0,0,0], [1,0,0,0,0,0]]): v:= Vector[row]([1,1,1,1,1,1]): for n from 0 to nmax do b:=evalm(v&*M^n); a(n):=b[4] od: seq(a(n), n=0..nmax); # Johannes W. Meijer, Aug 03 2011
    nmax:=24: m:=6: for k from 1 to m-1 do T(1,k):=0 od: T(1,m):=1: for n from 2 to nmax do for k from 1 to m do T(n,k):= add(T(n-1,k1), k1=m-k+1..m) od: od: for n from 1 to nmax/3 do seq(T(n,k), k=1..m) od; for n from 2 to nmax do a(n-2):=T(n,3) od: seq(a(n), n=0..nmax-2); # Johannes W. Meijer, Aug 03 2011
  • Mathematica
    b = {1, -3, -6, 4, 5, -1, -1}; p[x_] := Sum[x^(n - 1)*b[[8 - n]], {n, 1, 7}] q[x_] := ExpandAll[x^6*p[1/x]] Table[ SeriesCoefficient[ Series[x/q[x], {x, 0, 30}], n], {n, 0, 30}] (* Roger L. Bagula and Gary W. Adamson, Sep 19 2006 *)
    CoefficientList[Series[1/(1 - 3 x - 6 x^2 + 4 x^3 + 5 x^4 - x^5 - x^6), {x, 0, 33}], x] (* Vincenzo Librandi, Sep 19 2015 *)
  • PARI
    Vec(1/(1-3*x-6*x^2+4*x^3+5*x^4-x^5-x^6)+O(x^33)) \\ Joerg Arndt, Sep 19 2015

Formula

G.f.: 1/(1-3*x-6*x^2+4*x^3+5*x^4-x^5-x^6). - Roger L. Bagula and Gary W. Adamson, Sep 19 2006
a(n-2) = T(n,3) with T(n,k) = sum(T(n-1,k1), k1=7-k..6), T(1,1) = T(1,2) = T(1,3) = T(1,4) = T(1,5) = 0 and T(1,6) = 1, n>=1 and 1 <= k <= 6. [Steinbach]
sum(T(n,k)*r[k], k=1..6) = r[6]^n, n>=1, with r[k] = sin(k*Pi/13)/sin(Pi/13). [Steinbach]

Extensions

Edited by Henry Bottomley, May 06 2002
Information added by Johannes W. Meijer, Aug 03 2011

A030111 Triangular array in which k-th entry in n-th row is C([ (n+k)/2 ],k) (1<=k<=n).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 3, 3, 4, 1, 1, 3, 6, 4, 5, 1, 1, 4, 6, 10, 5, 6, 1, 1, 4, 10, 10, 15, 6, 7, 1, 1, 5, 10, 20, 15, 21, 7, 8, 1, 1, 5, 15, 20, 35, 21, 28, 8, 9, 1, 1, 6, 15, 35, 35, 56, 28, 36, 9, 10, 1, 1, 6, 21, 35, 70, 56, 84, 36, 45, 10, 11, 1, 1, 7, 21, 56, 70, 126, 84, 120, 45, 55, 11, 12, 1
Offset: 1

Views

Author

Jacques Haubrich (jhaubrich(AT)freeler.nl)

Keywords

Comments

Same as A046854, but missing the initial column of ones.
Riordan array (1/((1-x)(1-x^2)),x/(1-x^2)). Diagonal sums are A052551. - Paul Barry, Sep 30 2006

Examples

			1;
1 1;
2 1 1;
2 3 1 1;
3 3 4 1 1;
3 6 4 5 1 1;
...
		

Crossrefs

Cf. A066170.

Programs

  • Mathematica
    Flatten[Table[Binomial[Floor[(n+k)/2],k],{n,20},{k,n}]] (* Harvey P. Dale, Jun 03 2014 *)
  • PARI
    {T(n, k) = binomial((n+k)\2, k)}; /* Michael Somos, Jul 23 1999 */
    
  • PARI
    printp(matrix(8,8,n,k,binomial((n+k)\2,k)))
    
  • PARI
    for(n=1,7, for(k=1,n,print1(binomial((n+k)\2,k)); if(k==n,print1("; ")); print1(" ")))

Formula

G.f.: 1 / (1 - x - xy - x^2 + x^2y + x^3). - Ralf Stephan, Feb 13 2005
Sum(k=1, n, T(n, k)) = F(n+2)-1 where F(n) is the n-th Fibonacci number. - Benoit Cloitre, Oct 07 2002

Extensions

Description corrected by Michael Somos, Jul 23 1999
Corrected and extended by Harvey P. Dale, Jun 03 2014

A120747 Sequence relating to the 11-gon (or hendecagon).

Original entry on oeis.org

0, 1, 4, 14, 50, 175, 616, 2163, 7601, 26703, 93819, 329615, 1158052, 4068623, 14294449, 50221212, 176444054, 619907431, 2177943781, 7651850657, 26883530748, 94450905714, 331837870408, 1165858298498, 4096053203771, 14390815650209, 50559786403254
Offset: 1

Views

Author

Gary W. Adamson, Jul 01 2006

Keywords

Comments

The hendecagon is an 11-sided polygon. The preferred word in the OEIS is 11-gon.
The lengths of the diagonals of the regular 11-gon are r[k] = sin(k*Pi/11)/sin(Pi/11), 1 <= k <= 5, where r[1] = 1 is the length of the edge.
The value of limit(a(n)/a(n-1),n=infinity) equals the longest diagonal r[5].
The a(n) equal the matrix elements M^n[1,2], where M = Matrix([[1,1,1,1,1], [1,1,1,1,0], [1,1,1,0,0], [1,1,0,0,0], [1,0,0,0,0]]). The characteristic polynomial of M is (x^5 - 3x^4 - 3x^3 + 4x^2 + x - 1) with roots x1 = -r[4]/r[3], x2 = -r[2]/r[4], x3 = r[1]/r[2], x4 = r[3]/r[5] and x5 = r[5]/r[1].
Note that M^4*[1,0,0,0,0] = [55, 50, 41, 29, 15] which are all terms of the 5-wave sequence A038201. This is also the case for the terms of M^n*[1,0,0,0,0], n>=1.

Examples

			From _Johannes W. Meijer_, Aug 03 2011: (Start)
The lengths of the regular hendecagon edge and diagonals are:
  r[1] = 1.000000000, r[2] = 1.918985948, r[3] = 2.682507066,
  r[4] = 3.228707416, r[5] = 3.513337092.
The first few rows of the T(n,k) array are, n>=1, 1 <= k <=5:
    0,   0,   0,   0,   1, ...
    1,   1,   1,   1,   1, ...
    1,   2,   3,   4,   5, ...
    5,   9,  12,  14,  15, ...
   15,  29,  41,  50,  55, ...
   55, 105, 146, 175, 190, ...
  190, 365, 511, 616, 671, ... (End)
		

Crossrefs

From Johannes W. Meijer, Aug 03 2011: (Start)
Cf. A006358 (T(n+2,1) and T(n+1,5)), A069006 (T(n+1,2)), A038342 (T(n+1,3)), this sequence (T(n,4)) (m=5: hendecagon or 11-gon).
Cf. A000045 (m=2; pentagon or 5-gon); A006356, A006054 and A038196 (m=3: heptagon or 7-gon); A006357, A076264, A091024 and A038197 (m=4: enneagon or 9-gon); A006359, A069007, A069008, A069009, A070778 (m=6; tridecagon or 13-gon); A025030 (m=7: pentadecagon or 15-gon); A030112 (m=8: heptadecagon or 17-gon). (End)

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); [0] cat Coefficients(R!( x^2*(1+x-x^2)/(1-3*x-3*x^2+4*x^3+x^4-x^5) )); // G. C. Greubel, Nov 13 2022
    
  • Maple
    nmax:=27: m:=5: for k from 1 to m-1 do T(1,k):=0 od: T(1,m):=1: for n from 2 to nmax do for k from 1 to m do T(n,k):= add(T(n-1,k1), k1=m-k+1..m) od: od: for n from 1 to nmax/3 do seq(T(n,k), k=1..m) od; for n from 1 to nmax do a(n):=T(n,4) od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Aug 03 2011
  • Mathematica
    LinearRecurrence[{3, 3, -4, -1, 1}, {0, 1, 4, 14, 50}, 41] (* G. C. Greubel, Nov 13 2022 *)
  • SageMath
    def A120747_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+x-x^2)/(1-3*x-3*x^2+4*x^3+x^4-x^5) ).list()
    A120747_list(40) # G. C. Greubel, Nov 13 2022

Formula

a(n) = 3*a(n-1) + 3*a(n-2) - 4*a(n-3) - a(n-4) + a(n-5).
G.f.: x^2*(1+x-x^2)/(1-3*x-3*x^2+4*x^3+x^4-x^5). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 12 2009
From Johannes W. Meijer, Aug 03 2011: (Start)
a(n) = T(n,4) with T(n,k) = Sum_{k1 = 6-k..6} T(n-1, k1), T(1,1) = T(1,2) = T(1,3) = T(1,4) = 0 and T(1,5) = 1, n>=1 and 1 <= k <= 5. [Steinbach]
Sum_{k=1..5} T(n,k)*r[k] = r[5]^n, n>=1. [Steinbach]
r[k] = sin(k*Pi/11)/sin(Pi/11), 1 <= k <= 5. [Kappraff]
Sum_{k=1..5} T(n,k) = A006358(n-1).
Limit_{n -> 00} T(n,k)/T(n-1,k) = r[5], 1 <= k <= 5.
sequence(sequence( T(n,k), k=2..5), n>=1) = A038201(n-4).
G.f.: (x^2*(x - x1)*(x - x2))/((x - x3)*(x - x4)*(x - x5)*(x - x6)*(x - x7)) with x1 = phi, x2 = (1-phi), x3 = r[1] - r[3], x4 = r[3] - r[5], x5 = r[5] - r[4], x6 = r[4] - r[2], x7 = r[2], where phi = (1 + sqrt(5))/2 is the golden ratio A001622. (End)

Extensions

Edited and information added by Johannes W. Meijer, Aug 03 2011

A122765 Triangle read by rows: Let p(k, x) = x*p(k-1, x) - p(k-2, x). Then T(k,x) = dp(k,x)/dx.

Original entry on oeis.org

1, -1, 2, -2, -2, 3, 2, -6, -3, 4, 3, 6, -12, -4, 5, -3, 12, 12, -20, -5, 6, -4, -12, 30, 20, -30, -6, 7, 4, -20, -30, 60, 30, -42, -7, 8, 5, 20, -60, -60, 105, 42, -56, -8, 9, -5, 30, 60, -140, -105, 168, 56, -72, -9, 10
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 22 2006

Keywords

Comments

Based on the coefficients of derivatives of the polynomials in A130777.

Examples

			Triangle begins as:
   1;
  -1,   2;
  -2,  -2,   3;
   2,  -6,  -3,   4;
   3,   6, -12,  -4,   5;
  -3,  12,  12, -20,  -5,   6;
  -4, -12,  30,  20, -30,  -6,   7;
   4, -20, -30,  60,  30, -42,  -7,   8;
   5,  20, -60, -60, 105,  42, -56,  -8,  9;
		

Crossrefs

Programs

  • Magma
    A122765:= func< n,k | k*(-1)^Binomial(n-k+1, 2)*Binomial(Floor((n+k)/2), k) >;
    [A122765(n,k): k in [1..n], n in [1..14]]; // G. C. Greubel, Dec 30 2022
    
  • Mathematica
    (* First program *)
    p[0,x]=1; p[1,x]=x-1; p[k_,x_]:= p[k, x]= x*p[k-1,x] -p[k-2,x]; a = Table[Expand[p[n, x]], {n, 0, 10}]; Table[CoefficientList[D[a[[n]], x], x], {n, 2, 10}]//Flatten
    (* Second program *)
    T[n_, k_]:= k*(-1)^Binomial[n-k+1,2]*Binomial[Floor[(n+k)/2], k];
    Table[T[n, k], {n,14}, {k,n}]//Flatten (* G. C. Greubel, Dec 30 2022 *)
  • PARI
    tpol(n) = if (n<=0, 1, if (n==1, x-1, x*tpol(n-1) -tpol(n-2)));
    lista(nn) = {for(n=0, nn, pol = deriv(tpol(n)); for (k=0, poldegree(pol), print1(polcoeff(pol, k), ", ");););} \\ Michel Marcus, Feb 07 2014
    
  • SageMath
    def A122765(n, k): return k*(-1)^binomial(n-k+1, 2)*binomial(((n+k)//2), k)
    flatten( [[A122765(n,k) for k in range(1,n+1)] for n in range(1,15)] ) # G. C. Greubel, Dec 30 2022

Formula

From G. C. Greubel, Dec 30 2022: (Start)
T(n, k) = coefficient [x^k]( p(n, x) ), where p(n,x) = (2/(x^2-4))*((n+1)*chebyshev_T(n+1,x/2) -n*chebyshev_T(n,x/2) - (x/2)*(chebyshev_U(n,x/2) - chebyshev_U(n-1,x/2))).
T(n, k) = k*(-1)^binomial(n-k+1, 2)*binomial(floor((n+k)/2), k).
T(n, n) = n.
T(n, n-1) = -(n-1).
T(n, n-2) = -2*A000217(n-2).
T(n, n-3) = 2*A000217(n-3).
T(n, 1) = (-1)^binomial(n, 2)*floor((n+1)/2).
T(n, 2) = 2*(-1)^binomial(n-1, 2)*binomial(floor((n+2)/2), 2).
Sum_{k=1..n} T(n, k) = A076118(n).
Sum_{k=1..n} (-1)^k*T(n, k) = (-1)^(n-1)*A165202(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = [n=1] - [n=2].
Sum_{k=1..floor((n+1)/2)} (-1)^k*T(n-k+1, k) = (-1)^binomial(n+1, 2)*b(n), where b(n) = 4^floor(n/4)*A026741(n/2) if n is even and b(n) = 4^floor((n-1)/4)*A026741((n-1)/4) if n is odd. (End)

Extensions

Name corrected and more terms from Michel Marcus, Feb 07 2014

A052963 a(0)=1, a(1)=2, a(2)=5, a(n) = 3*a(n+2) - a(n+3).

Original entry on oeis.org

1, 2, 5, 14, 40, 115, 331, 953, 2744, 7901, 22750, 65506, 188617, 543101, 1563797, 4502774, 12965221, 37331866, 107492824, 309513251, 891207887, 2566130837, 7388879260, 21275429893, 61260158842, 176391597266, 507899361905
Offset: 0

Views

Author

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

Keywords

Comments

Equals the INVERT transform of the Pell sequence prefaced with a "1": (1, 1, 2, 5, 12, 29, ...). - Gary W. Adamson, May 01 2009

Crossrefs

Programs

  • Maple
    spec := [S,{S=Sequence(Union(Prod(Sequence(Union(Prod(Z,Z),Z)),Z),Z))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
  • Mathematica
    LinearRecurrence[{3,0,-1},{1,2,5},30] (* Harvey P. Dale, Dec 26 2015 *)

Formula

G.f.: -(-1+x+x^2)/(1-3*x+x^3).
a(n) = Sum((1/9)*(1+2*_alpha+_alpha^2)*_alpha^(-1-n), _alpha=RootOf(1-3*_Z+_Z^3)). [in Maple notation]
a(n)/a(n-1) tends to 2.8793852... = 1/(2*cos(4*Pi/9)), a root of x^3 -3x^2 + 1 (the characteristic polynomial of the 3 X 3 matrix). The latter polynomial is a factor (with (x + 1)) of the 4th degree polynomial of A066170: x^4 - 2x^3 - 3x^2 + x + 1. Given the 3 X 3 matrix [0 1 0 / 0 0 1 / -1 0 3], (M^n)*[1 1 1] = [a(n-2), a(n-1), a(n)]. - Gary W. Adamson, Feb 29 2004
a(n) = A076264(n)-A076264(n-1)-A076264(n-2). - R. J. Mathar, Feb 27 2019

Extensions

More terms from James Sellers, Jun 05 2000

A122610 Triangle read by rows: T(n,k) is coefficient of x^k in Sum_{m=0..n} x^m*(1-x)^(n-m)*(-1)^[(m+1)/2]*binomial(m-[(m+1)/2],[m/2]).

Original entry on oeis.org

1, 1, -2, 1, -3, 1, 1, -4, 3, 1, 1, -5, 6, 1, -2, 1, -6, 10, -1, -6, 1, 1, -7, 15, -6, -11, 6, 1, 1, -8, 21, -15, -15, 18, 1, -2, 1, -9, 28, -29, -15, 39, -6, -9, 1, 1, -10, 36, -49, -7, 69, -30, -21, 9, 1, 1, -11, 45, -76, 14, 105, -84, -30, 36, 1, -2, 1, -12, 55, -111, 54, 140, -182, -15, 96, -14, -12, 1, 1, -13, 66, -155
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 20 2006

Keywords

Examples

			1;
1, -2;
1, -3,  1;
1, -4,  3,   1;
1, -5,  6,   1,  -2;
1, -6, 10,  -1,  -6,  1;
1, -7, 15,  -6, -11,  6, 1;
1, -8, 21, -15, -15, 18, 1, -2;
		

Crossrefs

Cf. A066170.

Programs

  • Mathematica
    T[n_, k_] := (-1)^Floor[(k + 1)/2]*Binomial[n - Floor[(k + 1)/2], Floor[k/2]]; a = Table[CoefficientList[Sum[T[n, k]*p^k*(1 - p)^(n -k), {k, 0, n}], p], {n, 0, 10}]; Flatten[a]
  • PARI
    {T(n,k)=local(A); if(k<0||k>n, 0, A=sum(k=0, n, x^k*(1-x)^(n-k)*(-1)^((k+1)\2)*binomial(n-((k+1)\2),k\2)); polcoeff(A,k))}
    
  • Sage
    @CachedFunction
    def T(n,k):
        if n< 0: return 0
        if n==0: return 1 if k == 0 else 0
        h = 2*T(n-1,k) if n==1 else T(n-1,k)
        return T(n-1,k-1) - T(n-2,k) - h
    A122610 = lambda n,k: T(n,n-k)
    for n in (0..9): [A122610(n,k) for k in (0..n)] # Peter Luschny, Nov 20 2012

Extensions

Edited by N. J. A. Sloane, Sep 24 2006
Offset set to 0 by Michel Marcus, Feb 07 2014

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

Original entry on oeis.org

1, 3, 8, 20, 50, 125, 313, 784, 1964, 4920, 12325, 30875, 77344, 193752, 485362, 1215865, 3045825, 7630000, 19113672, 47881056, 119945321, 300471235, 752701000, 1885567500, 4723475586, 11832629493, 29641546393, 74254101600
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 19 2006

Keywords

Examples

			x + 3*x^2 + 8*x^3 + 20*x^4 + 50*x^5 + 125*x^6 + 313*x^7 + 784*x^8 + 1964*x^9 + ...
		

References

  • Jay Kappraff, Beyond Measure, A Guided Tour Through Nature, Myth and Number, World Scientific, 2002.

Crossrefs

Cf. A066170.

Programs

  • Magma
    I:=[1, 3, 8, 20]; [n le 4 select I[n] else 3*Self(n-1)-Self(n-2)-Self(n-3)+Self(n-4): n in [1..40]] // Vincenzo Librandi, Aug 07 2012
  • Mathematica
    nn = 30; CoefficientList[Series[x/(1 - 3*x + x^2 + x^3 - x^4), {x, 0, nn}], x]
    LinearRecurrence[{3,-1,-1,1},{1,3,8,20},40] (* Harvey P. Dale, Nov 09 2020 *)
  • PARI
    a(n)=polcoeff(x/(1-3*x+x^2+x^3-x^4)+O(x^(n+1)),n) \\ Charles R Greathouse IV, Aug 06 2012
    

Formula

G.f.: x/(1 - 3*x + x^2 + x^3 - x^4).
a(n) ~ 0.50556... * 2.505068...^n. - Charles R Greathouse IV, Aug 06 2012
a(n) = 3*a(n-1) - a(n-2) - a(n-3) + a(n-4) for n>4. - Wesley Ivan Hurt, Sep 18 2015

Extensions

Edited by N. J. A. Sloane, Sep 21 2006; definition corrected Aug 06 2012

A122766 Triangle read by rows: let p(n, x) = x*p(n-1, x) - p(n-2, x), then T(n, x) = d^2/dx^2 (p(n, x)).

Original entry on oeis.org

2, -2, 6, -6, -6, 12, 6, -24, -12, 20, 12, 24, -60, -20, 30, -12, 60, 60, -120, -30, 42, -20, -60, 180, 120, -210, -42, 56, 20, -120, -180, 420, 210, -336, -56, 72, 30, 120, -420, -420, 840, 336, -504, -72, 90, -30, 210, 420, -1120, -840, 1512, 504, -720, -90, 110
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 22 2006

Keywords

Examples

			Triangle begins as:
    2;
   -2,    6;
   -6,    6,   12;
    6,  -24,  -12,   20;
   12,   24,  -60,  -20,   30;
   12,   60,   60, -120,  -30,   42;
  -20,  -60,  180,  120, -210,  -42,  56;
   20, -120, -180,  420,  210, -336, -56,  72;
		

Crossrefs

Programs

  • Magma
    A122766:= func< n,k | 2*(-1)^Binomial(n-k+1, 2)*Binomial(k+1,2)*Binomial(Floor((n+k+2)/2), k+1) >;
    [A122766(n,k): k in [1..n], n in [1..14]]; // G. C. Greubel, Dec 31 2022
    
  • Mathematica
    (* First program *)
    p[0, x]=1; p[1, x]=x-1; p[k_, x_]:= p[k, x]= x*p[k-1, x] -p[k-2, x]; b = Table[Expand[p[n,x]], {n,0,15}]; Table[CoefficientList[D[b[[n]], {x,2}], x], {n,2,14}]//Flatten
    (* Second program *)
    T[n_, k_]:= 2*(-1)^Binomial[n-k+1,2]*Binomial[k+1,2]*Binomial[Floor[(n +k+2)/2], k+1]; Table[T[n,k], {n,14}, {k,n}]//Flatten (* G. C. Greubel, Dec 31 2022 *)
  • PARI
    tpol(n) = if (n <= 0, 1, if (n == 1, x -1, x*tpol(n-1) - tpol(n-2)));
    lista(nn) = {for(n=0, nn, pol = deriv(deriv(tpol(n))); for (k=0, poldegree(pol), print1(polcoeff(pol, k), ", ");););} \\ Michel Marcus, Feb 07 2014
    
  • SageMath
    def A122766(n, k): return 2*(-1)^binomial(n-k+1,2)*binomial(k+1,2)*binomial(((n+k+2)//2), k+1)
    flatten([[A122766(n, k) for k in range(1, n+1)] for n in range(1, 15)]) # G. C. Greubel, Dec 31 2022

Formula

From G. C. Greubel, Dec 31 2022: (Start)
T(n, k) = 2*(-1)^binomial(n-k+1, 2)*binomial(k+1,2)*binomial(floor((n+k +2)/2), k+1).
T(n, 1) = 2*(-1)^binomial(n,2)*binomial(floor((n+3)/2), 2)
T(n, n) = 2*A000217(n).
Sum_{k=1..n} T(n, k) = 2*A104555(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = 2*([n=1] - [n=2]). (End)

Extensions

Edited by N. J. A. Sloane, Oct 01 2006
Name corrected and more terms from Michel Marcus, Feb 07 2014

A124038 Triangle read by rows: T(n, k) = T(n-1, k-1) - T(n-2, k), with T(n, n) = 1, T(n, n-1) = -2.

Original entry on oeis.org

1, -2, 1, -1, -2, 1, 2, -2, -2, 1, 1, 4, -3, -2, 1, -2, 3, 6, -4, -2, 1, -1, -6, 6, 8, -5, -2, 1, 2, -4, -12, 10, 10, -6, -2, 1, 1, 8, -10, -20, 15, 12, -7, -2, 1, -2, 5, 20, -20, -30, 21, 14, -8, -2, 1, -1, -10, 15, 40, -35, -42, 28, 16, -9, -2, 1
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Nov 03 2006

Keywords

Examples

			Triangular sequence begins as:
   1;
  -2,   1;
  -1,  -2,   1;
   2,  -2,  -2,   1;
   1,   4,  -3,  -2,   1;
  -2,   3,   6,  -4,  -2,   1;
  -1,  -6,   6,   8,  -5,  -2,  1;
   2,  -4, -12,  10,  10,  -6, -2,  1;
   1,   8, -10, -20,  15,  12, -7, -2,  1;
  -2,   5,  20, -20, -30,  21, 14, -8, -2,  1;
  -1, -10,  15,  40, -35, -42, 28, 16, -9, -2, 1;
		

Crossrefs

Row reversal of: A374439.
Columns are related to: A000034 (k=0), A029578 (k=1), A131259 (k=2).
Diagonals are related to: A113679 (k=n-1), A022958 (k=n-2), A005843 (k=n-3), A000217 (k=n-4), -A002378 (k=n-5).
Sums include: (-1)^floor((n+1)/2)*A016116 (signed diagonal), A057079 (row), A119910 (signed row), (-1)^n*A130706 (diagonal).

Programs

  • Magma
    function T(n,k) // T = A124038
      if k lt 0 or k gt n then return 0;
      elif k ge n-2 then return k-n + (-1)^(n+k);
      else return T(n-1,k-1) - T(n-2,k);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 22 2025
  • Mathematica
    (* First program *)
    t[n_, m_, d_]:= If[n==m && n>1 && m>1, x, If[n==m-1 || n==m+1, -1, If[n==m== 1, x-2, 0]]];
    M[d_]:= Table[t[n,m,d], {n,d}, {m,d}];
    Join[{{1}}, Table[CoefficientList[Table[Det[M[d]], {d,10}][[d]], x], {d,10}]]//Flatten
    (* Second program *)
    T[n_, k_]:= T[n, k] = If[k<0 || k>n, 0, If[k>n-2, k-n+(-1)^(n-k), T[n-1, k- 1] -T[n-2,k]]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 22 2025 *)
  • SageMath
    @CachedFunction
    def A124038(n,k):
        if n< 0: return 0
        if n==0: return 1 if k == 0 else 0
        h = 2*A124038(n-1,k) if n==1 else 0
        return A124038(n-1,k-1) - A124038(n-2,k) - h
    for n in (0..9): [A124038(n,k) for k in (0..n)] # Peter Luschny, Nov 20 2012
    
  • SageMath
    from sage.combinat.q_analogues import q_stirling_number2
    def A124038(n,k): return (1 + ((n-k)%2))*q_stirling_number2(n+1, n-k+1, -1)
    print(flatten([[A124038(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 22 2025
    

Formula

From G. C. Greubel, Jan 22 2025: (Start)
T(n, k) = T(n-1, k-1) - T(n-2, k), with T(n, n) = 1, T(n, n-1) = -2.
T(n, k) = (-1)^floor((n-k+1)/2)*(1 + (n-k mod 2))*qStirling2(n+1, n-k+1,-1).
T(2*n, n) = (1/2)*(-1)^floor(n/2)*( (1+(-1)^n)*A005809(n/2) - 2*(1-(-1)^n)* A045721((n-1)/2) ). (End)

Extensions

Edited by G. C. Greubel, Jan 22 2025

A122160 Identity matrices minus Steinbach matrices as characteristic polynomials to give a triangular array I[n]-An[i,j]-> P[k,x] P[k,n]->T[n,m).

Original entry on oeis.org

1, 0, -1, -1, -1, 1, -1, 2, 1, -1, -2, 7, -3, -2, 1, -1, 7, -13, 5, 2, -1, -1, 12, -34, 30, -6, -3, 1, 0, 5, -30, 60, -45, 9, 3, -1, 1, 1, -41, 130, -155, 78, -10, -4, 1, 1, -6, -3, 87, -220, 229, -106, 14, 4, -1, 2, -19, 45, 54, -378, 609, -455, 160, -15, -5, 1, 1, -15, 73, -123, -89, 609, -889, 615, -205, 20, 5, -1, 1, -24, 164, -460
Offset: 1

Views

Author

Gary W. Adamson and Roger L. Bagula, Oct 17 2006

Keywords

Comments

Remember? 1/(1-x)=Sum[x^n,{n,0,Infinitity}] So to try with the Steinbach field: (I-A[i,j])^(-1)=Sun[A[i,j]^n,{n,0,Infinity}] It doesn't appear it should be finite? But I-A[i,j] is finite--> zero? {{1,0,0}, {{1,1,1}, {{0,-1,-1}, {0,1,0}, {1,1,0}, {-1,0,0}, {0,0,1}} - 1,0,0}}= { -1,0,1}} Matrices: {{0, -1}, {-1, 1}}, {{0, -1, -1}, {-1, 0, 0}, {-1, 0, 1}}, {{0, -1, -1, -1}, {-1, 0, -1, 0}, {-1, -1, 1, 0}, {-1, 0, 0, 1}}, {{0, -1, -1, -1, -1}, {-1, 0, -1, -1, 0}, {-1, -1, 0, 0, 0}, {-1, -1, 0, 1, 0}, {-1, 0, 0, 0, 1}}

Examples

			{1},
{0, -1},
{-1, -1, 1},
{-1, 2, 1, -1},
{-2, 7, -3, -2, 1},
{-1, 7, -13, 5, 2, -1},
{-1, 12, -34, 30, -6, -3, 1},
{0, 5, -30, 60, -45, 9,3, -1},
{1, 1, -41, 130, -155, 78, -10, -4, 1}
		

Crossrefs

Programs

  • Mathematica
    An[d_] := Table[If[n + m - 1 > d, 0, 1], {n, 1, d}, {m, 1, d}]; Join[{{1}}, Table[CoefficientList[CharacteristicPolynomial[IdentityMatrix[d] - An[d], x], x], {d, 1, 20}]]; Flatten[%]

Formula

I[n]-An[i,j]-> P[k,x] P[k,n]->T[n,m)
Previous Showing 11-20 of 28 results. Next