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

A189233 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals upwards, where the e.g.f. of column k is exp(k*(e^x-1)).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 5, 6, 3, 1, 0, 15, 22, 12, 4, 1, 0, 52, 94, 57, 20, 5, 1, 0, 203, 454, 309, 116, 30, 6, 1, 0, 877, 2430, 1866, 756, 205, 42, 7, 1, 0, 4140, 14214, 12351, 5428, 1555, 330, 56, 8, 1, 0, 21147, 89918, 88563, 42356, 12880, 2850, 497, 72, 9, 1
Offset: 0

Views

Author

Peter Luschny, Apr 18 2011

Keywords

Comments

A(n,k) is the n-th moment of a Poisson distribution with mean = k. - Geoffrey Critzer, Dec 23 2018

Examples

			Square array begins:
       A000007 A000110 A001861 A027710 A078944 A144180 A144223 A144263
A000012   1,    1,    1,    1,    1,     1,     1,     1, ...
A001477   0,    1,    2,    3,    4,     5,     6,     7, ...
A002378   0,    2,    6,   12,   20,    30,    42,    56, ...
A033445   0,    5,   22,   57,  116,   205,   330,   497, ...
          0,   15,   94,  309,  756,  1555,  2850,  4809, ...
          0,   52,  454, 1866, 5428, 12880, 26682, 50134, ...
		

Crossrefs

Programs

  • Maple
    # Cf. also the Maple prog. of Alois P. Heinz in A144223 and A144180.
    expnums := proc(k,n) option remember; local j;
    `if`(n = 0, 1, (1+add(binomial(n-1,j-1)*expnums(k,n-j), j = 1..n-1))*k) end:
    A189233_array := (k, n) -> expnums(k,n):
    seq(print(seq(A189233_array(k,n), k = 0..7)), n = 0..5);
    A189233_egf := k -> exp(k*(exp(x)-1));
    T := (n,k) -> n!*coeff(series(A189233_egf(k), x, n+1), x, n):
    seq(lprint(seq(T(n,k), k = 0..7)), n = 0..5):
    # alternative Maple program:
    A:= proc(n, k) option remember; `if`(n=0, 1,
          (1+add(binomial(n-1, j-1)*A(n-j, k), j=1..n-1))*k)
        end:
    seq(seq(A(d-k, k), k=0..d), d=0..12);  # Alois P. Heinz, Sep 25 2017
  • Mathematica
    max = 9; Clear[col]; col[k_] := col[k] = CoefficientList[ Series[ Exp[k*(Exp[x]-1)], {x, 0, max}], x]*Range[0, max]!; a[0, ] = 1; a[n?Positive, 0] = 0; a[n_, k_] := col[k][[n+1]]; Table[ a[n-k, k], {n, 0, max}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 26 2013 *)
    Table[Table[BellB[n, k], {k, 0, 5}], {n, 0, 5}] // Grid  (* Geoffrey Critzer, Dec 23 2018 *)
  • Maxima
    A(n,k):=if k=0 and n=0 then 1 else if k=0 then 0 else  sum(stirling2(n,i)*k^i,i,0,n); /* Vladimir Kruchinin, Apr 12 2019 */

Formula

E.g.f. of column k: exp(k*(e^x-1)).
A(n,1) = A000110(n), A(n, -1) = A000587(n).
A(n,k) = BellPolynomial(n, k). - Geoffrey Critzer, Dec 23 2018
A(n,k) = Sum_{i=0..n} Stirling2(n,i)*k^i. - Vladimir Kruchinin, Apr 12 2019

A340156 Square array read by upward antidiagonals: T(n, k) is the number of n-ary strings of length k containing 00.

Original entry on oeis.org

1, 1, 3, 1, 5, 8, 1, 7, 21, 19, 1, 9, 40, 79, 43, 1, 11, 65, 205, 281, 94, 1, 13, 96, 421, 991, 963, 201, 1, 15, 133, 751, 2569, 4612, 3217, 423, 1, 17, 176, 1219, 5531, 15085, 20905, 10547, 880, 1, 19, 225, 1849, 10513, 39186, 86241, 92935, 34089, 1815
Offset: 2

Views

Author

Robert P. P. McKone, Dec 29 2020

Keywords

