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 11-20 of 21 results. Next

A144257 Weight array of A086270.

Original entry on oeis.org

1, 2, 0, 3, 1, 0, 4, 2, 1, 0, 5, 3, 2, 1, 0, 6, 4, 3, 2, 1, 0, 7, 5, 4, 3, 2, 1, 0, 8, 6, 5, 4, 3, 2, 1, 0, 9, 7, 6, 5, 4, 3, 2, 1, 0, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 12, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 13, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 14, 12, 11, 10, 9, 8, 7, 6, 5
Offset: 1

Views

Author

Clark Kimberling, Sep 16 2008

Keywords

Comments

For the definition of weight array, see A144112.
From Gary W. Adamson, Feb 18 2010: (Start)
Identical to an infinite lower triangular matrix with (1,2,3,...) in every column but the leftmost column shifted one row upwards, giving:
1;
2, 0;
3, 1, 0;
4, 2, 1, 0;
5, 3, 2, 1, 0;
...
Let the triangle = M. Row sums = A000124; M * [1,2,3,...] = A050407 starting with offset 3: (1, 2, 5, 11, 21, 36, ...); and lim_{n->inf} M^n = the odd-indexed Fibonacci numbers, A001519: (1, 2, 5, 13, ...). (End)

Examples

			Northwest corner:
  1 2 3 4 5 6 7 8 9
  0 1 2 3 4 5 6 7 8
  0 1 2 3 4 5 6 7 8
  0 1 2 3 4 5 6 7 8
  0 1 2 3 4 5 6 7 8
		

Crossrefs

Cf. A086270.
Cf. A000124, A050407, A001519. - Gary W. Adamson, Feb 18 2010

Formula

Row 1 = A000027. All subsequent rows are 0 followed by A000027.

A081913 a(n) = 2^n*(n^3 - 3n^2 + 2n + 48)/48.

Original entry on oeis.org

1, 2, 4, 9, 24, 72, 224, 688, 2048, 5888, 16384, 44288, 116736, 301056, 761856, 1896448, 4653056, 11272192, 27000832, 64028672, 150470656, 350748672, 811597824, 1865416704, 4261412864, 9680453632, 21877489664, 49207574528
Offset: 0

Views

Author

Paul Barry, Mar 31 2003

Keywords

Comments

Binomial transform of A050407, (starting with 1,1,1,2,5,...). 2nd binomial transform of (1,0,0,1,0,0,0,0,...). Case k=2 where a(n,k) = k^n*(n^3 - 3n^2 + 2n + 6k^3)/(6k^3), with g.f. (1 - 3kx + 3k^2x^2 - (k^3-1)x^3)/(1-kx)^4.

Crossrefs

Cf. A081914.

Programs

Formula

a(n) = 2^n*(n^3 - 3n^2 + 2n + 48)/48.
G.f.: (1 - 6x + 12x^2 - 7x^3)/(1-2x)^4.

A144680 Triangle read by rows, lower half of an array formed by A004736 * A144328 (transform).

Original entry on oeis.org

1, 2, 3, 3, 5, 7, 4, 7, 11, 14, 5, 9, 15, 21, 25, 6, 11, 19, 28, 36, 41, 7, 13, 23, 35, 47, 57, 63, 8, 15, 27, 42, 58, 73, 85, 92, 9, 17, 31, 49, 69, 89, 107, 121, 129, 10, 19, 35, 56, 80, 105, 129, 150, 166, 175
Offset: 1

Views

Author

Gary W. Adamson, Sep 19 2008

Keywords

Comments

Triangle read by rows, lower half of an array formed by A004736 * A144328 (transform).

Examples

			The array is formed by A004736 * A144328 (transform) where A004736 = the natural number decrescendo triangle and A144328 = a crescendo triangle. First few rows of the array =
  1, 1,  1,  1,  1,  1, ...
  2, 3,  3,  3,  3,  3, ...
  3, 5,  7,  7,  7,  7, ...
  4, 7, 11, 14, 14, 14, ...
  5, 9, 15, 21, 25, 25, ...
  ...
