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

A081038 3rd binomial transform of (1,2,0,0,0,0,0,0,...).

Original entry on oeis.org

1, 5, 21, 81, 297, 1053, 3645, 12393, 41553, 137781, 452709, 1476225, 4782969, 15411789, 49424013, 157837977, 502211745, 1592728677, 5036466357, 15884240049, 49977243081, 156905298045, 491636600541, 1537671920841
Offset: 0

Views

Author

Paul Barry, Mar 03 2003

Keywords

Comments

a(n) is the number of distinguished parts in all compositions of n+1 in which some (possibly all or none) of the parts have been distinguished. a(1) = 2 because we have: 2', 1'+1, 1+1', 1'+1' where we see 5's marking the distinguished parts. With offset=1, a(n) = Sum_{k=1..n} A200139(n,k)*k. - Geoffrey Critzer, Jan 12 2013
For n>=1, a(n-1) the number of ternary strings of length 2n containing the block 11..12 with n ones where no runs of length larger than n are permitted. - Marko Riedel, Mar 08 2016
Binomial transform of {A001787(n + 1)}{n >= 0}. - _Wolfdieter Lang, Oct 01 2019

Crossrefs

Programs

Formula

G.f.: (1-x)/(1-3*x)^2.
a(n) = 6*a(n-1) - 9*a(n-2), with a(0)=1, a(1)=5.
a(n) = (2*n+3)*3^(n-1).
a(n) = Sum_{k=0..n} (k+1)*2^k*binomial(n, k).
a(n) = 2*A086972(n) - 1. - Lambert Herrgesell (zero815(AT)googlemail.com), Feb 10 2008
From Amiram Eldar, May 17 2022: (Start)
Sum_{n>=0} 1/a(n) = 9*(sqrt(3)*arctanh(1/sqrt(3)) - 1).
Sum_{n>=0} (-1)^n/a(n) = 9 - 3*sqrt(3)*Pi/2. (End)
E.g.f.: exp(3*x)*(1 + 2*x). - Stefano Spezia, Jan 31 2025

A269914 Number of ternary strings of length n with maximal run length two containing 112.

Original entry on oeis.org

1, 5, 20, 71, 237, 761, 2377, 7278, 21945, 65375, 192861, 564387, 1640496, 4741103, 13634501, 39042437, 111379025, 316687006, 897796581, 2538530615, 7160768785, 20156241155, 56626360256, 158804376883, 444638710925, 1243115597929, 3470779612521, 9678320566654
Offset: 3

Views

Author

Marko Riedel, Mar 07 2016

Keywords

Crossrefs

Programs

  • Mathematica
    Drop[CoefficientList[Series[x^3 (x + 1) (x^2 + x + 1)/((2 x^2 + 2 x - 1) (x^4 + 3 x^3 + 3 x^2 + x - 1)), {x, 0, 30}], x], 3] (* Michael De Vlieger, Mar 08 2016 *)

Formula

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

A269916 Number of ternary strings of length n with maximal run length four containing 11112.

Original entry on oeis.org

1, 5, 21, 81, 296, 1043, 3585, 12095, 40221, 132225, 430633, 1391623, 4467689, 14262766, 45311977, 143343279, 451768405, 1419092951, 4444424613, 13882255419, 43256925753, 134492621659, 417322590000, 1292554593007, 3996626787973, 12338508959035, 38037021764053
Offset: 5

Views

Author

Marko Riedel, Mar 07 2016

Keywords

Crossrefs

Programs

  • Mathematica
    Drop[CoefficientList[Series[x^5 (x + 1) (x^2 + 1) (x^4 + x^3 + x^2 + x + 1)/((x^8 + 3 x^7 + 5 x^6 + 7 x^5 + 7 x^4 + 5 x^3 + 3 x^2 + x - 1) (2 x^4 + 2 x^3 + 2 x^2 + 2 x - 1)), {x, 0, 31}], x], 5] (* Michael De Vlieger, Mar 08 2016 *)

Formula

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

A269917 Number of ternary strings of length n with maximal run length five containing 111112.