Examples

			For n = 3 and k = 4, there are 21 strings: {0000, 0001, 0002, 0010, 0011, 0012, 0020, 0021, 0022, 0100, 0200, 1000, 1001, 1002, 1100, 1200, 2000, 2001, 2002, 2100, 2200}.
Square table T(n,k):
     k=2:  k=3:  k=4:   k=5:    k=6:     k=7:
n=2:   1     3     8     19      43       94
n=3:   1     5    21     79     281      963
n=4:   1     7    40    205     991     4612
n=5:   1     9    65    421    2569    15085
n=6:   1    11    96    751    5531    39186
n=7:   1    13   133   1219   10513    87199
n=8:   1    15   176   1849   18271   173608
n=9:   1    17   225   2665   29681   317817
		

Crossrefs

Cf. A008466 (row 2), A186244 (row 3), A000567 (column 4).
Cf. A180165 (not containing 00), A340242 (containing 000).

Programs

  • Mathematica
    m[r_] := Normal[With[{p = 1/n}, SparseArray[{Band[{1, 2}] -> p, {i_, 1} /; i <= r -> 1 - p, {r + 1, r + 1} -> 1}]]];
    T[n_, k_, r_] := MatrixPower[m[r], k][[1, r + 1]]*n^k;
    Reverse[Table[T[n, k - n + 2, 2], {k, 2, 11}, {n, 2, k}], 2] // Flatten (* Robert P. P. McKone, Jan 26 2021 *)

Formula

T(n, k) = n^k - A180165(n+1,k-1), where A180165 in the number of strings not containing 00.
m(2) = [1 - 1/n, 1/n, 0; 1 - 1/n, 0, 1/n; 0, 0, 1], is the probability/transition matrix for two consecutive "0" -> "containing 00".

A004538 a(n) = 3*n^2 + 3*n - 1.

Original entry on oeis.org

-1, 5, 17, 35, 59, 89, 125, 167, 215, 269, 329, 395, 467, 545, 629, 719, 815, 917, 1025, 1139, 1259, 1385, 1517, 1655, 1799, 1949, 2105, 2267, 2435, 2609, 2789, 2975, 3167, 3365, 3569, 3779, 3995, 4217, 4445
Offset: 0

Views

Author

N. J. A. Sloane, Eric T. Lane (ERICLANE(AT)UTCVM.UTC.EDU)

Keywords

Comments

Numbers k such that (4*k + 7)/3 is a square. - Bruno Berselli, Sep 11 2018

Crossrefs

First differences of A033445.

Programs

  • Magma
    [3*n^2 + 3*n -1: n in [0..50]]; // G. C. Greubel, Sep 10 2018
  • Mathematica
    Table[5*Sum[k^4,{k,1,n}]/Sum[k^2,{k,1,n}], {n,1,20}] (* Alexander Adamchuk, Apr 12 2006 *)
    Table[3n^2+3n-1,{n,0,40}] (* or *) LinearRecurrence[{3,-3,1},{-1,5,17},40] (* Harvey P. Dale, Jan 18 2019 *)
  • PARI
    a(n)=3*n^2+3*n-1 \\ Charles R Greathouse IV, Jun 17 2017
    

Formula

From Alexander Adamchuk, Apr 12 2006: (Start)
a(n) = 5 * Sum_{k=1..n} k^4 / Sum_{k=1..n} k^2, n > 0.
a(n) = 5 * A000538(n) / A000330(n), n > 0. (End)
a(n) = a(n-1) + 6*n with a(0)=-1. - Vincenzo Librandi, Nov 18 2010
From G. C. Greubel, Sep 10 2018: (Start)
G.f.: (-1 + 8*x - x^2)/(1 - x)^3.
E.g.f.: (-1 + 6*x + 3*x^2)*exp(x). (End)
Sum_{n>=0} 1/a(n) = ( psi(1/2+sqrt(21)/6) - psi(1/2-sqrt(21)/6)) /sqrt(21) = -0.6286929... R. J. Mathar, Apr 24 2024

