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-2 of 2 results.

A123217 Triangle read by rows: the n-th row consists of the coefficients in the expansion of Sum_{j=0..n} A123162(n,j)*x^j*(1 - x)^(n - j).

Original entry on oeis.org

1, 1, 1, 1, -1, 1, 2, 3, -5, 1, 3, 20, -32, 9, 1, 4, 58, -82, 5, 15, 1, 5, 125, -108, -161, 170, -31, 1, 6, 229, 17, -797, 603, 7, -65, 1, 7, 378, 532, -2210, 664, 1468, -968, 129, 1, 8, 580, 1820, -4226, -2846, 8788, -4388, 9, 255, 1, 9, 843, 4440, -5262
Offset: 0

Views

Author

Roger L. Bagula, Oct 04 2006

Keywords

Examples

			Triangle begins:
  1;
  1;
  1, 1,  -1;
  1, 2,   3,   -5;
  1, 3,  20,  -32,     9;
  1, 4,  58,  -82,     5,    15;
  1, 6, 229,   17,  -797,   603,    7,   -65;
  1, 7, 378,  532, -2210,   664, 1468,  -968, 129;
  1, 8, 580, 1820, -4226, -2846, 8788, -4388,   9, 255;
  ... reformatted and extended. - _Franck Maminirina Ramaharo_, Oct 10 2018
		

Crossrefs

Programs

  • Mathematica
    t[n_, k_]= If[k==0, 1, Binomial[2*n-1, 2*k-1]];
    p[n_,x_]:= p[n,x]= Sum[t[n,j]*x^j*(1-x)^(n-j), {j,0,n}];
    Table[CoefficientList[p[n,x], x], {n, 0, 10}]//Flatten
  • Maxima
    A123162(n, k) := if n = 0 and k = 0 or k = 0 then 1 else binomial(2*n - 1, 2*k - 1)$
    P(x, n) := expand(sum(A123162(n, j)*x^j*(1 - x)^(n - j), j, 0, n))$
    T(n, k) := ratcoef(P(x, n), x, k)$
    tabf(nn) := for n:0 thru nn do print(makelist(T(n, k), k, 0, hipow(P(x, n), x)))$ /* Franck Maminirina Ramaharo, Oct 10 2018 */
    
  • Sage
    def b(n,k): return 1 if (k==0) else binomial(2*n-1, 2*k-1)
    def p(n,x): return sum( b(n,j)*x^j*(1-x)^(n-j) for j in (0..n) )
    def T(n): return ( p(n,x) ).full_simplify().coefficients(sparse=False)
    [T(n) for n in (0..12)] # G. C. Greubel, Jul 15 2021

Formula

From Franck Maminirina Ramaharo, Oct 10 2018: (Start)
Row n = coefficients in the expansion of (1-x)^n + x*((1 - 2*sqrt((1-x)*x))^n*(1 - x + sqrt((1-x)*x)) - (1-x - sqrt((1-x)*x))*(1 + 2*sqrt((1-x)*x))^n)/(2*sqrt((1 - x)*x)*(2*x-1)).
G.f.: (1 - (2 - x)*y + (1 - 4*x + 3*x^2)*y^2 - (x - 3*x^2 + 2*x^3)*y^3)/(1 - (3 - x)*y + (3 - 6*x + 4*x^2)*y^2 - (1 - 5*x + 8*x^2 - 4*x^3)*y^3).
E.g.f.: exp((1 - x)*y) + x*((1 - x + sqrt((1 - x)*x))*exp((1 - 2*sqrt((1 - x)*x))*y) - (1 - x - sqrt((1 - x)*x))*exp((1 + 2*sqrt((1 - x)*x))*y))/(2*(2*x - 1)*sqrt((1 - x)*x)) - (1 - 3*x)/(1 - 2*x) + 1. (End)

Extensions

Edited, new name, and offset corrected by Franck Maminirina Ramaharo, Oct 11 2018

A123166 Row sums of A123162.

Original entry on oeis.org

1, 2, 5, 17, 65, 257, 1025, 4097, 16385, 65537, 262145, 1048577, 4194305, 16777217, 67108865, 268435457, 1073741825, 4294967297, 17179869185, 68719476737, 274877906945, 1099511627777, 4398046511105, 17592186044417, 70368744177665, 281474976710657, 1125899906842625, 4503599627370497, 18014398509481985
Offset: 0

Views

Author

Roger L. Bagula, Oct 02 2006

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [4^(n-1) +1: n in [1..40]]; // G. C. Greubel, May 31 2022
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=4*a[n-1] od: seq(a[n]+sum((k), k=0..1), n=0..20); # Zerinvary Lajos, Mar 20 2008
  • Mathematica
    A123162[n_, k_]= If [k==0, 1, Binomial[2*n-1, 2*k-1]];
    Table[Sum[A123162[n, k], {k,0,n}], {n,0,30}]
    Table[4^(n-1) +1 -Boole[n==0]/4, {n,0,40}] (* G. C. Greubel, May 31 2022 *)
  • SageMath
    [4^(n-1) +1 -bool(n==0)/4 for n in (0..40)] # G. C. Greubel, May 31 2022

Formula

a(n) = 1 + Sum_{k=0..n} binomial(2*n-1, 2*k-1), for n > 0. - Paul Barry, May 26 2008
a(n) = A052539(n-1), n > 0. - R. J. Mathar, Jun 18 2008
From Sergei N. Gladkovskii, Dec 20 2011: (Start)
G.f.: (1 - 3*x - x^2)/((1-x)*(1-4*x)).
E.g.f.: (exp(4*x) + 4*exp(x) - 1)/4 = (G(0) - 1)/4; G(k) = 1 + 4/(4^k-x*16^k/(x*4^k+(k+1)/G(k+1))); (continued fraction). (End)

Extensions

Edited by N. J. A. Sloane, Oct 04 2006
Showing 1-2 of 2 results.