Original entry on oeis.org

1, 5, 21, 81, 297, 1052, 3635, 12333, 41255, 136449, 447147, 1454091, 4697983, 15094393, 48264551, 153678185, 487510286, 1541427097, 4859385039, 15278735029, 47923821239, 149992151725, 468512665975, 1460770946689, 4546890238683, 14131055304241, 43854326838403
Offset: 6

Views

Author

Marko Riedel, Mar 07 2016

Keywords

Crossrefs

Programs

  • Mathematica
    Drop[CoefficientList[Series[x^6 (x + 1) (x^2 + x + 1) (x^2 - x + 1) (x^4 + x^3 + x^2 + x + 1)/((2 x^5 + 2 x^4 + 2 x^3 + 2 x^2 + 2 x - 1) (x^10 + 3 x^9 + 5 x^8 + 7 x^7 + 9 x^6 + 9 x^5 + 7 x^4 + 5 x^3 + 3 x^2 + x - 1)), {x, 0, 32}], x], 6] (* Michael De Vlieger, Mar 08 2016 *)

Formula

G.f.: x^6*(x+1)*(x^2+x+1)*(x^2-x+1)*(x^4+x^3+x^2+x+1) / ((2*x^5+2*x^4 +2*x^3 +2*x^2+2*x-1) * (x^10+3*x^9+5*x^8+7*x^7+9*x^6+9*x^5 +7*x^4 +5*x^3 +3*x^2+x-1)).

A309000 Number of strings of length n from a 3-symbol alphabet (A,B,C, say) containing at least one "A" and at least two "B"s.

Original entry on oeis.org

3, 22, 105, 416, 1491, 5034, 16365, 51892, 161799, 498686, 1524705, 4635528, 14037627, 42391378, 127763925, 384536924, 1156232175, 3474201510, 10434138825, 31326533680, 94029932643, 282194655482, 846802070205, 2540859195396, 7623517110231, 22872497487694
Offset: 3

Views

Author

Adam Vellender, Jul 04 2019

Keywords

Comments

This sequence can be thought of as the number of ways of rolling n 3-sided dice (with sides "A", "B", and "C") and obtaining at least one A and at least two B's.
The general formula is readily proved true by counting arguments.

Examples

			Suppose three-sided dice each have sides labeled A,B,C.
If there are three dice, then ABB, BAB, and BBA are the three strings resulting from rolling the dice satisfying the property of at least one A and at least two B's, hence a(3)=3 [Note a(0)=a(1)=a(2)=0].
If there are four such dice, there are 22 such permutations, hence a(4)=22: AABB, ABAB, ABBA, ABBB, ABBC, ABCB, ACBB, BAAB, BABA, BABB, BABC, BACB, BBAA, BBAB, BBAC, BBBA, BBCA, BCAB, BCBA, CABB, CBAB, CBBA.
		

Crossrefs

Programs

  • Magma
    [3^n-2^(n+1)-n*2^(n-1)+n+1: n in [3..40]]; // Vincenzo Librandi, Jul 05 2019
  • Mathematica
    Array[3^# - 2^(# + 1) - # 2^(# - 1) + # + 1 &, 27, 3] (* or *)
    CoefficientList[Series[(-3 + 5 x)/((-1 + 3 x) (1 - 3 x + 2 x^2)^2), {x, 0, 26}], x] (* Michael De Vlieger, Jul 04 2019 *)
  • Python
    [3**n-2**(n+1)-n*2**(n-1)+n+1 for n in range(3,20)]
    

Formula

a(n) = 3^n - 2^(n+1) - n*2^(n-1) + n + 1.
G.f.: x^3*(-3 + 5*x)/((-1 + 3*x)*(1 - 3*x + 2*x^2)^2). - Michael De Vlieger, Jul 04 2019.
a(n) = 9*a(n-1) - 31*a(n-2) + 51*a(n-3) - 40*a(n-4) + 12*a(n-5) for n > 7. - Stefano Spezia, Jul 05 2019
Showing 1-5 of 5 results.