A321960 Array of sequences read by descending antidiagonals, A(n) the Jacobi square of the sequence n, n+1, n+2, ....

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 5, 6, 3, 1, 0, 15, 22, 12, 4, 1, 0, 52, 92, 57, 20, 5, 1, 0, 203, 426, 303, 116, 30, 6, 1, 0, 877, 2146, 1752, 744, 205, 42, 7, 1, 0, 4140, 11624, 10845, 5140, 1535, 330, 56, 8, 1, 0, 21147, 67146, 71139, 37676, 12300, 2820, 497, 72, 9, 1
Offset: 0

Views

Author

Peter Luschny, Dec 27 2018

Keywords

Comments

For definitions and comments see A321964.

Examples

			First few rows of the array start:
[0] 1, 0,  0,   0,    0,     0,      0,       0,        0, ... A000007
[1] 1, 1,  2,   5,   15,    52,    203,     877,     4140, ... A000110
[2] 1, 2,  6,  22,   92,   426,   2146,   11624,    67146, ... A074664
[3] 1, 3, 12,  57,  303,  1752,  10845,   71139,   491064, ... A321959
[4] 1, 4, 20, 116,  744,  5140,  37676,  290224,  2334300, ...
[5] 1, 5, 30, 205, 1535, 12300, 103975,  918785,  8434740, ...
[6] 1, 6, 42, 330, 2820, 25662, 245358, 2443272, 25188870, ...
[7] 1, 7, 56, 497, 4767, 48496, 516761, 5719399, 65369136, ...
Seen as triangle:
[0] 1;
[1] 0,   1;
[2] 0,   1,    1;
[3] 0,   2,    2,    1;
[4] 0,   5,    6,    3,   1;
[5] 0,  15,   22,   12,   4,   1;
[6] 0,  52,   92,   57,  20,   5,  1;
[7] 0, 203,  426,  303, 116,  30,  6, 1;
[8] 0, 877, 2146, 1752, 744, 205, 42, 7, 1;
		

Crossrefs

Rows of array: A000007, A000110, A074664, A321959.
Columns include: A002378, A033445. Row sums of triangle: A321958.
Cf. A321964.

Programs

  • Maple
    # The function JacobiSquare is defined in A321964.
    s := n -> [seq(n+k, k = 0..9)]: Trow := n -> JacobiSquare(s(n)):
    for n from 0 to 7 do lprint(Trow(n)) od;
  • Mathematica
    nmax = 10;
    JacobiCF[a_, b_, p_:2] := Module[{m, k}, m = 1; For[k = Length[a], k >= 1, k--, m = 1 - b[[k]]*x - a[[k]]*x^p/m]; 1/m];
    JacobiSquare[a_, p_: 2] := Module[{cf, ser}, cf = JacobiCF[a, a, p]; ser = Series[cf, {x, 0, Length[a]}]; CoefficientList[ser, x]];
    s[n_] := Table[n + k, {k, 0, nmax}];
    row[n_] := row[n] = JacobiSquare[s[n]];
    T[, 0] = 1; T[0, ] = 0; T[n_, k_] := row[n][[k + 1]];
    Table[T[n - k, k], {n, 0, nmax}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Jul 13 2019, after Peter Luschny in A321964 *)
  • Sage
    def JacobiCF(a, b, dim, p=2):
        m = 1
        for k in range(dim-1, -1, -1):
            m = 1 - b(k)*x - a(k)*x^p/m
        return 1/m
    def JacobiGF(a, b, dim, p=2):
        cf = JacobiCF(a, b, dim, p)
        return cf.series(x, dim).list()
    def JacobiSquare(a, dim, p=2):
        cf = JacobiCF(a, a, dim, p)
        return cf.series(x, dim).list()
    def StieltjesGF(a, dim, p=2):
        return JacobiGF(a, lambda n: 0, dim, p)
    def Trow(n): return JacobiSquare(lambda k: n+k, 10)
    for n in (0..4): print(Trow(n))

Formula

T(n, k) = A(n)[k] where A(n) is the Jacobi square of the sequence s(j) = n + j, j >= 0.

A172176 Triangle T(n, k) = 1 + (n + k - n*k)*(2*n - k - n*(n-k)), read by rows.

Original entry on oeis.org

1, 2, 2, 1, 2, 1, -8, 0, 0, -8, -31, -4, 5, -4, -31, -74, -10, 22, 22, -10, -74, -143, -18, 57, 82, 57, -18, -143, -244, -28, 116, 188, 188, 116, -28, -244, -383, -40, 205, 352, 401, 352, 205, -40, -383, -566, -54, 330, 586, 714, 714, 586, 330, -54, -566
Offset: 0

