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

A363591 a(n) = 3*(3^(n-1) - 2^n + 1)/2 - binomial(n,2), n >= 3.

Original entry on oeis.org

0, 12, 65, 255, 882, 2870, 9039, 27945, 85448, 259512, 784797, 2366819, 7125198, 21424938, 64373339, 193316877, 580344132, 1741819148, 5227030665, 15684238119, 47059006250, 141189602142, 423593972775, 1270832250545, 3812597415552, 11437993573920, 34314383375669
Offset: 3

Views

Author

Enrique Navarrete, Jun 10 2023

Keywords

Comments

2*a(n) is the number of ordered set partitions of an n-set into 3 nonempty sets such that the number of elements in the first two sets (in total) is at least three.

Examples

			2*a(5)=130 subtracting the 20 ordered set partitions of the type {1},{2},{3,4,5} from the 150 ordered set partitions of a 5-set into 3 parts.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{8, -24, 34, -23, 6}, {0, 12, 65, 255, 882}, 30] (* or *)
    A363591[n_] := (3^n - 3*2^n - n^2 + n + 3)/2;
    Array[A363591, 30, 3] (* Paolo Xausa, Aug 30 2024 *)

Formula

G.f.: x^4*(12 - 31*x + 23*x^2 - 6*x^3)/((1 - x)^3*(1 - 2*x)*(1 - 3*x)). - Stefano Spezia, Jun 11 2023

A363603 Expansion of e.g.f. (1/4)*(exp(x)-x-1)*(exp(x)-1)^2.

Original entry on oeis.org

3, 20, 90, 343, 1197, 3966, 12720, 39941, 123651, 379132, 1154790, 3501219, 10581465, 31908218, 96068700, 288926977, 868288239, 2608010424, 7830584850, 23505386015, 70544469573, 211692128950, 635198021640, 1905845723133, 5718057263067
Offset: 4

Views

Author

Enrique Navarrete, Jun 11 2023

Keywords

Comments

4*a(n) is the number of ordered set partitions of an n-set into 3 nonempty sets such that the number of elements in a particular set (say the first one) is at least two (see example).
4*a(n) is also the number of ternary strings using digits {0,1,2} so that all digits are used and a particular digit appears at least twice; for example, for n=5, the 80 strings with at least two 0's are 00112 (30 of this type), 00122 (30 of this type), 00012 (20 of this type).

Examples

			4*a(5)=80 since the ordered set partitions are the following: 30 of type {1,2}{3,4},{5}; 30 of type {1,2},{3},{4,5}; 20 of type {1,2,3},{4},{5}.
		

Crossrefs

Programs

  • Mathematica
    A363603[n_]:=(3^n-3(2^n-1))/4-(n/2)(2^(n-2)-1);Array[A363603,40,4] (* or *)
    LinearRecurrence[{9,-31,51,-40,12},{3,20,90,343,1197},40] (* Paolo Xausa, Nov 18 2023 *)

Formula

a(n) = (3^n - 3*(2^n - 1))/4 - (n/2)*(2^(n-2) - 1), n>=4.
G.f.: x^4*(3 - 7*x + 3*x^2)/((1 - 3*x)*(1 - 2*x)^2*(1 - x)^2). - Stefano Spezia, Jun 11 2023
a(n) = (Sum_{k=2..n-2} A000225(k-1)*binomial(n,k))/2. - R. J. Cano, Jul 27 2023

A371568 Array read by ascending antidiagonals: A(n, k) is the number of paths of length k in Z^n from the origin to points such that x1+x2+...+xn = k with x1,...,xn > 0.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 0, 6, 1, 0, 0, 6, 14, 1, 0, 0, 0, 36, 30, 1, 0, 0, 0, 24, 150, 62, 1, 0, 0, 0, 0, 240, 540, 126, 1, 0, 0, 0, 0, 120, 1560, 1806, 254, 1, 0, 0, 0, 0, 1800, 8400, 5796, 510, 1
Offset: 1

