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

A091597 Triangle read by rows: T(n,0) = A001045(n+1), T(n,n)=1, T(n,m) = T(n-1,m-1) + T(n-1,m).

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 5, 5, 3, 1, 11, 10, 8, 4, 1, 21, 21, 18, 12, 5, 1, 43, 42, 39, 30, 17, 6, 1, 85, 85, 81, 69, 47, 23, 7, 1, 171, 170, 166, 150, 116, 70, 30, 8, 1, 341, 341, 336, 316, 266, 186, 100, 38, 9, 1, 683, 682, 677, 652, 582, 452, 286, 138, 47, 10, 1
Offset: 0

Views

Author

Paul Barry, Jan 23 2004

Keywords

Comments

A Jacobsthal-Pascal triangle.
Equals triangle M * Pascal's triangle, M = an infinite lower triangular Toeplitz matrix with A078008: [1, 0, 2, 2, 6, 10, 22, 42, ...] in every column. - Gary W. Adamson, May 25 2009

Examples

			Triangle begins as:
    1;
    1,   1;
    3,   2,   1;
    5,   5,   3,   1;
   11,  10,   8,   4,   1;
   21,  21,  18,  12,   5,   1;
   43,  42,  39,  30,  17,   6,   1;
   85,  85,  81,  69,  47,  23,   7,  1;
  171, 170, 166, 150, 116,  70,  30,  8, 1;
  341, 341, 336, 316, 266, 186, 100, 38, 9, 1;
		

Crossrefs

Columns include A001045, A000975, A011377.
Row sums are A059570.
Cf. A078008. - Gary W. Adamson, May 25 2009

Programs

  • GAP
    Flat(List([0..12], n->List([0..n], k-> Sum([0..n], j-> 2^j*Binomial(n-j, k+j)) ))); # G. C. Greubel, Jun 04 2019
  • Magma
    [[(&+[2^j*Binomial(n-j, k+j): j in [0..n]]): k in [0..n]]: n in [0..12]]; // G. C. Greubel, Jun 04 2019
    
  • Maple
    A091597 := proc(n,k)
        if k = 0 then
            A001045(n+1) ;
        elif k = n then
            1 ;
        elif k <0 or k > n then
            0 ;
        else
            procname(n-1,k-1)+procname(n-1,k) ;
        end if;
    end proc: # R. J. Mathar, Oct 05 2012
  • Mathematica
    Table[Sum[Binomial[n-j, k+j]*2^j, {j,0,n}], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 04 2019 *)
  • PARI
    {T(n,k) = sum(j=0, n, 2^j*binomial(n-j, k+j))}; \\ G. C. Greubel, Jun 04 2019
    
  • Sage
    [[sum(2^j*binomial(n-j, k+j) for j in (0..n)) for k in (0..n)] for n in [0..12]] # G. C. Greubel, Jun 04 2019
    

Formula

Number triangle: T(n, k) = Sum_{j=0..n} binomial(n-j, k+j)2^j.
Riordan array: (1/(1-x-2*x^2), x/(1-x)).
k-th column has g.f. (1/(1-x-2*x^2))*(x/(1-x))^k.
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) + T(n-2,k) - T(n-2,k-1) - 2*T(n-3,k) - 2*T(n-3,k-1), T(0,0)=T(1,0)=T(1,1)=T(2,2)=1, T(2,0)=3, T(2,1)=2, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Jan 11 2014

A128255 A114219(signed) * A007318.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 2, 6, 5, 1, 3, 10, 13, 7, 1, 3, 15, 27, 23, 9, 1, 4, 21, 48, 57, 36, 1, 4, 28, 78, 118, 104, 52, 13, 1, 5, 36, 118, 218, 246, 172, 71, 15, 1, 5, 45, 170, 370, 510, 458, 265, 93, 17, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 20 2007

Keywords

Comments

Row sums = A059570: (1, 2, 6, 14, 34, 78, 178,...).

Examples

			First few rows of the triangle are:
1;
1, 1;
2, 3, 1;
2, 6, 5, 1;
3, 10, 13, 7, 1;
3, 15, 27, 23, 9, 1;
4, 21, 48, 57, 36, 11, 1;
...
		

Crossrefs

Formula

Let the signed version of A114219 {1; 0,1; 0,1,1; 0,-1,2,1; 0,1,-2,-3,4;...} = M; and P = Pascal's triangle, A007318. Then A128255 = A114219(signed) * A007318.

A284942 Expansion of Sum_{k>=1} mu(k)^2*x^k*(1 - x)^2/(1 - 2*x)^2, where mu() is the Moebius function (A008683).

Original entry on oeis.org

1, 3, 8, 19, 46, 107, 244, 547, 1213, 2665, 5807, 12567, 27042, 57899, 123428, 262115, 554750, 1170538, 2463154, 5170462, 10829234, 22635087, 47223412, 98353299, 204519549, 424665001, 880581806, 1823667221, 3772341661, 7794697759, 16089424392, 33178906531, 68357928558
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 06 2017