Triangle begins as:
   1;
   2,  3;
   3,  5,  7;
   4,  7, 11, 14;
   5,  9, 15, 21, 25;
   6, 11, 19, 28, 36,  41;
   7, 13, 23, 35, 47,  57,  63;
   8, 15, 27, 42, 58,  73,  85,  92;
   9, 17, 31, 49, 69,  89, 107, 121, 129;
  10, 19, 35, 56, 80, 105, 129, 150, 166, 175;
  ...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= (3*(k^2-k+2)*n - k*(k-1)*(2*k-1))/6;
    Table[T[n, k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Oct 18 2021 *)
  • Sage
    def A144680(n,k): return (3*(k^2-k+2)*n - k*(k-1)*(2*k-1))/6
    flatten([[A144680(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Oct 18 2021

Formula

Sum_{k=1..n} T(n, k) = A006008(n).
From G. C. Greubel, Oct 18 2021: (Start)
T(n, k) = (1/6)*( 3*(k^2 - k + 2)*n - k*(k-1)*(2*k-1) ).
T(n, n) = A004006(n).
T(n, n-1) = A050407(n+2).
T(n, n-2) = A027965(n-1) = A074742(n-2). (End)

A159255 Irregular triangle read by rows: row n gives expansion of (1-x+x^2)*(1+x)^n.

Original entry on oeis.org

1, -1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 1, 1, 3, 3, 2, 3, 3, 1, 1, 4, 6, 5, 5, 6, 4, 1, 1, 5, 10, 11, 10, 11, 10, 5, 1, 1, 6, 15, 21, 21, 21, 21, 15, 6, 1, 1, 7, 21, 36, 42, 42, 42, 36, 21, 7, 1, 1, 8, 28, 57, 78, 84, 84, 78, 57, 28, 8, 1, 1, 9, 36, 85, 135, 162, 168, 162, 135, 85, 36, 9, 1
Offset: 0

Views

Author

Philippe Deléham, Apr 07 2009

Keywords

Examples

			Row n=0 : 1, -1, 1 ;
Row n=1 : 1, 0, 0, 1 ;
Row n=2 : 1, 1, 0, 1, 1 ;
Row n=3 : 1, 2, 1, 1, 2, 1 ;
Row n=4 : 1, 3, 3, 2, 3, 3, 1 ;
Row n=5 : 1, 5, 10, 11, 10, 11, 10, 5, 1;
Row n=6 : 1, 6, 15, 21, 21, 21, 21, 15, 6, 1;
...
		

Crossrefs

Programs

  • PARI
    row(n)=Vecrev(polcoef((1 - y + y^2)/(1 - x*(1+y)) + O(x*x^n), n))
    { for(n=0, 10, print(row(n))) } \\ Andrew Howroyd, Mar 03 2023

Formula

G.f.: A(x,y) = (1 - y + y^2)/(1 - x*(1+y)). - Andrew Howroyd, Mar 03 2023

A308682 Number of ways of partitioning the set of the first n positive triangular numbers into two subsets whose sums differ at most by 1.

Original entry on oeis.org

1, 1, 0, 0, 1, 1, 1, 1, 2, 7, 6, 8, 13, 42, 33, 52, 105, 318, 310, 485, 874, 3281, 2974, 5240, 9488, 34233, 30418, 55715, 104730, 378529, 352467, 642418, 1193879, 4466874, 4165910, 7762907, 14493951, 54162165, 50621491, 95133799, 179484713, 674845081
Offset: 0

Views

Author

Alois P. Heinz, Jun 16 2019

Keywords

Examples

			a(4) = 1: 1,3,6/10.
a(5) = 1: 1,6,10/3,15.
a(6) = 1: 1,6,21/3,10,15.
a(7) = 1: 1,3,10,28/6,15,21.
a(8) = 2: 1,6,10,15,28/3,21,36; 1,10,21,28/3,6,15,36.
		

Crossrefs

Programs

  • Maple
    s:= proc(n) s(n):= `if`(n=0, 1, n*(n+1)/2+s(n-1)) end:
    b:= proc(n, i) option remember; `if`(i=0, `if`(n<=1, 1, 0),
         `if`(n>s(i), 0, (p->b(n+p, i-1)+b(abs(n-p), i-1))(i*(i+1)/2)))
        end:
    a:= n-> ceil(b(0, n)/2):
    seq(a(n), n=0..45);
  • Mathematica
    s[n_] := s[n] = If[n == 0, 1, n(n+1)/2 + s[n-1]];
    b[n_, i_] := b[n, i] = If[i == 0, If[n <= 1, 1, 0], If[n > s[i], 0, Function[p, b[n + p, i-1] + b[Abs[n-p], i-1]][i(i+1)/2]]];
    a[n_] := Ceiling[b[0, n]/2];
    a /@ Range[0, 45] (* Jean-François Alcover, May 04 2020, translated from Maple *)

A323228 a(n) = binomial(n + 4, n - 1) + 1.

Original entry on oeis.org

1, 2, 7, 22, 57, 127, 253, 463, 793, 1288, 2003, 3004, 4369, 6189, 8569, 11629, 15505, 20350, 26335, 33650, 42505, 53131, 65781, 80731, 98281, 118756, 142507, 169912, 201377, 237337, 278257, 324633, 376993, 435898, 501943, 575758, 658009, 749399, 850669
Offset: 0

Views

Author

Peter Luschny, Feb 12 2019

Keywords

Crossrefs

A040000 (m=1), A000027 (m=2), A000124 (m=3), A050407 (m=4), A145126 (m=5), this sequence (m=6).

Programs

  • Maple
    aList := proc(len) local gf, ser:
    gf := (x - (x - 1)^5)/(x - 1)^6:
    ser := series(gf, x, len+2):
    seq(coeff(ser, x, n), n=0..len) end: aList(38);
  • Mathematica
    Table[Binomial[n + 4, n - 1] + 1, {n, 0, 37}]

Formula

a(n) = 1 + Pochhammer(n, 5)/5!.
a(n) = [x^n] (x - (x - 1)^5)/(x - 1)^6.

A323231 A(n, k) = [x^k] (1/(1-x) + x/(1-x)^n), square array read by descending antidiagonals for n, k >= 0.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 2, 4, 4, 2, 1, 1, 2, 5, 7, 5, 2, 1, 1, 2, 6, 11, 11, 6, 2, 1, 1, 2, 7, 16, 21, 16, 7, 2, 1, 1, 2, 8, 22, 36, 36, 22, 8, 2, 1, 1, 2, 9, 29, 57, 71, 57, 29, 9, 2, 1, 1, 2, 10, 37, 85, 127, 127, 85, 37, 10, 2, 1
Offset: 0

Views

Author

Peter Luschny, Feb 10 2019

Keywords

Examples

			Array starts:
[0] 1, 2,  1,  1,   1,   1,    1,    1,    1,     1,     1, ...
[1] 1, 2,  2,  2,   2,   2,    2,    2,    2,     2,     2, ... A040000
[2] 1, 2,  3,  4,   5,   6,    7,    8,    9,    10,    11, ... A000027
[3] 1, 2,  4,  7,  11,  16,   22,   29,   37,    46,    56, ... A000124
[4] 1, 2,  5, 11,  21,  36,   57,   85,  121,   166,   221, ... A050407
[5] 1, 2,  6, 16,  36,  71,  127,  211,  331,   496,   716, ... A145126
[6] 1, 2,  7, 22,  57, 127,  253,  463,  793,  1288,  2003, ... A323228
[7] 1, 2,  8, 29,  85, 211,  463,  925, 1717,  3004,  5006, ...
[8] 1, 2,  9, 37, 121, 331,  793, 1717, 3433,  6436, 11441, ...
[9] 1, 2, 10, 46, 166, 496, 1288, 3004, 6436, 12871, 24311, ...
.
Read as a triangle (by descending antidiagonals):
                                     1
                                  2,   1
                                1,   2,   1
                             1,   2,   2,   1
                           1,   2,   3,   2,   1
                        1,   2,   4,   4,   2,   1
                      1,   2,   5,   7,   5,   2,  1
                    1,  2,   6,  11,  11,   6,   2,  1
                  1,  2,   7,  16,  21,  16,   7,  2,  1
                1,  2,  8,  22,  36,  36,  22,   8,  2,  1
              1,  2,  9,  29,  57,  71,  57,  29,  9,  2,  1
.
A(0, 1) = C(-1, 0) + 1 = 2 because C(-1, 0) = 1. A(1, 0) = C(-1, -1) + 1 = 1 because C(-1, -1) = 0. Warning: Some computer algebra programs (for example Maple and Mathematica) return C(n, n) = 1 for n < 0. This contradicts the definition given by Graham et al. (see reference). On the other hand this definition preserves symmetry.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 154.

Crossrefs

Differs from A323211 only in the second term.
Diagonals A(n, n+d): A323230 (d=0), A260878 (d=1), A323229 (d=2).
Antidiagonal sums are A323227(n) if n!=1.
Cf. A007318 (Pascal's triangle).

Programs

  • Julia
    using AbstractAlgebra
    function Arow(n, len)
        R, x = PowerSeriesRing(ZZ, len+2, "x")
        gf = inv(1-x) + divexact(x, (1-x)^n)
        [coeff(gf, k) for k in 0:len-1] end
    for n in 0:9 println(Arow(n, 11)) end
  • Maple
    Binomial := (n, k) -> `if`(n < 0 and n = k, 0, binomial(n,k)):
    A := (n, k) -> Binomial(n + k - 2, k - 1) + 1:
    seq(lprint(seq(A(n, k), k=0..10)), n=0..10);
  • Mathematica
    T[n_, k_]:= If[k==0, 1 + Boole[n==1], If[k==n, 1, Binomial[n-2, k-1] + 1]];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 27 2021 *)
  • Sage
    def Arow(n):
        R. = PowerSeriesRing(ZZ, 20)
        gf = 1/(1-x) + x/(1-x)^n
        return gf.padded_list(10)
    for n in (0..9): print(Arow(n))
    

Formula

A(n, k) = binomial(n + k - 2, k - 1) + 1. Note that binomial(n, n) = 0 if n < 0.
A(n, k) = A(k, n) with the exception A(1,0) != A(0,1).
A(n, n) = binomial(2*n-2, n-1) + 1 = A323230(n).
From G. C. Greubel, Dec 27 2021: (Start)
T(n, k) = binomial(n-2, k-1) + 1 with T(n, 0) = 1 + [n=1], T(n, n) = 1.
T(2*n, n) = A323230(n).
Sum_{k=0..n} T(n,k) = n + 1 + 2^(n-2) - [n=0]/4 + [n=1]/2. (End)

A081917 a(0)=1, a(n)= n^(n-2)(7n^2-3n+2)/6 (n>0).

Original entry on oeis.org

1, 1, 4, 28, 272, 3375, 50976, 907578, 18612224, 432061533, 11200000000, 320680885976, 10051252125696, 342302635261067, 12586048547315712, 496928474121093750, 20968759865037029376, 941737183946729395897
Offset: 0

Views

Author

Paul Barry, Mar 31 2003

Keywords

Comments

Main diagonal of square array defined by T(n,k)=k^n(n^3-3n^2+2n+6k^3)/(6k^3), in which rows have g.f. (1-3kx+3k^2x^2-(k^3-1)x^3)/(1-kx)^4.

Crossrefs

A329523 a(n) = n * (binomial(n + 1, 3) + 1).

Original entry on oeis.org

0, 1, 4, 15, 44, 105, 216, 399, 680, 1089, 1660, 2431, 3444, 4745, 6384, 8415, 10896, 13889, 17460, 21679, 26620, 32361, 38984, 46575, 55224, 65025, 76076, 88479, 102340, 117769, 134880, 153791, 174624, 197505, 222564, 249935, 279756, 312169, 347320, 385359, 426440
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 15 2019

Keywords

Comments

The n-th centered n-gonal pyramidal number.

Examples

			Square array begins:
  (0), 1,  2,   3,   4,    5,  ... A001477
   0, (1), 3,   7,  14,   25,  ... A004006
   0,  1, (4), 11,  24,   45,  ... A006527
   0,  1,  5, (15), 34,   65,  ... A006003 (partial sums of A005448)
   0,  1,  6,  19, (44),  85,  ... A005900 (partial sums of A001844)
   0,  1,  7,  23,  54, (105), ... A004068 (partial sums of A005891)
...
This sequence is the main diagonal of the array.
		

References

  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), 142.

Crossrefs

Programs

  • Magma
    [ n*(Binomial(n+1,3)+1):n in [0..40]]; // Marius A. Burtea, Nov 15 2019
    
  • Magma
    R:=PowerSeriesRing(Integers(), 41); [0] cat Coefficients(R!(x*(1-x+5*x^2-x^3)/(1-x)^5)); // Marius A. Burtea, Nov 15 2019
  • Mathematica
    Table[n (Binomial[n + 1, 3] + 1), {n, 0, 40}]
    nmax = 40; CoefficientList[Series[x (1 - x + 5 x^2 - x^3)/(1 - x)^5, {x, 0, nmax}], x]
    LinearRecurrence[{5, -10, 10, -5, 1}, {0, 1, 4, 15, 44}, 41]

Formula

G.f.: x * (1 - x + 5*x^2 - x^3) / (1 - x)^5.
E.g.f.: exp(x) * x * (1 + x + x^2 + x^3 / 6).
a(n) = n * (n + 2) * (n^2 - 2*n + 3) / 6.
a(n) = n * (A000292(n-1) + 1).
a(n) = n + 2 * Sum_{k=1..n} A000330(k-1).
a(n) + a(-n) = 4 * A002415(n).

A367313 Triangle read by rows: T(n,k) is the number of permutations of [n] with weighted inversion index k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 3, 4, 3, 3, 2, 1, 1, 1, 1, 2, 3, 5, 5, 8, 9, 10, 10, 12, 10, 10, 9, 8, 5, 5, 3, 2, 1, 1, 1, 1, 2, 3, 5, 7, 9, 12, 16, 20, 23, 28, 31, 36, 38, 41, 43, 44, 44, 43, 41, 38, 36, 31, 28, 23, 20, 16, 12, 9, 7, 5, 3, 2, 1, 1
Offset: 0

Views

Author

Todd Simpson, Nov 13 2023

Keywords

Comments

T(n,k) represents two statistics that can be shown to be equal:
(1) Permutations of {1,2,...,n} counted by a "weighted inversion index": for a permutation pi, the weighted inversion index is the sum of i over all pairs i,j with i < j and pi(i) > pi(j).
(2) Partitions lambda with at most n-1 parts counted by weight, where the inequality lambda(i) - lambda(i+1) <= n - i holds for 1 <= i < n (with lambda(n) = 0).
Possible values of this index range from 0 to (n-1)*n*(n+1)/6. The permutation with the largest weighted inversion index is (n,n-1,...,2,1) and the partition with the largest weight is (n(n-1)/2,(n-1)(n-2)/2,...,3,1).
Let t_n(q) be the sum of T(n,k)q^k, for 0 <= k <= (n-1)*n*(n+1)/6. Then t_n(q) is the product of (1 - q^(k*(n+1-k)))/(1 - q^k), for 1 <= k <= n-1.

Examples

			The permutation pi = (2,5,3,1,4) has these inversions, with the given contributions to weighted inversion index:
   (2,1), 1
   (5,3), 2
   (5,1), 2
   (5,4), 2
   (3,1), 3
The corresponding partition can be created as follows.  For each i <= 5, write the number of j > i with pi(i) > pi(j): (1,3,1,0,0).
For each i, the i-th number in this sequence is at most n-i.
Let lambda(i) be the sum of the values of the sequence starting with the i-th value: lambda = (5,4,1,0,0).
This permutation and partition are counted by T(5,10).  In the product expansion of t_5(q), they correspond to the following choice of terms:
   (1 - q^5)/(1 - q) = 1 + q + q^2 + q^3 + q^4:  choose q,
   (1 - q^8)/(1 - q^2) = 1 + q^2 + q^4 + q^6:  choose q^6,
   (1 - q^9)/(1 - q^3) = 1 + q^3 + q^6:  choose q^3,
   (1 - q^8)/(1 - q^4) = 1 + q^4:  choose 1.
Triangle T(n,k) begins:
  1;
  1;
  1, 1;
  1, 1, 2, 1, 1;
  1, 1, 2, 3, 3, 4, 3, 3,  2,  1,  1;
  1, 1, 2, 3, 5, 5, 8, 9, 10, 10, 12, 10, 10, 9, 8, 5, 5, 3, 2, 1, 1;
  ...
		

Crossrefs

Row sums give A000142.
Row n contains A050407(n+2) terms.
T(n+1,n) gives A000041(n).

Formula

From Alois P. Heinz, Nov 25 2023: (Start)
Sum_{k=0..A050407(n+2)-1} k * T(n,k) = A001754(n+1).
Sum_{k=0..A050407(2n+3)-1} (-1)^k * T(2n+1,k) = A000165(n). (End)
Previous Showing 11-20 of 21 results. Next