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.

Showing 1-4 of 4 results.

A154958 Antidiagonal sums of number triangle A154957 regarded as a lower triangular infinite matrix.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 3, 2, 4, 2, 4, 2, 5, 3, 6, 3, 6, 3, 7, 4, 8, 4, 8, 4, 9, 5, 10, 5, 10, 5, 11, 6, 12, 6, 12, 6, 13, 7, 14, 7, 14, 7, 15, 8, 16, 8, 16, 8, 17, 9, 18, 9, 18, 9, 19, 10, 20, 10, 20, 10, 21, 11, 22, 11, 22, 11, 23, 12, 24, 12, 24, 12, 25, 13, 26, 13, 26, 13, 27, 14, 28, 14, 28
Offset: 0

Views

Author

Paul Barry, Jan 18 2009

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1/((x - 1)^2 (x + 1)^2 (x^2 - x + 1)), {x, 0, 100}], x] (* Vincenzo Librandi, Mar 22 2014 *)
    LinearRecurrence[{1,1,-2,1,1,-1},{1,1,2,1,2,1},90] (* Harvey P. Dale, Aug 26 2016 *)
  • PARI
    {a(n) = if( n<-5, -a(-6-n), if( n<0, 0, polcoeff( 1 / (1 - x - x^2 + 2*x^3 - x^4 - x^5 + x^6) + x * O(x^n), n)))}; /* Michael Somos, Mar 21 2014 */

Formula

a(2n) = A004523(n+2); a(2n+1) = floor((n+3)/3) = A002264(n+3).
G.f.: 1/((x-1)^2*(x+1)^2*(x^2-x+1)). - Philippe Deléham, Mar 21 2014
a(n) = a(n-1) + a(n-2) - 2*a(n-3) + a(n-4) + a(n-5) - a(n-6), a(0) = 1, a(1) = 1, a(2) = 2, a(3) = 1, a(4) = 2, a(5) = 1. - Philippe Deléham, Mar 21 2014
Euler transform of length 6 sequence [ 1, 1, -1, 0, 0, 1]. - Michael Somos, Mar 21 2014
a(-6-n) = -a(n). - Michael Somos, Mar 21 2014
a(3*n) = A026741(n+1). a(3*n + 1) = A029578(n+2). a(3*n + 2) = A065423(n+3). - Michael Somos, Mar 21 2014

A158856 Triangle T(n, k) = coefficients of p(n, x), where p(n, x) = (1 - x^(2+floor((n-1)/2)))*(1 + (-1)^floor(n/2)*x^(1+floor(n/2))), read by rows.

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Mar 28 2009

Keywords

Examples

			Triangle begins as:
  1;
  1,  1;
  1,  0, -1;
  1,  0,  0, -1;
  1,  0,  1,  0,  1;
  1,  0,  1,  1,  0,  1;
  1,  0,  1,  0, -1,  0, -1;
  1,  0,  1,  0,  0, -1,  0, -1;
  1,  0,  1,  0,  1,  0,  1,  0,  1;
  1,  0,  1,  0,  1,  1,  0,  1,  0,  1;
  1,  0,  1,  0,  1,  0, -1,  0, -1,  0, -1;
		

Crossrefs

