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

A361682 Array read by descending antidiagonals. A(n, k) is the number of multiset combinations of {0, 1} whose type is defined in the comments. Also A(n, k) = hypergeom([-k, -2], [1], n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 5, 1, 1, 10, 13, 7, 1, 1, 15, 25, 22, 9, 1, 1, 21, 41, 46, 33, 11, 1, 1, 28, 61, 79, 73, 46, 13, 1, 1, 36, 85, 121, 129, 106, 61, 15, 1, 1, 45, 113, 172, 201, 191, 145, 78, 17, 1, 1, 55, 145, 232, 289, 301, 265, 190, 97, 19, 1
Offset: 0

Views

Author

Peter Luschny, Mar 21 2023

Keywords

Comments

A combination of a multiset M is an unordered selection of k objects of M, where every object can appear at most as many times as it appears in M.
A(n, k) = Cardinality(Union_{j=0..k} Combination(MultiSet(1^[j*n], 0^[(k-j)*n]))), where MultiSet(r^[s], u^[v]) denotes a set that contains the element r with multiplicity s and the element u with multiplicity v; thus the multisets under consideration have n*k elements. Since the base set is {1, 0} the elements can be represented as binary strings. Applying the combination operator to the multisets results in a set of binary strings where '0' resp. '1' can appear at most j*n resp. (k-j)*n times. 'At most' means that they do not have to appear; in other words, the resulting set always includes the empty string ''.
In contrast to the procedure in A361045 we consider here the cardinality of the set union and not the sum of the individual cardinalities. If you want to exclude the empty string, you will find the sequences listed in A361521. The same construction with multiset permutations instead of multiset combinations results in A361043.
A different view can be taken if one considers the hypergeometric representation, hypergeom([-k, -m], [1], n). This is a family of arrays that includes the 'rascal' triangle: the all 1's array A000012 (m = 0), the rascal array A077028 (m = 1), this array (m = 2), and A361731 (m = 3).

Examples

			Array A(n, k) starts:
   [0] 1,  1,   1,    1,   1,   1,   1,    1, ...  A000012
   [1] 1,  3,   6,   10,  15,  21,  28,   36, ...  A000217
   [2] 1,  5,  13,   25,  41,  61,  85,  113, ...  A001844
   [3] 1,  7,  22,   46,  79, 121, 172,  232, ...  A038764
   [4] 1,  9,  33,   73, 129, 201, 289,  393, ...  A081585
   [5] 1, 11,  46,  106, 191, 301, 436,  596, ...  A081587
   [6] 1, 13,  61,  145, 265, 421, 613,  841, ...  A081589
   [7] 1, 15,  78,  190, 351, 561, 820, 1128, ...  A081591
   000012  | A028872 | A239325 |
       A005408    A100536   A069133
.
Triangle T(n, k) starts:
   [0] 1;
   [1] 1,  1;
   [2] 1,  3,   1;
   [3] 1,  6,   5,   1;
   [4] 1, 10,  13,   7,   1;
   [5] 1, 15,  25,  22,   9,   1;
   [6] 1, 21,  41,  46,  33,  11,   1;
   [7] 1, 28,  61,  79,  73,  46,  13,  1;
   [8] 1, 36,  85, 121, 129, 106,  61, 15,  1;
   [9] 1, 45, 113, 172, 201, 191, 145, 78, 17, 1.
.
Row 4 of the triangle:
A(0, 4) =  1 = card('').
A(1, 3) = 10 = card('', 0, 00, 000, 1, 10, 100, 11, 110, 111).
A(2, 2) = 13 = card('', 0, 00, 000, 0000, 1, 10, 100, 11, 110, 1100, 111, 1111).
A(3, 1) =  7 = card('', 0, 00, 000, 1, 11, 111).
A(4, 0) =  1 = card('').
		

Crossrefs

Cf. A239592 (main diagonal), A239331 (transposed array).

Programs

  • Maple
    A := (n, k) -> 1 + n*k*(4 + n*(k - 1))/2:
    for n from 0 to 7 do seq(A(n, k), k = 0..7) od;
    # Alternative:
    ogf := n -> (1 + (n - 1)*x)^2 / (1 - x)^3:
    ser := n -> series(ogf(n), x, 12):
    row := n -> seq(coeff(ser(n), x, k), k = 0..9):
    seq(print(row(n)), n = 0..7);
  • SageMath
    def A(m: int, steps: int) -> int:
        if m == 0: return 1
        size = m * steps
        cset = set()
        for a in range(0, size + 1, m):
            S = [str(int(i < a)) for i in range(size)]
            C = Combinations(S)
            cset.update("".join(i for i in c) for c in C)
        return len(cset)
    def ARow(n: int, size: int) -> list[int]:
        return [A(n, k) for k in range(size + 1)]
    for n in range(8): print(ARow(n, 7))

Formula

A(n, k) = 1 + n*k*(4 + n*(k - 1))/2.
T(n, k) = 1 + k*(n - k)*(4 + k*(n - k - 1))/2.
A(n, k) = [x^k] (1 + (n - 1)*x)^2 / (1 - x)^3.
A(n, k) = hypergeom([-k, -2], [1], n).
A(n, k) = A361521(n, k) + 1.

A039824 Number of different coefficient values in expansion of Product (1+q^1+q^3...+q^(2i-1)), i=1 to n.

Original entry on oeis.org

1, 2, 4, 11, 20, 31, 46, 61, 78, 97, 118, 141, 166, 193, 222, 253, 286, 321, 358, 397, 438, 481, 526, 573, 622, 673, 726, 781, 838, 897, 958, 1021, 1086, 1153, 1222, 1293, 1366, 1441, 1518, 1597, 1678, 1761, 1846, 1933, 2022, 2113, 2206, 2301, 2398, 2497
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A028872.

Programs

  • Mathematica
    p[1] = 1 + q; p[n_] := p[n] = p[n - 1] (1 + Sum[q^k, {k, 1, 2 n - 1, 2}]) // Expand; a[1] = 1; a[n_] := p[n] // CoefficientList[#, q]& // Union // Length; Array[a, 180] (* Jean-François Alcover, May 04 2017 *)
  • Python
    def get(d, x): return d[x] if len(d) > x >= 0 else 0
    def convolve(a, b):
        r = []
        for x in range(len(a) + len(b) - 1):
            n = 0
            for k in range(x + 1): n += get(a, k) * get(b, x - k)
            r.append(n)
        return r
    def unique_in(d):
        out = list([])
        for elem in d:
            if elem not in out: out.append(elem)
        return len(out)
    def A039824(x):
        seed = [0**k + k % 2 for k in range(2*(x+1))]
        product = seed[0:2]
        out = list([1])
        for k in range(2, x + 1):
            product = convolve(product, seed[0:2*k])
            out.append(unique_in(product))
        return out
    # J. Conrad, May 02 2017

Formula

Conjecture: for n>6, a(n) = n^2 - 3. - Ralf Stephan, Mar 07 2004
Conjectures from Colin Barker, May 02 2017: (Start)
G.f.: x*(1 - x + x^2 + 4*x^3 - 3*x^4 + 2*x^6 - 4*x^7 + 2*x^8) / (1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>9.
(End)

A110292 Riordan array (1-u, u) where u=(-1 + sqrt(1+8*x))/4.

Original entry on oeis.org

1, -1, 1, 2, -3, 1, -8, 12, -5, 1, 40, -60, 26, -7, 1, -224, 336, -148, 44, -9, 1, 1344, -2016, 896, -280, 66, -11, 1, -8448, 12672, -5664, 1824, -464, 92, -13, 1, 54912, -82368, 36960, -12144, 3240, -708, 122, -15, 1, -366080, 549120, -247104, 82368, -22704, 5280, -1020, 156, -17, 1
Offset: 0

Views

Author

Paul Barry, Jul 18 2005

Keywords

Comments

Inverse of Riordan array (1/(1-x), x*(1+2*x)), A110291.

Examples

			Triangle begins as:
      1;
     -1,      1;
      2,     -3,     1;
     -8,     12,    -5,      1;
     40,    -60,    26,     -7,    1;
   -224,    336,  -148,     44,   -9,    1;
   1344,  -2016,   896,   -280,   66,  -11,   1;
  -8448,  12672, -5664,   1824, -464,   92, -13,   1;
  54912, -82368, 36960, -12144, 3240, -708, 122, -15,  1;
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 30);
    F:= func< k | Coefficients(R!( (5-Sqrt(1+8*x))*(-1+Sqrt(1+8*x) )^k/4^(k+1) )) >;
    A110292:= func< n,k | F(k)[n-k+1] >;
    [A110292(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Jan 04 2023
    
  • Mathematica
    F[k_]:= CoefficientList[Series[(5-Sqrt[1+8*x])*(-1+Sqrt[1+8*x])^k/4^(k +1), {x,0,20}], x];
    A110292[n_, k_]:= F[k][[n+1]];
    Table[A110292[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 04 2023 *)
  • SageMath
    def p(k,x): return (5-sqrt(1+8*x))*(-1+sqrt(1+8*x))^k/4^(k+1)
    def A110292(n,k): return ( p(k,x) ).series(x, 30).list()[n]
    flatten([[A110292(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jan 04 2023

Formula

T(n, 0) = (-1)^n * 2^(n-1) * Catalan(n-1) + (3/2)*[n=0].
From G. C. Greubel, Jan 04 2023: (Start)
T(n, n) = 1.
T(n, n-1) = 1-2*n.
T(n, n-2) = 2*A028872(n).
T(n, 1) = (-1)^(n-1) * A181282(n-1), n >= 1.
Sum_{k=0..n} T(n, k) = A000007(n). (End)

A214859 Triangle read by rows, T(n,k) = n^2 - k*(k+1)/2 if k*(k+1)/2 <= n^2.

Original entry on oeis.org

0, 1, 0, 4, 3, 1, 9, 8, 6, 3, 16, 15, 13, 10, 6, 1, 25, 24, 22, 19, 15, 10, 4, 36, 35, 33, 30, 26, 21, 15, 8, 0, 49, 48, 46, 43, 39, 34, 28, 21, 13, 4, 64, 63, 61, 58, 54, 49, 43, 36, 28, 19, 9, 81, 80, 78, 75, 71, 66, 60, 53, 45, 36, 26, 15, 3, 100, 99, 97
Offset: 0

Views

Author

Philippe Deléham, Mar 09 2013

Keywords

Comments

Row lengths are in A214857.

Examples

			Triangle begins:
    0;
    1,   0;
    4,   3,   1;
    9,   8,   6,   3;
   16,  15,  13,  10,   6,   1;
   25,  24,  22,  19,  15,  10,   4;
   36,  35,  33,  30,  26,  21,  15,  8,  0;
   49,  48,  46,  43,  39,  34,  28, 21, 13,  4;
   64,  63,  61,  58,  54,  49,  43, 36, 28, 19,  9;
   81,  80,  78,  75,  71,  66,  60, 53, 45, 36, 26, 15,  3;
  100,  99,  97,  94,  90,  85,  79, 72, 64, 55, 45, 34, 22,  9;
  121, 120, 118, 115, 111, 106, 100, 93, 85, 76, 66, 55, 43, 30, 16, 1;
  ...
		

Crossrefs

Cf. Diagonals: A000217, A034856, A055999,

Programs

  • Mathematica
    Table[s = {}; k = 0; While[tri = k*(k + 1)/2; tri <= n^2, AppendTo[s, n^2 - tri]; k++]; s, {n, 0, 10}] (* T. D. Noe, Mar 11 2013 *)

Formula

T(2*n,n) = A022264(n).
T(n,n) = n*(n-1)/2 = A000217(n-1).

A239331 Square array, read by antidiagonals: column k has g.f. (1+(k-1)*x)^2/(1-x)^3.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 6, 1, 1, 7, 13, 10, 1, 1, 9, 22, 25, 15, 1, 1, 11, 33, 46, 41, 21, 1, 1, 13, 46, 73, 79, 61, 28, 1, 1, 15, 61, 106, 129, 121, 85, 36, 1, 1, 17, 78, 145, 191, 201, 172, 113, 45, 1, 1, 19, 97, 190, 265, 301, 289, 232, 145, 55, 1, 1, 21
Offset: 0

Views

Author

Philippe Deléham, Mar 16 2014

Keywords

Examples

			Square array begins:
n\k : 0......1......2......3......4......5......6......7......8......9
======================================================================
.0||  1......1......1......1......1......1......1......1......1......1
.1||  1......3......5......7......9.....11.....13.....15.....17.....19
.2||  1......6.....13.....22.....33.....46.....61.....78.....97....118
.3||  1.....10.....25.....46.....73....106....145....190....241....298
.4||  1.....15.....41.....79....129....191....265....351....449....559
.5||  1.....21.....61....121....201....301....421....561....721....901
.6||  1.....28.....85....172....289....436....613....820...1057...1324
.7||  1.....36....113....232....393....596....841...1128...1457...1828
.8||  1.....45....145....301....513....781...1105...1485...1921...2413
.9||  1.....55....181....379....649....991...1405...1891...2449...3079
10||  1.....66....221....466....801...1226...1741...2346...3041...3826
11||  1.....78....265....562....969...1486...2113...2850...3697...4654
		

Crossrefs

Formula

T(n,k) = 3*T(n-1,k) - 3*T(n-2,k) + T(n-3,k).
T(n,k) = 3*T(n,k-1) - 3*T(n,k-2) + T(n,k-3).
T(n,k) = (T(n,k-1) + T(n,k+1))/2 - A161680(n).
T(n,k) = (T(n-1,k) + T(n+1,k) - A000290(n))/2.

A193515 T(n,k) = number of ways to place any number of 3X1 tiles of k distinguishable colors into an nX1 grid.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 5, 4, 1, 1, 5, 7, 7, 6, 1, 1, 6, 9, 10, 13, 9, 1, 1, 7, 11, 13, 22, 23, 13, 1, 1, 8, 13, 16, 33, 43, 37, 19, 1, 1, 9, 15, 19, 46, 69, 73, 63, 28, 1, 1, 10, 17, 22, 61, 101, 121, 139, 109, 41, 1, 1, 11, 19, 25, 78, 139, 181, 253, 268, 183, 60, 1, 1, 12
Offset: 1

Views

Author

R. H. Hardin, with proof and formula from Robert Israel in the Sequence Fans Mailing List, Jul 29 2011

Keywords

Comments

Table starts:
..1...1...1...1...1....1....1....1....1....1....1....1.....1.....1.....1.....1
..1...1...1...1...1....1....1....1....1....1....1....1.....1.....1.....1.....1
..2...3...4...5...6....7....8....9...10...11...12...13....14....15....16....17
..3...5...7...9..11...13...15...17...19...21...23...25....27....29....31....33
..4...7..10..13..16...19...22...25...28...31...34...37....40....43....46....49
..6..13..22..33..46...61...78...97..118..141..166..193...222...253...286...321
..9..23..43..69.101..139..183..233..289..351..419..493...573...659...751...849
.13..37..73.121.181..253..337..433..541..661..793..937..1093..1261..1441..1633
.19..63.139.253.411..619..883.1209.1603.2071.2619.3253..3979..4803..5731..6769
.28.109.268.529.916.1453.2164.3073.4204.5581.7228.9169.11428.14029.16996.20353

Examples

			Some solutions for n=7 k=3; colors=1,2,3 and empty=0
..3....0....0....2....0....1....3....0....0....0....1....0....3....1....0....0
..3....0....0....2....2....1....3....2....1....0....1....3....3....1....0....0
..3....1....0....2....2....1....3....2....1....2....1....3....3....1....0....3
..1....1....3....0....2....0....0....2....1....2....3....3....0....2....0....3
..1....1....3....0....0....2....2....2....1....2....3....2....1....2....1....3
..1....0....3....0....0....2....2....2....1....0....3....2....1....2....1....0
..0....0....0....0....0....2....2....2....1....0....0....2....1....0....1....0
		

Crossrefs

Column 1 is A000930,
Column 2 is A003229(n-1),
Column 3 is A084386,
Column 4 is A089977,
Column 10 is A178205,
Row 6 is A028872(n+2),
Row 7 is A144390(n+1),
Row 8 is A003154(n+1).

Programs

  • Maple
    T:= proc(n, k) option remember;
          `if`(n<0, 0,
          `if`(n<3 or k=0, 1, k*T(n-3, k) +T(n-1, k)))
        end:
    seq(seq(T(n, d+1-n), n=1..d), d=1..13); # Alois P. Heinz, Jul 29 2011
  • Mathematica
    nmax = 13; t[?Negative, ] = 0; t[n_, k_] /; (n < 3 || k == 0) = 1; t[n_, k_] := t[n, k] = k*t[n-3, k] + t[n-1, k]; Flatten[ Table[ t[n-k+1, k], {n , 1, nmax}, {k, n, 1, -1}]](* Jean-François Alcover, Nov 28 2011, after Maple *)

Formula

With z X 1 tiles of k colors on an n X 1 grid (with n >= z), either there is a tile (of any of the k colors) on the first spot, followed by any configuration on the remaining (n-z) X 1 grid, or the first spot is vacant, followed by any configuration on the remaining (n-1) X 1. So T(n,k) = T(n-1,k) + k*T(n-z,k), with T(n,k) = 1 for n=0,1,...,z-1. The solution is T(n,k) = sum_r r^(-n-1)/(1 + z k r^(z-1)) where the sum is over the roots of the polynomial k x^z + x - 1.
T(n,k) = sum {s=0..[n/3]} (binomial(n-2*s,s)*k^s).
For z X 1 tiles, T(n,k,z) = sum{s=0..[n/z]} (binomial(n-(z-1)*s,s)*k^s). - R. H. Hardin, Jul 31 2011

A214870 Natural numbers placed in table T(n,k) layer by layer. The order of placement: at the beginning filled odd places of layer clockwise, next - even places counterclockwise. T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 10, 9, 8, 13, 17, 16, 6, 14, 21, 26, 25, 11, 12, 22, 31, 37, 36, 18, 15, 20, 32, 43, 50, 49, 27, 24, 23, 30, 44, 57, 65, 64, 38, 35, 19, 33, 42, 58, 73, 82, 81, 51, 48, 28, 29, 45, 56, 74, 91, 101, 100, 66, 63, 39, 34, 41, 59, 72, 92, 111
Offset: 1

Views

Author

Boris Putievskiy, Mar 11 2013

Keywords

Comments

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1).
Enumeration table T(n,k) layer by layer. The order of the list:
T(1,1)=1;
T(1,2), T(2,1), T(2,2);
. . .
T(1,n), T(3,n), ... T(n,3), T(n,1); T(n,2), T(n,4), ... T(4,n), T(2,n);
. . .

Examples

			The start of the sequence as table:
   1   2   5  10  17  26 ...
   3   4   9  16  25  36 ...
   7   8   6  11  18  27 ...
  13  14  12  15  24  35 ...
  21  22  20  23  19  28 ...
  31  32  30  33  29  34 ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   2,  3;
   5,  4,  7;
  10,  9,  8, 13;
  17, 16,  6, 14, 21;
  26, 25, 11, 12, 22, 31;
  ...
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    if i > j:
       result=i*i-i+(j%2)*(2-(j+1)/2)+((j+1)%2)*(j/2+1)
    else:
       result=j*j-2*(i%2)*j + (i%2)*((i+1)/2+1) + ((i+1)%2)*(-i/2+1)

Formula

As table
T(n,k) = k*k-2*(n mod 2)*k+(n mod 2)*((n+1)/2+1)+((n+1) mod 2)*(-n/2+1), if n<=k;
T(n,k) = n*n-n+(k mod 2)*(2-(k+1)/2)+((k+1) mod 2)*(k/2+1), if n>k.
As linear sequence
a(n) = j*j-2*(i mod 2)*j+(i mod 2)*((i+1)/2+1)+((i+1) mod 2)*(-i/2+1), if i<=j;
a(n) = i*i-i+(j mod 2)*(2-(j+1)/2)+((j+1) mod 2)*(j/2+1), if i>j; where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

A248093 Triangle read by rows: TR(n,k) is the number of unordered vertex pairs at distance k of the hexagonal triangle T_n, defined in the He et al. reference (1<=k<=2n+1).

Original entry on oeis.org

1, 0, 6, 6, 6, 3, 13, 15, 21, 21, 15, 6, 22, 27, 42, 48, 45, 36, 24, 9, 33, 42, 69, 84, 87, 81, 69, 51, 33, 12, 46, 60, 102, 129, 141, 141, 132, 114, 93, 66, 42, 15, 61, 81, 141, 183, 207, 216, 213, 198, 177, 147, 117, 81, 51, 18, 78, 105, 186, 246, 285
Offset: 0

Views

Author

Emeric Deutsch, Nov 14 2014

Keywords

Comments

Number of entries in row n is 2*n+2.
The entries in row n are the coefficients of the Hosoya polynomial of T_n.
TR(n,0) = A028872(n+2) = number of vertices of T_n.
TR(n,1) = A140091(n) = number of edges of T_n.
sum(j*TR(n,j), j=0..2n+1) = A033544(n) = the Wiener index of T_n.
(1/2)*sum(j*(j+1)TR(n,j), j=0..2n+1) = A248094(n) = the hyper-Wiener index of T_n.
sum((-1)^j*TR(n,j), j=0..2n+1) = A002061(n). - Peter Luschny, Nov 15 2014

Examples

			Row n=1 is 6, 6, 6, 3; indeed, T_1 is a hexagon ABCDEF; it has 6 distances equal to 0 (= number of vertices), 6 distances equal to 1 (= number of edges), 6 distances equal to 2 (AC, BD, CE, DA, EA, FB), and 3 distances equal to 3 (AD, BE, CF).
Triangle starts:
1, 0;
6, 6, 6, 3;
13, 15, 21, 21, 15, 6;
22, 27, 42, 48, 45, 36, 24, 9;
33, 42, 69, 84, 87, 81, 69, 51, 33, 12;
		

Crossrefs

Programs

  • Maple
    G := (1+(3+6*t+4*t^2+3*t^3)*z-(1+t+2*t^2)*(2+t-2*t^2)*z^2+t^2*(1-3*t^2)*z^3+t^4*z^4)/((1-z)^3*(1-t^2*z)^2): Gser := simplify(series(G, z = 0, 25)): for n from 0 to 22 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 12 do seq(coeff(P[n], t, j), j = 0 .. 2*n+1) end do; # yields sequence in triangular form

Formula

G.f.: (1 + (3 + 6*t + 4*t^2 + 3*t^3)*z - (1 + t + 2*t^2)*(2 + t - 2*t^2)*z^2 +t^2*(1 - 3*t^2)*z^3 + t^4*z^4)/((1-z)^3*(1 - t^2*z^2)^2); follows from Theorem 3.6 of the He et al. reference.

A332700 A(n, k) = Sum_{j=0..n} j!*Stirling2(n, j)*(k-1)^(n-j), for n >= 0 and k >= 0, read by ascending antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 6, 3, 1, 1, 1, 24, 13, 4, 1, 1, 1, 120, 75, 22, 5, 1, 1, 1, 720, 541, 160, 33, 6, 1, 1, 1, 5040, 4683, 1456, 285, 46, 7, 1, 1, 1, 40320, 47293, 15904, 3081, 456, 61, 8, 1, 1, 1, 362880, 545835, 202672, 40005, 5656, 679, 78, 9, 1, 1
Offset: 0

Views

Author

Peter Luschny, Feb 28 2020

Keywords

Examples

			Array begins:
[0] 1, 1,       1,       1,        1,         1,         1, ...    A000012
[1] 1, 1,       1,       1,        1,         1,         1, ...    A000012
[2] 1, 2,       3,       4,        5,         6,         7, ...    A000027
[3] 1, 6,       13,      22,       33,        46,        61, ...   A028872
[4] 1, 24,      75,      160,      285,       456,       679, ...
[5] 1, 120,     541,     1456,     3081,      5656,      9445, ...
[6] 1, 720,     4683,    15904,    40005,     84336,     158095, ...
[7] 1, 5040,    47293,   202672,   606033,    1467376,   3088765, ...
[8] 1, 40320,   545835,  2951680,  10491885,  29175936,  68958295, ...
[9] 1, 362880,  7087261, 48361216, 204343641, 652606336, 1731875605, ...
       A000142, A000670, A122704,  A255927,   A326324, ...
Seen as a triangle:
[0] [1]
[1] [1, 1]
[2] [1, 1,     1]
[3] [1, 2,     1,     1]
[4] [1, 6,     3,     1,     1]
[5] [1, 24,    13,    4,     1,    1]
[6] [1, 120,   75,    22,    5,    1,   1]
[7] [1, 720,   541,   160,   33,   6,   1,  1]
[8] [1, 5040,  4683,  1456,  285,  46,  7,  1, 1]
[9] [1, 40320, 47293, 15904, 3081, 456, 61, 8, 1, 1]
		

Crossrefs

The matrix transpose of A326323.

Programs

  • Maple
    # Prints array by row.
    A := (n, k) -> add(combinat:-eulerian1(n, j)*k^j, j=0..n):
    seq(print(seq(A(n,k), k=0..10)), n=0..8);
    # Alternative:
    egf := n -> `if`(n=1, 1/(1-x), (n-1)/(n - exp((n-1)*x))):
    ser := n -> series(egf(n), x, 21):
    for n from 0 to 6 do seq(n!*coeff(ser(k), x, n), k=0..9) od;
    # Or:
    A := (n, k) -> if k = 0 or n = 0 then 1 elif k = 1 then n! else
    polylog(-n, 1/k)*(k-1)^(n+1)/k fi:
    for n from 0 to 6 do seq(A(n, k), k=0..9) od;
  • Mathematica
    A332700[n_, k_] := n! + Sum[j! StirlingS2[n, j] (k-1)^(n-j), {j, n-1}];
    Table[A332700[n-k, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Feb 01 2024 *)
  • Sage
    def T(n, k):
        return sum(factorial(j)*stirling_number2(n, j)*(k-1)^(n-j) for j in range(n+1))
    for n in range(8): print([T(n, k) for k in range(8)])

Formula

A(n, k) = Sum_{j=0..n} E(n, j)*k^j, where E(n, k) = A173018(n, k).
A(n, 1) = n!*[x^n] 1/(1-x).
A(n, k) = n!*[x^n] (k-1)/(k - exp((k-1)*x)) for k != 1.
A(n, k) = PolyLog(-n, 1/k)*(k-1)^(n+1)/k for k >= 2.

A386206 Triangle read by rows: T(n,k) = n^2 - k, with 0 <= k <= n.

Original entry on oeis.org

0, 1, 0, 4, 3, 2, 9, 8, 7, 6, 16, 15, 14, 13, 12, 25, 24, 23, 22, 21, 20, 36, 35, 34, 33, 32, 31, 30, 49, 48, 47, 46, 45, 44, 43, 42, 64, 63, 62, 61, 60, 59, 58, 57, 56, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90
Offset: 0

Views

Author

Stefano Spezia, Jul 15 2025

Keywords

Examples

			The triangle begins as:
   0;
   1,  0;
   4,  3,  2;
   9,  8,  7,  6;
  16, 15, 14, 13, 12;
  25, 24, 23, 22, 21, 20;
  36, 35, 34, 33, 32, 31, 30;
  49, 48, 47, 46, 45, 44, 43, 42;
  64, 63, 62, 61, 60, 59, 58, 57, 56;
  ...
		

Crossrefs

Cf. A000290 (k=0), A002414 (row sums), A005563, A008865, A028347 (k=4), A028872 (k=3), A028875 (k=5), A279019 (diagonal).

Programs

  • Magma
    [[n^2-k: k in [0..n]]: n in [0..9]]; // Vincenzo Librandi, Jul 17 2025
  • Mathematica
    T[n_,k_]:=n^2-k; Table[T[n,k],{n,0,10},{k,0,n}]//Flatten

Formula

G.f.: x*(1 + x + 2*x*y^2 + 5*x^3*y^2 - x^2*y*(4 + 5*y))/((1 - x)^3*(1 - x*y)^3).
T(n,1) = A005563(n-1) for n > 0.
T(n,2) = A008865(n) for n > 1.
Previous Showing 21-30 of 34 results. Next