Keywords

Comments

Total number of squarefree parts in all compositions (ordered partitions) of n.

Examples

			a(4) = 19 because we have [4], [3, 1], [2, 2], [2, 1, 1], [1, 3], [1, 2, 1], [1, 1, 2], [1, 1, 1, 1] and 0 + 2 + 2 + 3 + 2 + 3 + 3 + 4 = 19.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; add(`if`(numtheory[
          issqrfree](j), ceil(2^(n-j-1)), 0)+a(n-j), j=1..n)
        end:
    seq(a(n), n=1..33);  # Alois P. Heinz, Aug 07 2019
  • Mathematica
    nmax = 33; Rest[CoefficientList[Series[Sum[MoebiusMu[k]^2 x^k (1 - x)^2/(1 - 2 x)^2, {k, 1, nmax}], {x, 0, nmax}], x]]
  • PARI
    x='x+O('x^34); Vec(sum(k=1, 34, moebius(k) ^2*x^k*(1 - x)^2/(1 - 2*x)^2)) \\ Indranil Ghosh, Apr 06 2017

Formula

G.f.: Sum_{k>=1} mu(k)^2*x^k*(1 - x)^2/(1 - 2*x)^2.

A284943 Expansion of Sum_{p prime, k>=1} x^(p^k)*(1 - x)^2/(1 - 2*x)^2.

Original entry on oeis.org

0, 1, 3, 8, 20, 47, 110, 251, 564, 1251, 2750, 5994, 12978, 27934, 59825, 127565, 270959, 573575, 1210466, 2547562, 5348385, 11203292, 23419629, 48865346, 101782870, 211670094, 439548898, 911515214, 1887865266, 3905400206, 8070139762, 16658958223, 34355273843
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 06 2017

Keywords

Comments

Total number of prime power parts (1 excluded) in all compositions (ordered partitions) of n.

Examples

			a(5) = 20 because we have [5], [4, 1], [3, 2], [3, 1, 1], [2, 3], [2, 2, 1], [2, 1, 2], [2, 1, 1, 1], [1, 4], [1, 3, 1], [1, 2, 2], [1, 2, 1, 1], [1, 1, 3], [1, 1, 2, 1], [1, 1, 1, 2], [1, 1, 1, 1, 1] and 1 + 1 + 2 + 1 + 2 + 2 + 2 + 1 + 1 + 1 + 2 + 1 + 1 + 1 + 1 + 0 = 20.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; nops(ifactors(n)[2])=1 end:
    a:= proc(n) option remember; `if`(n=0, 0, add(a(n-j)+
          `if`(b(j), ceil(2^(n-j-1)), 0), j=1..n))
        end:
    seq(a(n), n=1..33);  # Alois P. Heinz, Aug 07 2019
  • Mathematica
    nmax = 33; Rest[CoefficientList[Series[Sum[Floor[1/PrimeNu[k]] x^k (1 - x)^2/(1 - 2 x)^2, {k, 2, nmax}], {x, 0, nmax}], x]]
  • PARI
    x='x+O('x^34); concat([0], Vec(sum(k=2, 34, (1\omega(k))*x^k*(1 - x)^2/(1 - 2*x)^2))) \\ Indranil Ghosh, Apr 06 2017

Formula

G.f.: Sum_{p prime, k>=1} x^(p^k)*(1 - x)^2/(1 - 2*x)^2.

A102289 Total number of odd lists in all sets of lists, cf. A000262.

Original entry on oeis.org

0, 1, 2, 15, 76, 665, 5286, 56287, 597080, 7601841, 99702730, 1484554511, 23049638052, 393702612745, 7036703742446, 135702811542495, 2737989749177776, 58848546456947297, 1321063959370833810, 31310238786268648591, 773291778432688011260, 20031956775840631151481
Offset: 0

Views

Author

Vladeta Jovovic, Feb 19 2005

Keywords

Crossrefs

Programs

  • Maple
    G:=(x/(1-x^2))*exp(x/(1-x)): Gser:=series(G,x=0,25): seq(n!*coeff(Gser,x^n),n=1..22); # Emeric Deutsch
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0], add(
          (p-> p+`if`(j::odd, [0, p[1]], 0))(b(n-j)*
            binomial(n-1, j-1)*j!), j=1..n))
        end:
    a:= n-> b(n, 0)[2]:
    seq(a(n), n=0..25);  # Alois P. Heinz, May 10 2016
  • Mathematica
    Rest[CoefficientList[Series[x/(1-x^2)*E^(x/(1-x)), {x, 0, 20}], x]* Range[0, 20]!] (* Vaclav Kotesovec, Sep 29 2013 *)
    nxt[{n_,a_,b_,c_}]:={n+1,b,c,(n+1)*c+(n+1)^2*b-(n-1)^2 (n+1)*a}; NestList[ nxt,{2,0,1,2},30][[All,2]] (* Harvey P. Dale, Jan 13 2019 *)

