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.

User: Jair Taylor

Jair Taylor's wiki page.

Jair Taylor has authored 3 sequences.

A212322 Number of compositions of n such that no two adjacent parts are equal, and the first part is not equal to the last part if there is more than one part.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 13, 17, 29, 55, 99, 161, 293, 507, 881, 1561, 2727, 4743, 8337, 14579, 25497, 44675, 78173, 136753, 239437, 419077, 733377, 1283701, 2246823, 3932249, 6882603, 12046313, 21083545, 36901587, 64586887, 113042011, 197851265, 346287829, 606086169
Offset: 0

Author

Jair Taylor, May 13 2012

Keywords

Comments

Also known as cyclic Carlitz compositions.

Examples

			The cyclic Carlitz compositions of the n = 1...6 are
1;
2;
12, 21, 3;
13, 31, 4;
14, 23, 32, 41,5;
1212, 123, 132, 15, 2121, 213, 231, 24, 312, 321, 42, 51, 6.
		

References

  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010, pages 87-88.

Crossrefs

Removing restriction on the first and last parts gives the Carlitz compositions, A003242.
Row sums of A293595.

Programs

  • Maple
    # For getting the first M-1 terms, from N. J. A. Sloane, Apr 26 2014
    M:=101:
    t1:=add(x^i/(1+x^i),i=1..M):
    t2:=add(x^i/(1+x^i)^2,i=1..M):
    t3:=add(x^(2*i)/(1+x^i),i=1..M):
    t0:=t2/(1-t1)+t3:
    series(t0,x,30);
    seriestolist(%);
  • Mathematica
    terms = 39;
    gf = 1 + Sum[x^k/(1 + x^k)^2, {k, 1, terms}]/(1 - Sum[x^k/(1 + x^k), {k, 1, terms}]) + Sum[x^(2 k)/(1 + x^k), {k, 1, terms}] + O[x]^terms;
    CoefficientList[gf, x] (* Jean-François Alcover, Dec 30 2017 *)
  • PARI
    a(n) = { polcoeff(1 + sum(k=1, n, x^k/(1+x^k)^2 + O(x*x^n))/(1-sum(k=1, n, x^k/(1+x^k) + O(x*x^n))) + sum(k=1, n, x^(2*k)/(1+x^k) + O(x*x^n)), n) } \\ Andrew Howroyd, Oct 14 2017
  • Sage
    for n in range(15):
        Q = []
        for comp in Compositions(n) :
            if len(comp) == 1 or all(comp[k] != comp[k+1] for k in range(-1,len(comp)-1)):
                Q.append(comp)
        print(len(Q))
    

Formula

G.f.: 1 + sum(k>0: x^k/(1+x^k)^2)/(1-sum(k>0, x^k/(1+x^k))) + sum(k>0, x^(2k)/(1+x^k)).
a(n) ~ c * d^n, where d = 1.750241291718309031249738624639... (see A241902), c = 0.350601274598240344779505805689.... - Vaclav Kotesovec, May 01 2014

A182103 Integral of exp(-x)*Phi_n(x) from 0 to infinity, Phi_n the n-th cyclotomic polynomial.

Original entry on oeis.org

0, 2, 4, 3, 34, 2, 874, 25, 727, 20, 4037914, 23, 522956314, 620, 35382, 40321, 22324392524314, 715, 6780385526348314, 39623, 439408062, 3301820, 1177652997443428940314, 40297, 2432903315854636921, 442386620, 6402373706090881, 475412423
Offset: 1

Author

Jair Taylor, Apr 11 2012

Keywords

Comments

Appears to be all positive integers for n>1, suggesting the possibility of a combinatorial interpretation.

Crossrefs

Agrees with A003422(p) for p prime.

Programs

  • Mathematica
    Table[Integrate[Cyclotomic[n, x]/Exp[x], {x, 0, Infinity}], {n, 1, 20}] (* Vaclav Kotesovec, Mar 01 2020 *)
  • Sage
    for n in range(1, 40):
      print(integral(e^(-x)*cyclotomic_polynomial(n),x,0,infinity))

A206268 Number of compositions of n with at most one 1.

Original entry on oeis.org

1, 1, 1, 3, 4, 8, 13, 23, 39, 67, 114, 194, 329, 557, 941, 1587, 2672, 4492, 7541, 12643, 21171, 35411, 59166, 98758, 164689, 274393, 456793, 759843, 1263004, 2097872, 3482269, 5776559, 9576639, 15867427, 26276106, 43489802, 71944217, 118958597, 196605701
Offset: 0

Author

Jair Taylor, Feb 18 2012

Keywords

Examples

			We have a(3) = 3 since 3 = 1 + 2 = 2+1.  A(2) = 1 since 2 is the only composition of 2 that does not have more than one 1.
		

Programs

  • Mathematica
    CoefficientList[Series[(2 x^3 - 2 x^2 - x + 1)/(x^4 + 2 x^3 - x^2 - 2 x + 1), {x, 0, 38}], x] (* Michael De Vlieger, Dec 09 2020 *)
  • Sage
    R. = PowerSeriesRing(QQ)
    f = (2*x^3 - 2*x^2 - x + 1)/(x^4 + 2*x^3 - x^2 - 2*x + 1)
    print(f.list())

Formula

G.f.: (2*x^3 - 2*x^2 - x + 1)/(x^4 + 2*x^3 - x^2 - 2*x + 1).