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

A130752 Binomial transform of periodic sequence (2, 3, 1).

Original entry on oeis.org

2, 5, 9, 16, 31, 63, 128, 257, 513, 1024, 2047, 4095, 8192, 16385, 32769, 65536, 131071, 262143, 524288, 1048577, 2097153, 4194304, 8388607, 16777215, 33554432, 67108865, 134217729, 268435456, 536870911, 1073741823, 2147483648, 4294967297, 8589934593
Offset: 0

Views

Author

Paul Curtz, Jul 13 2007

Keywords

Comments

The second sequence of "less twisted numbers"; this sequence, A130750 and A130755 form a "suite en trio" (cf. reference, p. 130).
First differences of A130750, second differences of A130755.
Sequence equals its third differences:
2.....5.....9....16....31....63...128...257...513..1024...
...3.....4.....7....15....32....65...129...256...511...
......1.....3.....8....17....33....64...127...255...
..........2.....5.....9....16....31....63...128...

References

  • P. Curtz, Exercise Book, manuscript, 1995.

Crossrefs

Cf. A010882, A130755 (first differences), A130750 (second differences).

Programs

  • Magma
    m:=31; S:=[ [2, 3, 1][(n-1) mod 3 +1]: n in [1..m] ]; [ &+[ Binomial(i-1, k-1)*S[k]: k in [1..i] ]: i in [1..m] ]; /* Klaus Brockhaus, Aug 03 2007 */
    
  • Mathematica
    a[n_] := 2^(n+1) + 2*Sin[n*Pi/3]/Sqrt[3]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Aug 13 2012 *)
    LinearRecurrence[{3,-3,2},{2,5,9},40] (* Harvey P. Dale, Jun 21 2017 *)
  • PARI
    {m=31; v=vector(m); v[1]=2; v[2]=5; v[3]=9; for(n=4, m, v[n]=3*v[n-1]-3*v[n-2]+2*v[n-3]); v} \\ Klaus Brockhaus, Aug 03 2007
    
  • PARI
    {for(n=0, 30, print1(2^(n+1)+[0, 1, 1, 0, -1, -1][n%6+1], ","))} \\ Klaus Brockhaus, Aug 03 2007
    
  • PARI
    Vec((2-x) / ((1-2*x)*(1-x+x^2)) + O(x^40)) \\ Colin Barker, Jan 20 2017

Formula

G.f.: (2 - x) / ((1 - 2*x)*(1 - x + x^2)).
a(0) = 2; a(1) = 5; a(2) = 9; for n > 2, a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).
a(n) = 2^(n+1) + A128834(n).
a(0) = 2; for n > 0, a(n) = 2*a(n-1) + A057079(n+1).
E.g.f.: 2*(sqrt(3)*exp(2*x) + sin(sqrt(3)*x/2)*exp(x/2))/sqrt(3). - Ilya Gutkovskiy, Jun 20 2016
a(n) = 2^(n+1) + (2*sin((Pi*n)/3))/sqrt(3). - Colin Barker, Jan 20 2017

Extensions

Edited and extended by Klaus Brockhaus, Aug 03 2007

A192080 Expansion of 1/((1-x)^6 - x^6).

Original entry on oeis.org

1, 6, 21, 56, 126, 252, 463, 804, 1365, 2366, 4368, 8736, 18565, 40410, 87381, 184604, 379050, 758100, 1486675, 2884776, 5592405, 10919090, 21572460, 43144920, 87087001, 176565486, 357913941, 723002336, 1453179126, 2906358252
Offset: 0

Views

Author

Bruno Berselli, Jun 23 2011

Keywords

Crossrefs