Formula

E.g.f.: x/(1-x^2)*exp(x/(1-x)).
a(n) = n*a(n-1) + n^2*a(n-2) - (n-2)^2*n*a(n-3). - Vaclav Kotesovec, Sep 29 2013
a(n) ~ sqrt(2)/4 * n^(n+1/4)*exp(2*sqrt(n)-n-1/2) * (1 + 7/(48*sqrt(n))). - Vaclav Kotesovec, Sep 29 2013

Extensions

More terms from Emeric Deutsch, Jun 24 2005
a(0)=0 pepended by Alois P. Heinz, May 10 2016

A102290 Total number of even lists in all sets of lists, cf. A000262.

Original entry on oeis.org

0, 0, 2, 6, 60, 380, 3990, 37002, 450296, 5373720, 76018410, 1096730030, 17814654132, 299645294676, 5511836578430, 105550556136690, 2171244984679920, 46545825736022192, 1059273836225051346, 25100215228045842390, 626204775725372971820, 16239127347086448236460
Offset: 0

Views

Author

Vladeta Jovovic, Feb 19 2005

Keywords

Crossrefs

Programs

  • Magma
    l:= func< n,b | Evaluate(LaguerrePolynomial(n), b) >;
    [0,0]cat[Factorial(n)*(&+[(-1)^(n+j)*l(j,-1): j in [0..n-2]]): n in [2..30]]; // G. C. Greubel, Mar 09 2021
  • Maple
    Gser:=series(x^2*exp(x/(1-x))/(1-x^2),x=0,22):seq(n!*coeff(Gser,x^n),n=1..21); # Emeric Deutsch
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0], add(
          (p-> p+`if`(j::even, [0, p[1]], 0))(b(n-j)*
            binomial(n-1, j-1)*j!), j=1..n))
        end:
    a:= n-> b(n, 0)[2]:
    seq(a(n), n=0..25);  # Alois P. Heinz, May 10 2016
  • Mathematica
    Rest[CoefficientList[Series[x^2/(1-x^2)*E^(x/(1-x)), {x, 0, 20}], x]* Range[0, 20]!] (* Vaclav Kotesovec, Sep 29 2013 *)
    Table[If[n<2, 0, n!*Sum[(-1)^(n-j)*LaguerreL[j, -1], {j,0,n-2}]], {n,0,30}] (* G. C. Greubel, Mar 09 2021 *)
  • Sage
    [0,0]+[factorial(n)*sum((-1)^(n+j)*gen_laguerre(j,0,-1) for j in (0..n-2)) for n in (2..30)] # G. C. Greubel, Mar 09 2021
    

Formula

E.g.f.: x^2/(1-x^2)*exp(x/(1-x)).
Recurrence: (n-2)*a(n) = (n-2)*n*a(n-1) + (n-1)^2*n*a(n-2) - (n-3)*(n-2)*(n-1)*n*a(n-3). - Vaclav Kotesovec, Sep 29 2013
a(n) ~ sqrt(2)/4 * n^(n+1/4)*exp(2*sqrt(n)-n-1/2) * (1 - 41/(48*sqrt(n))). - Vaclav Kotesovec, Sep 29 2013
a(n) = n! * Sum_{j=0..n-2} (-1)^(n+j)*LaguerreL(j, -1) for n>1 with a(0)=a(1)=0. - G. C. Greubel, Mar 09 2021

Extensions

More terms from Emeric Deutsch, Mar 27 2005
a(0)=0 prepended by Alois P. Heinz, May 10 2016

A275434 Sum of the degrees of asymmetry of all compositions of n.

Original entry on oeis.org

0, 0, 0, 2, 4, 12, 28, 68, 156, 356, 796, 1764, 3868, 8420, 18204, 39140, 83740, 178404, 378652, 800996, 1689372, 3553508, 7456540, 15612132, 32622364, 68040932, 141674268, 294533348, 611436316, 1267611876, 2624702236, 5428361444, 11214636828
Offset: 0

Views

Author

Emeric Deutsch, Jul 29 2016

Keywords

Comments

The degree of asymmetry of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the degree of asymmetry of (2,7,6,4,5,7,3) is 2, counting the pairs (2,3) and (6,5).
A sequence is palindromic if and only if its degree of asymmetry is 0.

Examples

			a(4) = 4 because the compositions 4, 13, 22, 31, 112, 121, 211, 1111 have degrees of asymmetry 0, 1, 0, 1, 1, 0, 1, 0, respectively.
		

Crossrefs