Views

Author

Roger L. Bagula, Jan 28 2010

Keywords

Examples

			Triangle begins as:
     1;
     2,   2;
     1,   2,   1;
    -8,   0,   0,  -8;
   -31,  -4,   5,  -4,  -31;
   -74, -10,  22,  22,  -10,  -74;
  -143, -18,  57,  82,   57,  -18, -143;
  -244, -28, 116, 188,  188,  116,  -28, -244;
  -383, -40, 205, 352,  401,  352,  205,  -40, -383;
  -566, -54, 330, 586,  714,  714,  586,  330,  -54, -566;
  -799, -70, 497, 902, 1145, 1226, 1145,  902,  497,  -70, -799;
		

Crossrefs

Programs

  • Magma
    [1 + (n-(n-1)*k)*(n-(n-1)*(n-k)): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 26 2022
    
  • Maple
    A172176:= proc(n,m) 1+(n+m-n*m)*(2*n-m-n*(n-m)); end proc:
    seq(seq(A172176(n,m), m=0..n), n=0..12);
  • Mathematica
    T[n_, k_]= 1 + (n-(n-1)*k)*(n-(n-1)*(n-k));
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten
  • SageMath
    def A172176(n,k): return 1 + (n-(n-1)*k)*(n-(n-1)*(n-k))
    flatten([[A172176(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 26 2022

Formula

T(n, k) = 1 + (n-(n-1)*k)*(n-(n-1)*(n-k)).
T(n, n-k) = T(n, k).
T(n, 0) = 1 - A027620(n-3).
T(n, 1) = -A028552(n-3).
T(n, 2) = A033445(n-2).
Sum_{k=0..n} T(n, k) = (n+1)*(n^4 - 9*n^3 + 15*n^2 - n + 6)/6.

A318765 a(n) = (n + 2)*(n^2 + n - 1).

Original entry on oeis.org

-2, 3, 20, 55, 114, 203, 328, 495, 710, 979, 1308, 1703, 2170, 2715, 3344, 4063, 4878, 5795, 6820, 7959, 9218, 10603, 12120, 13775, 15574, 17523, 19628, 21895, 24330, 26939, 29728, 32703, 35870, 39235, 42804, 46583, 50578, 54795, 59240, 63919, 68838, 74003, 79420, 85095
Offset: 0

Views

Author

Bruno Berselli, Sep 04 2018

Keywords

Comments

First differences are in A004538.
a(n) is divisible by 11 for n = 3, 7, 9, 14, 18, 20, 25, 29, 31, 36, 40, ... with formula (1/3)*(11*m + (1 + (m mod 3))*(-1)^((m-1) mod 3) + 8), m >= 0.

Crossrefs

Cf. A004538.
Subsequence of A047216.
Similar sequences (see Table in Links section): A011379, A027444, A033445, A034262, A045991, A069778.

Programs

  • GAP
    List([0..50], n -> (n+2)*(n^2+n-1));
    
  • Julia
    [(n+2)*(n^2+n-1) for n in 0:50] |> println
  • Magma
    [(n+2)*(n^2+n-1): n in [0..50]];
    
  • Maple
    seq((n+2)*(n^2+n-1),n=0..43); # Paolo P. Lava, Sep 04 2018
  • Mathematica
    Table[(n + 2) (n^2 + n - 1), {n, 0, 50}]
  • Maxima
    makelist((n+2)*(n^2+n-1), n, 0, 50);
    
  • PARI
    vector(50, n, n--; (n+2)*(n^2+n-1))
    
  • Python
    [(n+2)*(n**2+n-1) for n in range(50)]
    
  • Sage
    [(n+2)*(n^2+n-1) for n in (0..50)]
    

Formula

O.g.f.: (-2 + 11*x - 4*x^2 + x^3)/(1 - x)^4.
E.g.f.: (-2 + 5*x + 6*x^2 + x^3)*exp(x).
a(n) = -A033445(-n-1).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n >= 5. - Wesley Ivan Hurt, Dec 18 2020
Showing 1-6 of 6 results.