Views

Author

Shel Kaphan, Mar 28 2024

Keywords

Comments

T(n, k) can also be seen as the number of ordered partitions of k items into n nonempty buckets.
T(n, n) = n!, which is readily seen because to go from the origin to a point in Z^n a distance n away, with at least one step taken in each dimension, the first step can be in any of n dimensions, the second step in any of n-1 dimensions, and so on.
This array is the image of Pascal's triangle A007318 under the Akiyama-Tanigawa transformation. See the Python program. - Peter Luschny, Apr 19 2024

Examples

			 n\k 1 2 3  4   5    6     7      8       9       10
  --------------------------------------------------
 1|  1 1 1  1   1    1     1      1       1        1
 2|  0 2 6 14  30   62   126    254     510     1022
 3|  0 0 6 36 150  540  1806   5796   18150    55980
 4|  0 0 0 24 240 1560  8400  40824  186480   818520
 5|  0 0 0  0 120 1800 16800 126000  834120  5103000
 6|  0 0 0  0   0  720 15120 191520 1905120 16435440
 7|  0 0 0  0   0    0  5040 141120 2328480 29635200
 8|  0 0 0  0   0    0     0  40320 1451520 30240000
 9|  0 0 0  0   0    0     0      0  362880 16329600
10|  0 0 0  0   0    0     0      0       0  3628800
		

Crossrefs

Cf. A000918 (n=2), A001117 (n=3), A000919 (n=4), A001118 (n=5), A000920 (n=6).
Cf. A135456 (n=7), A133068 (n=8), A133360 (n=9), A133132 (n=10).
See A019538 and A131689 for other versions.

Programs

  • Mathematica
    A[n_,k_] := Sum[(-1)^(n-i) * i^k * Binomial[n,i], {i,1,n}]
  • Python
    # The Akiyama-Tanigawa algorithm for the binomial generates the rows.
    # Adds row(0) = 0^k and column(0) = 0^n.
    from math import comb as binomial
    def ATBinomial(n, len):
        A = [0] * len
        R = [0] * len
        for k in range(len):
            R[k] = binomial(k, n)
            for j in range(k, 0, -1):
                R[j - 1] = j * (R[j] - R[j - 1])
            A[k] = R[0]
        return A
    for n in range(11): print([n], ATBinomial(n, 11))  # Peter Luschny, Apr 19 2024

Formula

A(n,k) = Sum_{i=1..n} (-1)^(n-i) * binomial(n,i) * i^k

A056268 Number of primitive (aperiodic) words of length n which contain exactly three different symbols.

Original entry on oeis.org

0, 0, 6, 36, 150, 534, 1806, 5760, 18144, 55830, 171006, 518580, 1569750, 4732014, 14250450, 42844320, 128746950, 386615376, 1160688606, 3483582660, 10454059938, 31368305694, 94118013006, 282378679920, 847187946000, 2541662931990, 7625194813656, 22875982414740
Offset: 1

Views

Author

Keywords

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Programs

  • PARI
    f(n) = 3^n - 3*2^n + 3;
    a(n) = sumdiv(n, d, moebius(d)*f(n/d)); \\ Michel Marcus, Mar 25 2022

Formula

a(n) = Sum_{d|n} mu(d)*A001117(n/d).

Extensions

a(11) and following corrected by Georg Fischer, Mar 24 2022

A179483 A(k,3) where A(k,n) = Sum_{m=1..k} (-1)^(m+1) *binomial(n,m)*m^k.

Original entry on oeis.org

3, -9, 6, 36, 150, 540, 1806, 5796, 18150, 55980, 171006, 519156, 1569750, 4733820, 14250606, 42850116, 128746950, 386634060, 1160688606, 3483638676, 10454061750, 31368476700, 94118013006, 282379204836, 847187946150, 2541664501740, 7625194831806
Offset: 1

Views

Author

M. Lawrence Glasser, Jul 16 2010