Programs

  • Maple
    g := 2*z^3*(1-z)/((1-2*z)*(1-z-2*z^2)): gser := series(g, z = 0, 35): seq(coeff(gser, z, n), n = 0 .. 32);
    a := proc(n) if n = 0 then 0 elif n = 1 then 0 else -(4/9)*(-1)^n+(1/36)*(3*n-2)*2^n end if end proc: seq(a(n), n = 0 .. 32);
  • Mathematica
    b[n_, i_] := b[n, i] = Expand[If[n==0, 1, Sum[b[n - j, If[i==0, j, 0]] If[i > 0 && i != j, x, 1], {j, 1, n}]]];
    a[n_] := Function[p, Sum[i Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n, 0]];
    a /@ Range[0, 32] (* Jean-François Alcover, Nov 24 2020, after Alois P. Heinz in A275433 *)

Formula

G.f.: g(z) = 2*z^3*(1-z)/((1-2*z)*(1-z-2*z^2)). In the more general situation of compositions into a[1]=1} z^(a[j]), we have g(z) = (F(z)^2 - F(z^2))/((1+F(z))*(1-F(z))^2).
a(n) = -(4/9)*(-1)^n + (3*n - 2)*2^n/36 for n>=2; a(0) = a(1) = 0.
a(n) = Sum_{k>=0} k*A275433(n,k).
a(n) = 2*A059570(n-2) for n>=3. - Alois P. Heinz, Jul 29 2016

A366987 Triangle read by rows: T(n, k) = -(2^(n - k)*(-1)^n + 2^k + (-1)^k)/3.

Original entry on oeis.org

-1, 0, 0, -2, -1, -2, 2, 1, -1, -2, -6, -3, -3, -3, -6, 10, 5, 1, -1, -5, -10, -22, -11, -7, -5, -7, -11, -22, 42, 21, 9, 3, -3, -9, -21, -42, -86, -43, -23, -13, -11, -13, -23, -43, -86, 170, 85, 41, 19, 5, -5, -19, -41, -85, -170, -342, -171, -87, -45, -27, -21, -27, -45, -87, -171, -342
Offset: 0

Views

Author

Paul Curtz and Thomas Scheuerle, Oct 31 2023

Keywords

Examples

			Triangle T(n, k) starts:
   -1
    0   0
   -2  -1  -2
    2   1  -1  -2
   -6  -3  -3  -3  -6
   10   5   1  -1  -5 -10
  -22 -11  -7  -5  -7 -11 -22
   42  21   9   3  -3  -9 -21 -42
   ...
Note the symmetrical distribution of the absolute values of the terms in each row.
		

Crossrefs

Rows sums: -A282577(n+2), if the conjectures from Colin Barker in A282577 are true.
First column: -(-1)^n * A078008(n).
Second column: (-1)^n * A001045(n).
Third column: -A140966(n).
Fourth column: (-1)^n * A155980(n+2).

Programs

  • Maple
    T := (n, k) -> -(2^(n-k)*(-1)^n + 2^k + (-1)^k)/3:
    seq(seq(T(n, k), k = 0..n), n = 0..10);  # Peter Luschny, Nov 02 2023
  • Mathematica
    A366987row[n_]:=Table[-(2^(n-k)(-1)^n+2^k+(-1)^k)/3,{k,0,n}];Array[A366987row,15,0] (* Paolo Xausa, Nov 07 2023 *)
  • PARI
    T(n, k) = (-2^(k+1) + 2*(-1)^(k+1) + (-1)^(n+1)*2^(1+n-k))/6 \\ Thomas Scheuerle, Nov 01 2023

Formula

T(n, 0) = -((-2)^n + 2)/3.
T(n, k+1) - T(n, k) = T(n-1, k) + (-1)^k.
T(2*n+1, n) = A001045(n).
T(2*n+1, n+1) = -A001045(n).
T(2*n, n+1) = -A048573(n-1), for n > 0.
Note that the definition of T extends to negative parameters:
T(2*n-2, n-1) = -A001045(n).
-2^n*Sum_{k=0..n} (-1)^k*T(-n, -k) = A059570(n+1).
-4^n*Sum_{k=0..2*n} T(-2*n, -k) = A020989(n).
-Sum_{k=0..n} (-1)^k*T(n, k) = A077898(n). See also A053088.
Sum_{k = 0..2*n} |T(2*n, k)| = (4^(n+1) - 1)/3.
Sum_{k = 0..2*n+1} |T(2*n+1, k)| = (1 + (-1)^n - 2^(2 + n) + 2^(1 + 2*n))/3.
G.f.: (-1 - x + x*y)/((1 - x)*(1 + 2*x)*(1 + x*y)*(1 - 2*x*y)). - Stefano Spezia, Nov 03 2023

Extensions

a(42) corrected by Paolo Xausa, Nov 07 2023
Previous Showing 21-28 of 28 results.