Sequences of the form 1/((1-x)^m - x^m): A000079 (m=1,2), A024495 (m=3), A000749 (m=4), A049016 (m=5), this sequence (m=6), A049017 (m=7), A290995 (m=8), A306939 (m=9).

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(),m); Coefficients(R!(1/((1-2*x)*(1-x+x^2)*(1-3*x+3*x^2))));
    
  • Mathematica
    CoefficientList[Series[1/((1-2*x)*(1-x+x^2)*(1-3*x+3*x^2)), {x,0,50}], x] (* Vincenzo Librandi, Oct 15 2012 *)
    LinearRecurrence[{6,-15,20,-15,6},{1,6,21,56,126},30] (* Harvey P. Dale, Feb 22 2017 *)
  • Maxima
    makelist(coeff(taylor(1/((1-2*x)*(1-x+x^2)*(1-3*x+3*x^2)), x, 0, n), x, n), n, 0, 29);
    
  • PARI
    Vec(1/((1-2*x)*(1-x+x^2)*(1-3*x+3*x^2))+O(x^99)) \\ Charles R Greathouse IV, Jun 23 2011
    
  • SageMath
    def A192080_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/((1-x)^6-x^6) ).list()
    A192080_list(51) # G. C. Greubel, Apr 11 2023

Formula

a(n) = abs(A006090(n)) = (-1)^n * A006090(n).
G.f.: 1/((1-2*x)*(1-x+x^2)*(1-3*x+3*x^2)).
From G. C. Greubel, Apr 11 2023: (Start)
a(n) = (2^(n+5) + A010892(n) - 2*A010892(n-1) - 27*(A057083(n) - 2*A057083(n-1)))/6.
a(n) = (2^(n+5) + A057079(n+2) - 27*A057681(n+1))/6. (End)

A100063 A Chebyshev transform of Jacobsthal numbers.

Original entry on oeis.org

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

Views

Author

Paul Barry, Nov 02 2004

Keywords

Comments

A Chebyshev transform of A001045(n+1): if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))*A(x/(1+x^2)).
Also decimal expansion of 1111/9990. - Elmo R. Oliveira, Feb 18 2024
Also partial quotients of the continued fraction expansion of sqrt(5/2). - Hugo Pfoertner, Jan 10 2025

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + x^4 + x^5 + 2*x^6 + x^7 + x^8 + 2*x^9 + ... - _Michael Somos_, Feb 20 2024
		

Crossrefs

Programs

  • Mathematica
    PadRight[{1},120,{2,1,1}] (* or *) LinearRecurrence[{0,0,1},{1,1,1,2},120] (* Harvey P. Dale, Jul 08 2015 *)
    a[ n_] := If[n<1, Boole[n==0], {2, 1, 1}[[1+Mod[n, 3]]]]; (* Michael Somos, Feb 20 2024 *)
  • PARI
    my(x='x+O('x^50)); Vec((1+x)(1+x^2)/(1-x^3)) \\ G. C. Greubel, May 03 2017
    
  • PARI
    {a(n) = if(n<1, n==0, [2, 1, 1][n%3+1])}; /* Michael Somos, Feb 20 2024 */
    
  • PARI
    contfrac(sqrt(5/2),,80) \\ Hugo Pfoertner, Jan 10 2025

Formula

G.f.: (1+x)(1+x^2)/(1-x^3).
a(n) = n*Sum_{k=0..floor(n/2)} binomial(n-k, k)(-1)^k*A001045(n-2k+1)/(n-k).
Multiplicative with a(3^e) = 2, a(p^e) = 1 otherwise. - David W. Wilson, Jun 11 2005
Dirichlet g.f.: zeta(s)*(1+1/3^s). Dirichlet convolution of A154272 and A000012. - R. J. Mathar, Feb 07 2011
a(n) = 2 if n == 0 (mod 3) and n > 0, and a(n) = 1 otherwise. - Amiram Eldar, Nov 01 2022
a(n) = gcd(Fibonacci(n), Lucas(n)) = gcd(A000045(n), A000032(n)), for n >= 1. - Amiram Eldar, Jul 10 2023

A130750 Binomial transform of A010882.

Original entry on oeis.org

1, 3, 8, 17, 33, 64, 127, 255, 512, 1025, 2049, 4096, 8191, 16383, 32768, 65537, 131073, 262144, 524287, 1048575, 2097152, 4194305, 8388609, 16777216, 33554431, 67108863, 134217728, 268435457, 536870913, 1073741824, 2147483647
Offset: 0

