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

A293112 Number A(n,k) of sets of nonempty words with a total of n letters over k-ary alphabet such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 2, 0, 1, 1, 2, 5, 2, 0, 1, 1, 2, 6, 10, 3, 0, 1, 1, 2, 6, 14, 23, 4, 0, 1, 1, 2, 6, 15, 39, 51, 5, 0, 1, 1, 2, 6, 15, 44, 104, 111, 6, 0, 1, 1, 2, 6, 15, 45, 129, 284, 243, 8, 0, 1, 1, 2, 6, 15, 45, 135, 386, 775, 530, 10, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 30 2017

Keywords

Examples

			Square array A(n,k) begins:
  1, 1,   1,   1,   1,   1,   1,   1, ...
  0, 1,   1,   1,   1,   1,   1,   1, ...
  0, 1,   2,   2,   2,   2,   2,   2, ...
  0, 2,   5,   6,   6,   6,   6,   6, ...
  0, 2,  10,  14,  15,  15,  15,  15, ...
  0, 3,  23,  39,  44,  45,  45,  45, ...
  0, 4,  51, 104, 129, 135, 136, 136, ...
  0, 5, 111, 284, 386, 422, 429, 430, ...
		

Crossrefs

Main diagonal gives A293114.

Programs

  • Maple
    h:= l-> (n-> add(i, i=l)!/mul(mul(1+l[i]-j+add(`if`(l[k]
        n, 0, g(n-i, i, [l[], i])))))
        end:
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(b(n-i*j, i-1, k)*binomial(g(i, k, []), j), j=0..n/i)))
        end:
    A:= (n, k)-> b(n$2, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    h[l_] := Function[n, Total[l]!/Product[Product[1 + l[[i]] - j + Sum[If[ l[[k]] n, 0, g[n - i, i, Append[l, i]]]]]];
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[b[n - i*j, i - 1, k]*Binomial[g[i, k, {}], j], {j, 0, n/i}]]];
    A[n_, k_] := b[n, n, k];
    Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, Jun 03 2018, from Maple *)

Formula

G.f. of column k: Product_{j>=1} (1+x^j)^A182172(j,k).
A(n,k) = Sum_{j=0..k} A293113(n,j).

A293883 Number of sets of nonempty words with a total of n letters over binary alphabet containing the second letter such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.

Original entry on oeis.org

1, 3, 8, 20, 47, 106, 237, 522, 1146, 2485, 5406, 11644, 25157, 53964, 116003, 247987, 530999, 1131889, 2415431, 5135838, 10927816, 23182209, 49199697, 104154808, 220543306, 465996956, 984704338, 2076988457, 4380764354, 9225209588, 19424813915, 40844509107
Offset: 2

Views

Author

Alois P. Heinz, Oct 18 2017

Keywords

Crossrefs

Column k=2 of A293113.

Formula

a(n) = A293741(n) - A000009(n).

A293884 Number of sets of nonempty words with a total of n letters over ternary alphabet containing the third letter such that within each prefix of a word every letter of the alphabet is at least as frequent as the subsequent alphabet letter.

Original entry on oeis.org

1, 4, 16, 53, 173, 532, 1615, 4785, 14066, 40908, 118438, 341253, 981200, 2815762, 8075265, 23149097, 66373778, 190376443, 546401592, 1569387414, 4511532695, 12980998062, 37385342522, 107771434819, 310967929569, 898108427259, 2596180252466, 7511411442182
Offset: 3

Views

Author

Alois P. Heinz, Oct 18 2017

Keywords

Crossrefs

Column k=3 of A293113.

Formula

a(n) = A293742(n) - A293741(n).

A305561 Expansion of 2*x*(1 - 2*x)/(1 + 2*x - 8*x^2 - sqrt(1 - 4*x^2)).

Original entry on oeis.org

1, 1, 3, 8, 23, 64, 182, 512, 1451, 4096, 11594, 32768, 92710, 262144, 741548, 2097152, 5931955, 16777216, 47454210, 134217728, 379628818, 1073741824, 3037013748, 8589934592, 24296051198, 68719476736, 194368201572, 549755813888, 1554944869676, 4398046511104
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 21 2018

Keywords

Comments

Invert transform of A001405.

Crossrefs

Programs

  • Magma
    m:=35; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!( 2*x*(1 - 2*x)/(1 + 2*x - 8*x^2 - Sqrt(1 - 4*x^2)))); // Vincenzo Librandi, Jan 27 2020
  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(
          a(n-i)*binomial(i, floor(i/2)), i=1..n))
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jun 21 2018
  • Mathematica
    nmax = 29; CoefficientList[Series[2 x (1 - 2 x)/(1 + 2 x - 8 x^2 - Sqrt[1 - 4 x^2]), {x, 0, nmax}], x]
    nmax = 29; CoefficientList[Series[1/(1 - Sum[Binomial[k, Floor[k/2]] x^k, {k, 1, nmax}]), {x, 0, nmax}], x]
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[k, Floor[k/2]] a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 29}]

Formula

G.f.: 1/(1 - Sum_{k>=1} binomial(k,floor(k/2))*x^k).
D-finite with recurrence: n*(n+1)*a(n) +(n-1)*(n-5)*a(n-1) -12*(n-1)*(n+1)*a(n-2) -12*(n-2)*(n-5)*a(n-3) +32*(n+1)*(n-3)*a(n-4) +32*(n-4)*(n-5)*a(n-5)=0. - R. J. Mathar, Jan 25 2020
a(n) ~ 2^(3*(n-1)/2). - Vaclav Kotesovec, Jan 29 2020
Showing 1-4 of 4 results.