Programs

  • Mathematica
    p[x_, n_]= (1-x^(2+Floor[(n-1)/2]))*(1+(-1)^Floor[n/2]*x^(1+Floor[n/2]))/(1 - x^2);
    Table[CoefficientList[p[x, n], x], {n,0,12}]//Flatten (* modified by G. C. Greubel, Mar 07 2022 *)
  • Sage
    def p(n,x): return (1-x^(2+((n-1)//2)))*(1+(-1)^(n//2)*x^(1+(n//2)))/(1-x^2)
    def A158856(n,k): return ( p(n,x) ).series(x, n+1).list()[k]
    flatten([[A158856(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 07 2022

Formula

T(n, k) = coefficients of p(n, x), where p(n, x) = (Sum_{j=0..1+floor((n-1)/2)} x^j)*(Sum_{i=0..floor(n/2)} (-x)^i) and p(0, x) = 1.
From G. C. Greubel, Mar 07 2022: (Start)
T(n, k) = coefficients of p(n, x), where p(n, x) = (1 - x^(2+floor((n-1)/2)))*(1 + (-1)^floor(n/2)*x^(1+floor(n/2))).
Sum_{k=0..n} T(n, k) = floor((n+3)/2)*( (1 + floor(n/2)) mod 2 ).
Sum_{k=0..n} abs(T(n, k)) = A004524(n+3).
T(2*n, n) = (1 + (-1)^n)/2.
T(2*n+1, n) = (1 + (-1)^n)/2.
Sum_{k=0..floor(n/2)} T(n, k) = floor((n+4)/4).
T(n, k) = abs(A154957(n,k)). (End)

Extensions

Edited by G. C. Greubel, Mar 07 2022

A136401 a(n) = 3*a(n-1) - 4*a(n-2) + 6*a(n-3) - 4*a(n-4), with initial terms 0,0,0,1.

Original entry on oeis.org

0, 0, 0, 1, 3, 5, 9, 21, 45, 85, 165, 341, 693, 1365, 2709, 5461, 10965, 21845, 43605, 87381, 174933, 349525, 698709, 1398101, 2796885, 5592405, 11183445, 22369621, 44741973, 89478485, 178951509, 357913941, 715838805, 1431655765, 2863289685, 5726623061
Offset: 0

Views

Author

Paul Curtz, Mar 30 2008

Keywords

Examples

			Binary.................Decimal
0............................0
0............................0
0............................0
1............................1
11...........................3
101..........................5
1001.........................9
10101.......................21
101101......................45
1010101.....................85
10100101...................165
101010101..................341
1010110101.................693
10101010101...............1365
101010010101..............2709
1010101010101.............5461
10101011010101...........10965
101010101010101..........21845
1010101001010101.........43605, etc. - _Philippe Deléham_, Mar 21 2014
		

Crossrefs

Cf. A154957.

Programs

  • Mathematica
    CoefficientList[Series[x^3/((x - 1) (2 x - 1) (2 x^2 + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 22 2014 *)
    LinearRecurrence[{3,-4,6,-4},{0,0,0,1},40] (* Harvey P. Dale, Mar 13 2018 *)

Formula

a(n+3) = Sum_{k=0..n} A154957(n,k)*2^k. - Philippe Deléham, Mar 21 2014
G.f.: x^3/((x-1)*(2*x-1)*(2*x^2+1)). - Philippe Deléham, Mar 21 2014

Extensions

More terms from Philippe Deléham, Mar 21 2014

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

Original entry on oeis.org

1, 4, 10, 28, 91, 280, 820, 2440, 7381, 22204, 66430, 199108, 597871, 1794160, 5380840, 16140880, 48427561, 145287604, 435848050, 1307529388, 3922632451, 11767941640, 35303692060, 105910943320, 317733228541, 953200084204, 2859599056870, 8578795974868
Offset: 0

Views

Author

Philippe Deléham, Mar 21 2014

Keywords

Examples

			Ternary................Decimal
1............................1
11...........................4
101.........................10
1001........................28
10101.......................91
101101.....................280
1010101....................820
10100101..................2440
101010101.................7381
1010110101...............22204
10101010101..............66430
101010010101............199108, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[(-1 + 3^(2 + n) + (-1 + (-1)^n) (-3)^((1 + n)/2))/8, {n, 0, 30}] (* Bruno Berselli, Mar 24 2014 *)
    CoefficientList[Series[1/((x - 1) (3 x - 1) (3 x^2 + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 24 2014 *)
    LinearRecurrence[{4,-6,12,-9},{1,4,10,28},30] (* Harvey P. Dale, Oct 04 2024 *)

Formula

G.f.: 1/((x-1)*(3*x-1)*(3*x^2+1)).
a(n) = Sum{k=0..n} A154957(n,k)*3^k.
a(n) = 4*a(n-1) - 6*a(n-2) + 12*a(n-3) - 9*a(n-4) for n > 3, a(0)=1, a(1)=4, a(2)=10, a(3)=16.
a(2*n) = A002452(n+1); a(2*n+1) = 4*A015251(n+2).
a(n) = ( -1 + 3^(2+n) + (-1+(-1)^n)*(-3)^((1+n)/2) )/8. [Bruno Berselli, Mar 24 2014]
Showing 1-4 of 4 results.