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

A143454 Expansion of 1/(x^k*(1 - x - 3*x^(k+1))) for k=3.

Original entry on oeis.org

1, 4, 7, 10, 13, 25, 46, 76, 115, 190, 328, 556, 901, 1471, 2455, 4123, 6826, 11239, 18604, 30973, 51451, 85168, 140980, 233899, 388252, 643756, 1066696, 1768393, 2933149, 4864417, 8064505, 13369684, 22169131, 36762382, 60955897, 101064949, 167572342
Offset: 0

Views

Author

Alois P. Heinz, Aug 16 2008

Keywords

Comments

a(n) is also the number of length n quaternary words with at least 3 0-digits between any other digits.
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 7, 4*a(n-7) equals the number of 4-colored compositions of n with all parts >= 4, such that no adjacent parts have the same color. - Milan Janjic, Nov 27 2011

Crossrefs

3rd column of A143461.

Programs

  • Magma
    [n le 4 select 3*n-2 else Self(n-1) +3*Self(n-4): n in [1..51]]; // G. C. Greubel, May 08 2021
    
  • Maple
    a:= proc(k::nonnegint) local n,i,j; if k=0 then unapply(4^n,n) else unapply((Matrix(k+1, (i,j)-> if (i=j-1) or j=1 and i=1 then 1 elif j=1 and i=k+1 then 3 else 0 fi)^(n+k))[1,1], n) fi end(3): seq(a(n), n=0..50);
  • Mathematica
    a[n_]:= Sum[3^j*Binomial[n-3*j+3, j], {j, 0, (n+3)/3}]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 04 2014, after Vladimir Kruchinin *)
    LinearRecurrence[{1,0,0,3}, {1,4,7,10}, 41] (* G. C. Greubel, May 08 2021 *)
  • Maxima
    a(n):= sum(3^j*binomial(n-3*j+3,j), j,0,(n+3)/3); /* Vladimir Kruchinin, May 24 2011 */
    
  • PARI
    Vec(1/(x^3*(1-x-3*x^4))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    
  • PARI
    my(p=Mod('x,'x^4-'x^3-3)); a(n) = vecsum(Vec(lift(p^(n+3)))); \\ Kevin Ryde, May 11 2021
    
  • Sage
    def a(n): return 3*n+1 if (n<4) else a(n-1) + 3*a(n-4)
    [a(n) for n in (0..40)] # G. C. Greubel, May 08 2021

Formula

G.f.: (1 + 3*x + 3*x^2 + 3*x^3) / (1 - x - 3*x^4). - R. J. Mathar, Aug 04 2019
a(n) = Sum_{j=0..(n+3)/3} 3^j*C(n-3*j+3,j). - Vladimir Kruchinin, May 24 2011

A143455 Expansion of 1/(x^k*(1-x-3*x^(k+1))) for k=4.

Original entry on oeis.org

1, 4, 7, 10, 13, 16, 28, 49, 79, 118, 166, 250, 397, 634, 988, 1486, 2236, 3427, 5329, 8293, 12751, 19459, 29740, 45727, 70606, 108859, 167236, 256456, 393637, 605455, 932032, 1433740, 2203108, 3384019, 5200384, 7996480, 12297700, 18907024
Offset: 0

Views

Author

Alois P. Heinz, Aug 16 2008

Keywords

Comments

a(n) is also the number of length n quaternary words with at least 4 0-digits between any other digits.
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=9, 4*a(n-9) equals the number of 4-colored compositions of n with all parts >=5, such that no adjacent parts have the same color. - Milan Janjic, Nov 27 2011

Crossrefs

4th column of A143461.

Programs

  • Maple
    a:= proc(k::nonnegint) local n,i,j; if k=0 then unapply(4^n,n) else unapply((Matrix(k+1, (i,j)-> if(i=j-1) or j=1 and i=1 then 1 elif j=1 and i=k+1 then 3 else 0 fi)^(n+k))[1,1], n) fi end(4): seq(a(n), n=0..50);
  • Mathematica
    Series[1/(1-x-3*x^5), {x, 0, 50}] // CoefficientList[#, x]& // Drop[#, 4]& (* Jean-François Alcover, Feb 13 2014 *)

Formula

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

A143456 Expansion of 1/(x^k*(1-x-3*x^(k+1))) for k=5.

Original entry on oeis.org

1, 4, 7, 10, 13, 16, 19, 31, 52, 82, 121, 169, 226, 319, 475, 721, 1084, 1591, 2269, 3226, 4651, 6814, 10066, 14839, 21646, 31324, 45277, 65719, 95917, 140434, 205372, 299344, 435175, 632332, 920083, 1341385, 1957501, 2855533, 4161058, 6058054
Offset: 0

Views

Author

Alois P. Heinz, Aug 16 2008

Keywords

Comments

a(n) is also the number of length n quaternary words with at least 5 0-digits between any other digits.

Crossrefs

5th column of A143461.

Programs

  • Maple
    a:= proc(k::nonnegint) local n,i,j; if k=0 then unapply(4^n,n) else unapply((Matrix(k+1, (i,j)-> if (i=j-1) or j=1 and i=1 then 1 elif j=1 and i=k+1 then 3 else 0 fi)^(n+k))[1,1], n) fi end(5): seq(a(n), n=0..52);
  • Mathematica
    Series[1/(1-x-3*x^6), {x, 0, 52}] // CoefficientList[#, x]& // Drop[#, 5]& (* Jean-François Alcover, Feb 13 2014 *)

Formula

G.f.: 1/(x^5*(1-x-3*x^6)).

A143457 Expansion of 1/(x^k*(1-x-3*x^(k+1))) for k=6.

Original entry on oeis.org

1, 4, 7, 10, 13, 16, 19, 22, 34, 55, 85, 124, 172, 229, 295, 397, 562, 817, 1189, 1705, 2392, 3277, 4468, 6154, 8605, 12172, 17287, 24463, 34294, 47698, 66160, 91975, 128491, 180352, 253741, 356623, 499717, 698197, 974122, 1359595, 1900651
Offset: 0

Views

Author

Alois P. Heinz, Aug 16 2008

Keywords

Comments

a(n) is also the number of length n quaternary words with at least 6 0-digits between any other digits.

Crossrefs

6th column of A143461.

Programs

  • Maple
    a := proc(k::nonnegint) local n,i,j; if k=0 then unapply (4^n,n) else unapply ((Matrix(k+1, (i,j)-> if (i=j-1) or j=1 and i=1 then 1 elif j=1 and i=k+1 then 3 else 0 fi)^(n+k))[1,1], n) fi end(6): seq (a(n), n=0..55);
  • Mathematica
    Series[1/(1-x-3*x^7), {x, 0, 55}] // CoefficientList[#, x]& // Drop[#, 6]& (* Jean-François Alcover, Feb 13 2014 *)

Formula

G.f.: 1/(x^6*(1-x-3*x^7)).

A143458 Expansion of 1/(x^k*(1-x-3*x^(k+1))) for k=7.

Original entry on oeis.org

1, 4, 7, 10, 13, 16, 19, 22, 25, 37, 58, 88, 127, 175, 232, 298, 373, 484, 658, 922, 1303, 1828, 2524, 3418, 4537, 5989, 7963, 10729, 14638, 20122, 27694, 37948, 51559, 69526, 93415, 125602, 169516, 229882, 312964, 426808, 581485, 790063, 1070308, 1447114
Offset: 0

Views

Author

Alois P. Heinz, Aug 16 2008

Keywords

Comments

a(n) is also the number of length n quaternary words with at least 7 0-digits between any other digits.

Crossrefs

7th column of A143461.

Programs

  • Maple
    a := proc(k::nonnegint) local n,i,j; if k=0 then unapply (4^n,n) else unapply ((Matrix(k+1, (i,j)-> if (i=j-1) or j=1 and i=1 then 1 elif j=1 and i=k+1 then 3 else 0 fi)^(n+k))[1,1], n) fi end(7): seq (a(n), n=0..60);
  • Mathematica
    LinearRecurrence[{1,0,0,0,0,0,0,3},{1,4,7,10,13,16,19,22},50] (* Harvey P. Dale, Jul 22 2013 *)

Formula

G.f.: 1/(x^7*(1-x-3*x^8)).
a(0)=1, a(1)=4, a(2)=7, a(3)=10, a(4)=13, a(5)=16, a(6)=19, a(7)=22, a(n)=a(n-1)+3*a(n-8). - Harvey P. Dale, Jul 22 2013

A143459 Expansion of 1/(x^k*(1-x-3*x^(k+1))) for k=8.

Original entry on oeis.org

1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 40, 61, 91, 130, 178, 235, 301, 376, 460, 580, 763, 1036, 1426, 1960, 2665, 3568, 4696, 6076, 7816, 10105, 13213, 17491, 23371, 31366, 42070, 56158, 74386, 97834, 128149, 167788, 220261, 290374, 384472, 510682
Offset: 0

Views

Author

Alois P. Heinz, Aug 16 2008

Keywords

Comments

a(n) is also the number of length n quaternary words with at least 8 0-digits between any other digits.

Crossrefs

8th column of A143461.

Programs

  • Maple
    a := proc(k::nonnegint) local n,i,j; if k=0 then unapply (4^n,n) else unapply ((Matrix(k+1, (i,j)-> if (i=j-1) or j=1 and i=1 then 1 elif j=1 and i=k+1 then 3 else 0 fi)^(n+k))[1,1], n) fi end(8): seq (a(n), n=0..58);
  • Mathematica
    Series[1/(1-x-3*x^9), {x, 0, 58}] // CoefficientList[#, x]& // Drop[#, 8]& (* Jean-François Alcover, Feb 13 2014 *)

Formula

G.f.: 1/(x^8*(1-x-3*x^9)).

A143460 Expansion of 1/(x^k*(1-x-3*x^(k+1))) for k=9.

Original entry on oeis.org

1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 43, 64, 94, 133, 181, 238, 304, 379, 463, 556, 685, 877, 1159, 1558, 2101, 2815, 3727, 4864, 6253, 7921, 9976, 12607, 16084, 20758, 27061, 35506, 46687, 61279, 80038, 103801, 133729, 171550, 219802, 282076
Offset: 0

Views

Author

Alois P. Heinz, Aug 16 2008

Keywords

Comments

a(n) is also the number of length n quaternary words with at least 9 0-digits between any other digits.

Crossrefs

9th column of A143461.

Programs

  • Maple
    a := proc(k::nonnegint) local n,i,j; if k=0 then unapply (4^n,n) else unapply ((Matrix(k+1, (i,j)-> if (i=j-1) or j=1 and i=1 then 1 elif j=1 and i=k+1 then 3 else 0 fi)^(n+k))[1,1], n) fi end(9): seq (a(n), n=0..61);
  • Mathematica
    Series[1/(1-x-3*x^10), {x, 0, 61}] // CoefficientList[#, x]& // Drop[#, 9]& (* Jean-François Alcover, Feb 13 2014 *)

Formula

G.f.: 1/(x^9*(1-x-3*x^10)).
Showing 1-7 of 7 results.