Views

Author

Paul Curtz, Jul 13 2007

Keywords

Comments

The first sequence of "less twisted numbers"; this sequence, A130752 and A130755 form a "suite en trio" (cf. reference, p. 130).
First differences of A130755, second differences of A130752.
Sequence equals its third differences:
1 3 8 17 33 64 127 255 512 1025
2 5 9 16 31 63 128 257 513
3 4 7 15 32 65 129 256
1 3 8 17 33 64 127

References

  • P. Curtz, Exercise Book, manuscript, 1995.

Crossrefs

Cf. A010882 (periodic (1, 2, 3)), A128834 (periodic (0, 1, 1, 0, -1, -1)), A057079 (periodic (1, 2, 1, -1, -2, -1)), A130752 (first differences), A130755 (second differences).

Programs

  • Magma
    m:=31; S:=[ [1, 2, 3][(n-1) mod 3 +1]: n in [1..m] ]; [ &+[ Binomial(i-1, k-1)*S[k]: k in [1..i] ]: i in [1..m] ]; // Klaus Brockhaus, Aug 03 2007
    
  • Magma
    I:=[1,3,8]; [n le 3 select I[n] else 3*Self(n-1) - 3*Self(n-2) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Jan 15 2018
    
  • Mathematica
    CoefficientList[Series[(1+2*x^2)/((1-2*x)*(1-x+x^2)), {x, 0, 50}], x] (* or *) LinearRecurrence[{3,-3,2}, {1,3,8}, 30] (* G. C. Greubel, Jan 15 2018 *)
  • PARI
    {m=31; v=vector(m); v[1]=1; v[2]=3; v[3]=8; for(n=4, m, v[n]=3*v[n-1]-3*v[n-2]+2*v[n-3]); v} \\ Klaus Brockhaus, Aug 03 2007
    
  • PARI
    {for(n=0, 30, print1(2^(n+1)+[ -1, -1,0, 1, 1, 0][n%6+1], ","))} \\ Klaus Brockhaus, Aug 03 2007

Formula

G.f.: (1+2*x^2)/((1-2*x)*(1-x+x^2)).
a(0) = 1; a(1) = 3; a(2) = 8; for n > 2, a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3).
a(n) = 2^(n+1) + A128834(n+4).
a(0) = 1; for n > 0, a(n) = 2*a(n-1) + A057079(n-1).

Extensions

Edited and extended by Klaus Brockhaus, Aug 03 2007

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

Original entry on oeis.org

1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3, 4, -3, 1, 0, 1, -3
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Period 6: repeat [1, -3, 4, -3, 1, 0].
The unsigned sequence is the r=3 member in the r-family of sequences S_r(n) defined in A092184 where more information can be found. |a(n)| = 2-2*T(n,1/2), with twice the Chebyshev polynomials of the first kind 2*T(n,x=1/2) = A057079(n+1) = S(n+1,1) + S(n,1) with S(n,1)= A010892(n).
Working with an offset of 1, this sequence is a divisibility sequence, i.e., a(n) divides a(m) whenever n divides m. Case P1 = -3, P2 = 2, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 25 2014

Examples

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

Crossrefs

