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

A218826 Number of indecomposable (by concatenation) alternating n-anagrams.

Original entry on oeis.org

1, 1, 4, 25, 217, 2470, 35647, 637129, 13843948, 360022957, 11054457253, 396003680518, 16377463914091, 774714094061221, 41572230979229284, 2512149910125036865, 169831839578092130017, 12769241823369505582150, 1062122471116082751430087, 97264621940872013476357969
Offset: 1

Views

Author

Michel Marcus, Nov 07 2012

Keywords

Comments

Alternating anagrams enumeration is related to A000366 by a(n) = A000366(n+1).
For all n, a(n) are periodically congruent to 1, 1 and 4 modulo 6.

Crossrefs

Cf. A000366, A218827. First column of A239894.

Programs

  • PARI
    a000366(n)= {return((-1/2)^(n-2)*sum(k=0, n, binomial(n, k)*(1-2^(n+k+1))*bernfrac(n+k+1)));}
    bi(n,k) = {if (matb[n,k] == 0, if (n==k, v=1, if (k==1, v = b(n),v = sum(i=1, n-k+1, b(i)*bi(n-i,k-1)););); matb[n,k] = v;); return (matb[n,k]);}
    b(n) = {if (n==1, return(a000366(n+1)), return(a000366(n+1) - sum(i=2, n, bi(n,i))));}
    allb(m) = {matb = matrix(m,m); for (i=1, m, print1(b(i), ", "););}

Formula

G.f.: (1-Q(0))/x, where Q(k) = 1 - ((k+1)*(k+2)/2)*x/(1 - ((k+1)*(k+2)/2)*x/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, May 03 2013
G.f.: 1/Q(0), where Q(k) = 1 - ((k+1)*(k+2)/2)*x/(1 - ((k+2)*(k+3)/2)*x/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Nov 17 2013
a(n) = A000366(n + 1) - Sum_{k=2..n} A239894(n, k). - Andrew Howroyd, Feb 25 2020

A239895 Triangle read by rows: T(n,k) (n >= 1, 1 <= k <= n) = number of alternating anagrams on n letters (of length 2n) which are decomposable into at most k components.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 16, 15, 6, 1, 129, 110, 45, 10, 1, 1438, 1104, 435, 105, 15, 1, 20955, 14455, 5334, 1295, 210, 21, 1, 384226, 238536, 81256, 19089, 3220, 378, 28, 1, 8623101, 4834854, 1509246, 335496, 56259, 7056, 630, 36, 1
Offset: 1

Views

Author

N. J. A. Sloane, Apr 04 2014

Keywords

Comments

The Bell transform of A218827(n+1). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 17 2016

Examples

			Triangle begins:
       1;
       1,      1;
       3,      3,     1;
      16,     15,     6,     1;
     129,    110,    45,    10,    1;
    1438,   1104,   435,   105,   15,   1;
   20955,  14455,  5334,  1295,  210,  21,  1;
  384226, 238536, 81256, 19089, 3220, 378, 28, 1;
		

Crossrefs

Row sums are A000366. First column is A218827.

Programs

  • Mathematica
    m = 10(*terms of A218827 for m-1 rows*); matc = Array[0&, {m, m}];
    (* The function BellMatrix is defined in A264428.*)
    a366[n_] := (-2^(-1))^(n - 2)*Sum[Binomial[n, k]*(1 - 2^(n + k + 1))* BernoulliB[n + k + 1], {k, 0, n}];
    ci[n_, k_] := ci[n, k] = Module[{v}, If[matc[[n, k]] == 0, If[n == k, v = 1, If[k == 1, v = c[n], v = Sum[Binomial[n - 1, i - 1]*c[i]*ci[n - i, k - 1], {i, 1, n - k + 1}]]]; matc[[n, k]] = v]; Return[matc[[n, k]] ]];
    c[n_] := a366[n + 1] - If[n == 1, 0, Sum[ci[n, i], {i, 2, n}]]
    T = Rest /@ BellMatrix[c[# + 1]&, m] // Rest;
    Table[T[[n, k]], {n, 1, m - 1}, {k, 1, n}] // Flatten (* Jean-François Alcover, Aug 03 2019 *)
  • Sage
    # uses[bell_matrix from A264428, A218827]
    # Adds a column 1,0,0,0,... at the left side of the triangle.
    A239895_generator = lambda n: A218827(n+1)
    bell_matrix(A239895_generator, 9) # Peter Luschny, Jan 17 2016

Formula

T(n,k) = C(n-1,0)*c(1)*T(n-1,k-1) + C(n-1,1)*c(2)*T(n-2,k-1) + ... + C(n-1,n-1)*c(n-k+1)*T(k-1,k-1), where c(i) = A218827(i).

Extensions

More terms from Peter Luschny, Jan 17 2016
Showing 1-2 of 2 results.