Keywords

Crossrefs

Cf. A001117.

Programs

  • Maple
    A179483 := proc(n) add( (-1)^(m+1)*binomial(3,m)*m^n,m=1..n) ; end proc: # R. J. Mathar, Jan 31 2011
  • Mathematica
    Sum[(-1)^(m+1)Binomial[3,m]m^k,{m,1,k}]
  • PARI
    Vec(3*x*(1 - 9*x + 31*x^2 - 39*x^3 + 18*x^4) / ((1 - x)*(1 - 2*x)*(1 - 3*x)) + O(x^30)) \\ Colin Barker, May 21 2017

Formula

a(n) = A001117(n), n>=3. - R. J. Mathar, Jul 20 2010
From Colin Barker, May 21 2017: (Start)
G.f.: 3*x*(1 - 9*x + 31*x^2 - 39*x^3 + 18*x^4) / ((1 - x)*(1 - 2*x)*(1 - 3*x)).
a(n) = 3 - 3*2^n + 3^n for n>2.
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3) for n>5.
(End)

A380993 Irregular triangular array read by rows. T(n,k) is the number of ternary words of length n containing at least one copy of each letter and having exactly k inversions, n>=3, 0<=k<=floor(n^2/3).

Original entry on oeis.org

1, 2, 2, 1, 3, 6, 9, 9, 6, 3, 6, 12, 21, 27, 30, 24, 18, 9, 3, 10, 20, 38, 55, 74, 81, 80, 69, 53, 34, 17, 8, 1, 15, 30, 60, 93, 138, 174, 210, 216, 219, 195, 165, 120, 84, 48, 27, 9, 3, 21, 42, 87, 141, 222, 303, 405, 480, 546, 579, 588, 552, 498, 414, 324, 240, 162, 99, 54, 27, 9, 3
Offset: 3

Views

Author

Geoffrey Critzer, Feb 11 2025

Keywords

Examples

			Triangle T(n,k) begins:
   1,  2,  2,  1;
   3,  6,  9,  9,  6,  3;
   6, 12, 21, 27, 30, 24, 18,  9,  3;
  10, 20, 38, 55, 74, 81, 80, 69, 53, 34, 17, 8, 1;
  ...
T(4,2) = 9 because we have: {0, 1, 2, 0}, {0, 2, 0, 1}, {0, 2, 1, 1}, {0, 2, 2, 1}, {1, 0, 0, 2}, {1, 0, 2, 1}, {1, 1, 0, 2}, {1, 2, 0, 2}, {2, 0, 1, 2}.
		

Crossrefs

Cf. A056454, A129529, A001117 (row sums).

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, `if`(nops(subs(0=
          [][], l))=3, 1, 0), add(expand(x^([0, l[1], l[1]+l[2]][j])*
          b(n-1, subsop(j=`if`(j=3, 1, l[j]+1), l))), j=1..3))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$3])):
    seq(T(n), n=3..10);  # Alois P. Heinz, Feb 12 2025
  • Mathematica
    nn = 8; B[n_] := FunctionExpand[QFactorial[n, u]];
    e[z_] := Sum[z^n/B[n], {n, 0, nn}];
    Drop[Map[CoefficientList[#, u] &,
       Map[Normal[Series[#, {u, 0, Binomial[nn, 2]}]] &,
        Table[B[n], {n, 0, nn}] CoefficientList[
          Series[(e[z] - 1)^3, {z, 0, nn}], z]]], 3] // Grid

Formula

Sum_{n>=0} Sum_{k>=0} T(n,k)*q^k*x^n/B(n) = (e(x)-1)^3 where B(n) = Product_{i=1..n} (q^i-1)/(q-1) and e(x) = Sum_{n>=0} x^n/B(n).
Sum_{k=0..floor(n^2/3)} (-1)^k * T(n,k) = A056454(n). - Alois P. Heinz, Feb 12 2025
Previous Showing 21-26 of 26 results.