Programs

  • Mathematica
    a[ n_] := {-3, 4, -3, 1, 0, 1}[[Mod[ n, 6, 1]]]; (* Michael Somos, Aug 05 2015 *)
    CoefficientList[Series[(1-x)/(1+2x+2x^2+x^3),{x,0,120}],x] (* or *) PadRight[ {},120,{1,-3,4,-3,1,0}] (* or *) LinearRecurrence[{-2,-2,-1},{1,-3,4},120] (* Harvey P. Dale, Jan 06 2016 *)
  • PARI
    Vec((1-x)/(1+2*x+2*x^2+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • PARI
    {a(n) = [1, -3, 4, -3, 1, 0][n%6 + 1]}; /* Michael Somos, Aug 05 2015 */

Formula

abs(a(n)) = 2 + 2*cos(Pi*n/3 - 2*Pi/3). - Paul Barry, Mar 14 2004
Euler transform of finite sequence [-3, 1, 1]. - Michael Somos, Sep 17 2004
a(n) = (n+1)*(Sum_{k=0..floor((n+1)/2)} (-1)^k*binomial(n-k+1, k)*(-1)^(n-2k+1)/(n-k+1)) + 2*(-1)^n; a(n) = 2*T(n+1, -1/2) + 2(-1)^n. - Paul Barry, Dec 12 2004
From Peter Bala, Mar 25 2014: (Start)
The following formulas assume an offset of 1.
Let {u_j(n)}, j = 0 or j = 1, be two Lucas sequences in the quadratic integer ring Z[w], where w = exp(2*Pi*i/3), defined by the recurrences u_j(0) = 0, u_j(1) = 1 and u_j(n) = (-1)^j*sqrt(3)*u(n-1) - u(n-2) for n >= 2. Then a(n) = u_0(n)*u_1(n).
Equivalently, a(n) = U(n-1,sqrt(3)/2)*U(n-1,-sqrt(3)/2), where U(n,x) denotes the Chebyshev polynomial of the second kind.
a(n) = - ( ((sqrt(3) + i)/2)^n - ((sqrt(3) - i)/2)^n )*( ((-sqrt(3) + i)/2)^n - ((-sqrt(3) - i)/2)^n ) = w^n + w^(2*n) - 2*(-1)^n = 2*cos(2*n*Pi/3) - 2*(-1)^n.
a(n) = the bottom left entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, -1/2; 1, -3/2] and T(n,x) denotes the Chebyshev polynomial of the first kind.
See the remarks in A100047 for the general connection between Chebyshev polynomials of the first kind and 4th-order linear divisibility sequences. (End)
a(n) = a(n+6) = a(-2-n) for all n in Z. - Michael Somos, Aug 05 2015
a(n) = (-1)^n * A254745(n). - Michael Somos, Jul 16 2017

Extensions

Chebyshev comment and related formulas from Wolfdieter Lang, Sep 10 2004

A155587 Expansion of (1 + x*c(x))/(1 - x), where c(x) is the g.f. of A000108.

Original entry on oeis.org

1, 2, 3, 5, 10, 24, 66, 198, 627, 2057, 6919, 23715, 82501, 290513, 1033413, 3707853, 13402698, 48760368, 178405158, 656043858, 2423307048, 8987427468, 33453694488, 124936258128, 467995871778, 1757900019102, 6619846420554
Offset: 0

Views

Author

Paul Barry, Jan 24 2009

Keywords

Comments

Row sums of A155586.
Hankel transform is A057079(n+2).
From Petros Hadjicostas, Aug 03 2020: (Start)
To prove R. J. Mathar's conjecture, note that the o.g.f. of the sequence implies (Sum_{n >= 0} a(n)*x^n)*(1 - x) = 1 + x*c(x); i.e., a(0) + Sum_{n >= 1} (a(n) - a(n-1))*x^n = 1 + Sum_{n >= 1} C(n-1)*x^n, where C(n) = A000108(n) (Catalan numbers).
Thus, C(n-1) = a(n) - a(n-1) (for n >= 1), and hence C(n) = a(n+1) - a(n). Since 2*(2*n - 1)*C(n-1) = (n + 1)*C(n), we get (n + 1)*a(n+1) + (-5*n + 1)*a(n) + 2*(2*n - 1)*a(n-1) = 0. The last equation implies R. J. Mathar's conjecture. (End)

Crossrefs

Partial sums of A120588.

Programs

  • Haskell
    a155587 n = a155587_list !! n
    a155587_list = scanl (+) 1 a000108_list  -- Reinhard Zumkeller, Mar 01 2013
  • Maple
    CatalanNumber := n -> binomial(2*n, n)/(n+1):
    a := n -> ((3 - I*sqrt(3)))/2 - CatalanNumber(n)*hypergeom([1, n+1/2], [n+2], 4):
    seq(simplify(a(n)), n=0..26); # Peter Luschny, Aug 04 2020

Formula

a(n) = 1 + Sum_{k=0..n-1} A000108(k).
Conjecture: n*a(n) + (6-5*n)*a(n-1) + 2*(2*n-3)*a(n-2) = 0. - R. J. Mathar, Nov 15 2011
a(n) = A014138(n-1) + 2 for n > 0. - Reinhard Zumkeller, Mar 01 2013 [Corrected by Petros Hadjicostas, Aug 03 2020]
a(n+1) - a(n) = A000108(n). - Petros Hadjicostas, Aug 04 2020
a(n) = ((3 - i*sqrt(3)))/2 - CatalanNumber(n)*hypergeom([1, n + 1/2], [n + 2], 4). - Peter Luschny, Aug 04 2020

A192174 Triangle T(n,k) of the coefficients [x^(n-k)] of the polynomial p(0,x)=-1, p(1,x)=x and p(n,x) = x*p(n-1,x) - p(n-2,x) in row n, column k.

Original entry on oeis.org

-1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, -1, 0, -1, 1, 0, -2, 0, -1, 0, 1, 0, -3, 0, 0, 0, 1, 1, 0, -4, 0, 2, 0, 2, 0, 1, 0, -5, 0, 5, 0, 2, 0, -1, 1, 0, -6, 0, 9, 0, 0, 0, -3, 0, 1, 0, -7, 0, 14, 0, -5, 0, -5, 0, 1, 1, 0, -8, 0, 20, 0, -14, 0, -5, 0, 4, 0
Offset: 0

Views

Author

Paul Curtz, Jun 24 2011

Keywords

Comments

Consider the Catalan triangle A009766 antisymmetrically extended by a mirror along the diagonal (see also A176239):
0, -1, -1, -1, -1, -1, -1, -1,
1, 0, -1, -2, -3, -4, -5, -6,
1, 1, 0, -2, -5, -9, -14, -20,
1, 2, 2, 0, -5, -14, -28, -48,
1, 3, 5, 5, 0, -14, -42, -90,
1, 4, 9, 14, 14, 0, -42, -132,
1, 5, 14, 28, 42, 42, 0, -132,
1, 6, 20, 48, 90, 132, 132, 0.
The rows in this array are essentially the columns of T(n,k).

Examples

			Triangle begins
  -1;      # -1
   1,  0;      # x
   1,  0,  1;      # x^2+1
   1,  0,  0,  0;      # x^3
   1,  0, -1,  0, -1;      # x^4-x^2-1
   1,  0, -2,  0, -1,  0;
   1,  0, -3,  0,  0,  0,  1;
   1,  0, -4,  0,  2,  0,  2,  0;
   1,  0, -5,  0,  5,  0,  2,  0, -1;
   1,  0, -6,  0,  9,  0,  0,  0, -3,  0;
   1,  0, -7,  0, 14,  0, -5,  0, -5,  0,  1;
   1,  0, -8,  0, 20,  0,-14,  0, -5,  0,  4,  0;
   1,  0, -9,  0, 27,  0,-28,  0,  0,  0,  9,  0, -1;
		

Crossrefs

Cf. A194084. - Paul Curtz, Aug 16 2011

Programs

  • Maple
    p:= proc(n,x) option remember: if n=0 then -1 elif n=1 then x elif n>=2 then x*procname(n-1,x)-procname(n-2,x) fi: end: A192174 := proc(n,k): coeff(p(n,x),x,n-k): end: seq(seq(A192174(n,k),k=0..n), n=0..11); # Johannes W. Meijer, Aug 21 2011

Formula

Sum_{k=0..n} T(n,k) = A057079(n-1).
Apparently T(3s,2s-2) = (-1)^(s+1)*A000245(s), s >= 1.

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

Original entry on oeis.org

1, 2, 3, 2, 4, 7, 2, 5, 16, 11, 2, 6, 30, 36, 15, 2, 7, 50, 91, 64, 19, 2, 8, 77, 196, 204, 100, 23, 2, 9, 112, 378, 540, 385, 144, 27, 2, 10, 156, 672, 1254, 1210, 650, 196, 31, 2, 11, 210, 1122, 2640, 3289, 2366, 1015, 256, 35, 2, 12, 275, 1782, 5148, 8008
Offset: 1

Views

Author

Clark Kimberling, Feb 19 2012

Keywords

Comments

As triangle T(n,k) with 0 <= k <= n, it is (2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 03 2012

Examples

			First five rows:
  1;
  2;
  3,  2;
  4,  7,  2;
  5, 16, 11,  2;
Triangle (2, -1/2, 1/2, 0, 0, 0, ...) DELTA (0, 1, 0, 0, 0, 0, ...), 0 <= k <= n, begins:
  1;
  2,   0;
  3,   2,   0;
  4,   7,   2,   0;
  5,  16,  11,   2,   0;
  6,  30,  36,  15,   2,   0;
  7,  50,  91,  64,  19,   2,   0;
  8,  77, 196, 204, 100,  23,   2,   0;
		

Crossrefs

Cf. A207607.

Programs

  • Maple
    T:= proc(n, k) option remember;
          if k<0 or k>n then 0
        elif k=0 then n+2
        elif k=n then 2
        else 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k)
          fi; end:
    1, seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Mar 15 2020
  • Mathematica
    (* First program *)
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + v[n - 1, x]
    v[n_, x_] := x*u[n - 1, x] + (x + 1)*v[n - 1, x]
    Table[Factor[u[n, x]], {n, 1, z}]
    Table[Factor[v[n, x]], {n, 1, z}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]  (* A207606 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A207607 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==0, n+2, If[k==n, 2, 2*T[n-1, k] - T[n-2, k] + T[n-1, k-1] ]]]; Join[{1}, Table[T[n, k], {n, 0, 10}, {k, 0, n}]]//Flatten (* G. C. Greubel, Mar 15 2020 *)
  • Python
    from sympy import Poly
    from sympy.abc import x
    def u(n, x): return 1 if n==1 else u(n - 1, x) + v(n - 1, x)
    def v(n, x): return 1 if n==1 else x*u(n - 1, x) + (x + 1)*v(n - 1, x)
    def a(n): return Poly(u(n, x), x).all_coeffs()[::-1]
    for n in range(1, 13): print(a(n)) # Indranil Ghosh, May 28 2017
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==1): return n+1
        elif (k==n): return 2
        else: return 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k)
    [1]+[[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Mar 15 2020

Formula

u(n,x) = u(n-1,x) + v(n-1,x), v(n,x) = x*u(n-1,x) + (x+1)v(n-1,x), where u(1,x)=1, v(1,x)=1.
As triangle T(n,k) with 0 <= k <= n: g.f.: (1-y*x)/(1-(2+y)*x+x^2). - Philippe Deléham, Mar 03 2012
As triangle T(n,k) with 0 <= k <= n: Sum_{k=0..n} T(n,k)*x^k = A132677(n), A000034(n)*A057077(n), A057079(n), A000027(n+1), A001519(n+1), A001075(n), A002310(n), A038725(n), A172968(n) for x = -3, -2, -1, 0, 1, 2, 3, 4, 5 respectively. - Philippe Deléham, Mar 03 2012
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k). - Philippe Deléham, Mar 03 2012
T(n,k) = C(n+k-1,2*k+1) + 2*C(n+k-1,2*k), where C is binomial. - Yuchun Ji, May 23 2019
T(n,k) = T(n-1,k) + A207607(n-1,k). - Yuchun Ji, May 28 2019

A234044 Period 7: repeat [2, -2, 1, 0, 0, 1, -2].

Original entry on oeis.org

2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2, 1, 0, 0, 1, -2, 2, -2
Offset: 0

Views

Author

Wolfdieter Lang, Feb 27 2014

Keywords

Comments

This is a member of the six sequences which appear for the instance N=7 of the general formula 2*exp(2*Pi*n*I/N) = R(n, x^2-2) + x*S(n-1, x^2-2)*s(N)*I, for n >= 0, with I = sqrt(-1), s(N) = sqrt(2-x)*sqrt(2+x), x = rho(N) := 2*cos(Pi/N) and R and S are the monic Chebyshev polynomials whose coefficient tables are given in A127672 and A049310. If powers x^k with k >= delta(N) = A055034(N) enter in R or x*S then C(N, x), the minimal polynomial of x = rho(N) (see A187360) is used for a reduction. If delta(N) = 2 it may happen that sqrt(2+x) or sqrt(2-x) is an integer in the number field Q(rho(N)). See the N=5 case comment on A164116.
For N=7 with delta(7) = 3, and C(7, x) = x^3 - x^2 - 2*x + 1 the final result becomes 2*exp(2*Pi*n*I/7) = (a(n) + b(n)*x + c(n)*x^2) + (A(n) + B(n)*x + C(n)*x^2)*s(7)*I, with x = rho(7) = 2*cos(Pi/7), a(n) the present sequence, b(n) = A234045(n), c(n) = A234046(n), A(n) = A238468(n), B(n) = A238469(n) and C(n) = A238470(n). The a, b, c and A, B, C brackets are integers in Q(rho(7)).

Examples

			n = 4: 2*exp(8*Pi*I/7) = (2-16*x^2+20*x^4-8*x^6+x^8) + (4*x+10*x^3-6*x^5+x^7)*s(7)*I, reduced with C(7, x) = x^3 - x^2 - 2*x + 1 = 0 this becomes = (-x) + (-1)*s(7)*I with x= 2*cos(Pi/7) and s(7) = 2*sin(Pi/7).The power basis coefficients are thus (a(4), b(4), c(4)) = (0, -1, 0) and (A(4), B(4), C(4)) = (-1, 0, 0).
		

Crossrefs

Cf. A234045, A234046, A238468, A238469, A238470, A099837 (N=3), A056594 (N=4), A164116 (N=5), A057079 (N=6).

Programs

Formula

G.f.: (2 - 2*x + x^2 + x^5 - 2*x^6)/(1 - x^7).
a(n+7) = a(n) for n>=0, with a(0) = -a(1) = -a(6) = 2, a(3) = a(4) =0 and a(2) = a(5) = 1.
From Wesley Ivan Hurt, Jul 16 2016: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) + a(n-6) = 0 for n>5.
a(n) = (1/7) * Sum_{k=1..6} 2*cos((2k)*n*Pi/7) - 2*cos((2k)*(1+n)*Pi/7) + cos((2k)*(2+n)*Pi/7) + cos((2k)*(5+n)*Pi/7) - 2*cos((2k)*(6+n)*Pi/7).
a(n) = 2 + 4*floor(n/7) - 3*floor((1+n)/7) + floor((2+n)/7) - floor((4+n)/7) + 3*floor((5+n)/7) - 4*floor((6+n)/7). (End)

A079757 Periodic sequence 1, 0, -2, 3, -2, 0, ...

Original entry on oeis.org

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

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Jan 10 2003

Keywords

Crossrefs

Cf. A057079.

Programs

  • Magma
    &cat[[1,0,-2,3,-2,0]: n in [0..20]]; // G. C. Greubel, Mar 27 2024
    
  • Mathematica
    PadRight[{}, 120, {1,0,-2,3,-2,0}] (* G. C. Greubel, Mar 27 2024 *)
  • SageMath
    def A079757(n): return [1,0,-2,3,-2,0][n%6]
    [A079757(n) for n in range(121)] # G. C. Greubel, Mar 27 2024

Formula

a(n) = A057079(2*n+1) - (-1)^floor((2*n+1)/2).
G.f.: (1+2*x)/(1+2*x+2*x^2+x^3).
a(n) = -2*a(n-1) - 2*a(n-2) - a(n-3).
a(n) = |Real(2*(sqrt(3/4)*i - 1/2)^n - (-1)^n )|, where i = sqrt(-1). - Ralf Stephan, Mar 07 2003
Previous Showing 21-30 of 68 results. Next