A077935 Duplicate of A077835.
1, 2, 6, 18, 52, 152, 444, 1296, 3784, 11048, 32256, 94176, 274960, 802784, 2343840
Offset: 0
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.
a(4)=76 because among the 3^4=81 ternary words of length 4 only 0000, 0001, 0002, 1000 and 2000 contain 000's. Partition formula from INVERT with T(n) = Trib(n+2) = A000073(n+2) (see the W. Lang comment above) a(4) = 76 = b(5) = 1*T(5) + (2*T(1)*T(4) + 2*T(2)*T(3)) + (3*T(1)^2*T(3) + 3*T(1)*T(2)^2) + 4*T(1)^3*T(2) + 1*T(1)^5, from row n = 5 of A048996: [1, 2, 2, 3, 3, 4, 1]. - _Wolfdieter Lang_, Dec 08 2020
g:=(1+z+z^2)/(1-2*z-2*z^2-2*z^3): gser:=series(g,z=0,32): seq(coeff(gser,z,n),n=0..28); # second Maple program: a:= n-> (<<0|1|0>, <0|0|1>, <2|2|2>>^n. <<1, 3, 9>>)[1, 1]: seq(a(n), n=0..30); # Alois P. Heinz, Oct 30 2012
nn=30;CoefficientList[Series[(1-x^3)/(1-3x+2x^4),{x,0,nn}],x] (* Geoffrey Critzer, Oct 30 2012 *) LinearRecurrence[{2, 2, 2}, {1, 3, 9}, 30] (* Jean-François Alcover, Dec 25 2015 *)
a(n):=sum(sum(binomial(k-1,m-1)*sum(binomial(j,n-3*k+2*j)*binomial(k,j),j,0,k),k,m,n),m,1,n); /* Vladimir Kruchinin, Apr 25 2011 */
a(4)=4 because we have 0001, 0002, 1000 and 2000.
h:=z^3/(1-2*z-2*z^2-2*z^3)^2: hser:=series(h,z=0,33): seq(coeff(hser,z,n), n=0..30);
LinearRecurrence[{4,0,-4,-12,-8,-4},{0,0,0,1,4,16},40] (* Harvey P. Dale, Jan 28 2021 *)
m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1-2*x-2*x^2-2*x^3-2*x^4))); // G. C. Greubel, Sep 24 2018
RecurrenceTable[{a[n] == 2(a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4]), a[0] == 1, a[1] == 2, a[2] == 6, a[3] == 18}, a, {n, 0, 20}] LinearRecurrence[{2,2,2,2},{1,2,6,18},30] (* Harvey P. Dale, Oct 27 2013 *) CoefficientList[Series[1/(1-2*x-2*x^2-2*x^3-2*x^4), {x, 0, 50}], x] (* G. C. Greubel, Sep 24 2018 *)
x='x+O('x^30); Vec(1/(1-2*x-2*x^2-2*x^3-2*x^4)) \\ G. C. Greubel, Sep 24 2018
a:=[1,-2,6];; for n in [4..30] do a[n]:=-2*a[n-1]+2*a[n-2] - 2*a[n-3]; od; a; # G. C. Greubel, Jun 25 2019
R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 1/(1+2*x-2*x^2+2*x^3) )); // G. C. Greubel, Jun 25 2019
CoefficientList[Series[1/(1+2x-2x^2+2x^3),{x,0,30}],x] (* or *) LinearRecurrence[{-2,2,-2},{1,-2,6},30] (* Harvey P. Dale, Jun 17 2014 *)
my(x='x+O('x^30)); Vec(1/(1+2*x-2*x^2+2*x^3)) \\ G. C. Greubel, Jun 25 2019
(1/(1+2*x-2*x^2+2*x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 25 2019
CoefficientList[Series[1/(1 - 4 x - 4 x^2 - 4 x^3), {x, 0, 21}], x] (* Michael De Vlieger, May 07 2025 *)
Comments