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.

A205823 T(n,k) = number of (n+1) X (k+1) 0..2 arrays with the number of clockwise edge increases in every 2 X 2 subblock unequal to the number of counterclockwise edge increases.

Original entry on oeis.org

24, 66, 66, 180, 216, 180, 492, 714, 714, 492, 1344, 2430, 2880, 2430, 1344, 3672, 8274, 12318, 12318, 8274, 3672, 10032, 28242, 53100, 67944, 53100, 28242, 10032, 27408, 96402, 230532, 380568, 380568, 230532, 96402, 27408, 74880, 329130, 1002240
Offset: 1

Views

Author

R. H. Hardin, Feb 01 2012

Keywords

Comments

Table starts
....24.....66.....180......492.......1344........3672........10032
....66....216.....714.....2430.......8274.......28242........96402
...180....714....2880....12318......53100......230532......1002240
...492...2430...12318....67944.....380568.....2158482.....12281976
..1344...8274...53100...380568....2791080....20842578....156410676
..3672..28242..230532..2158482...20842578...206195280...2053746000
.10032..96402.1002240.12281976..156410676..2053746000..27196042704
.27408.329130.4361064.70022628.1177361316.20547395916.362290015758

Examples

			Some solutions for n=4, k=3:
..1..0..0..2....0..1..1..2....1..2..1..1....2..1..1..1....2..1..0..0
..1..2..1..2....0..2..0..2....1..0..0..2....2..0..2..0....0..1..2..1
..1..0..1..0....1..2..1..2....1..2..1..1....1..1..1..0....2..1..0..0
..2..0..2..2....1..0..0..2....0..2..0..2....2..0..2..2....0..1..2..1
..2..1..1..0....2..2..1..1....0..1..0..1....2..1..1..0....2..1..0..0
		

Crossrefs

Column 1 is A121907(n+2).

A265584 Array T(n,k) counting words with n letters drawn from a k-letter alphabet with no letter appearing thrice in a 3-letter subword.

Original entry on oeis.org

1, 1, 2, 0, 4, 3, 0, 6, 9, 4, 0, 10, 24, 16, 5, 0, 16, 66, 60, 25, 6, 0, 26, 180, 228, 120, 36, 7, 0, 42, 492, 864, 580, 210, 49, 8, 0, 68, 1344, 3276, 2800, 1230, 336, 64, 9, 0, 110, 3672, 12420, 13520, 7200, 2310, 504, 81, 10, 0, 178, 10032, 47088, 65280, 42150, 15876, 3976, 720, 100, 11
Offset: 1

Views

Author

R. J. Mathar, Dec 10 2015

Keywords

Comments

The antidiagonal sums are s(d) = 1, 3, 7, 19, 55, 173, 597, 2245, 9127, 39827, 185411, 916177, 4784217,.. at index d=n+k >=2.

Examples

			1      2      3      4      5       6       7        8
1      4      9     16     25      36      49       64
0      6     24     60    120     210     336      504
0     10     66    228    580    1230    2310     3976
0     16    180    864   2800    7200   15876    31360
0     26    492   3276  13520   42150  109116   247352
0     42   1344  12420  65280  246750  749952  1950984
0     68   3672  47088 315200 1444500 5154408 15388352
T(3,2) =6 counts the 3-letter words aab, aba, abb, bba, bab, baa. The words aaa and bbb are not counted.
		

Crossrefs

Cf. A265583 (no letter twice), A265624. A000290 (row 2), A007531 (row 3), A006355 (column 2), A121907 (column 3), A123620 (column 4), A123871 (column 5), A123887 (column 6).

Programs

  • Maple
    A265584 := proc(n,k)
        (1+x+x^2)/(1-(k-1)*x-(k-1)*x^2) ;
        coeftayl(%,x=0,n) ;
    end proc:
    seq(seq( A265584(d-k,k),k=1..d-1),d=2..13) ;
  • Mathematica
    T[n_, k_] := SeriesCoefficient[(1+x+x^2)/(1-(k-1)*x-(k-1)*x^2), {x, 0, n}];
    Table[T[n-k, k], {n, 2, 12}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Mar 26 2020, from Maple *)

Formula

T(4,k) = k*(k-1)*(k^2+k-1).
T(5,k) = k^2*(k+2)*(k-1)^2.
T(6,k) = k*(k^3+2*k^2-k-1)*(k-1)^2.
T(7,k) = k*(k+1)*(k^2+2*k-1)*(k-1)^3.

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

Original entry on oeis.org

1, 4, 16, 64, 252, 996, 3936, 15552, 61452, 242820, 959472, 3791232, 14980572, 59193828, 233896896, 924213888, 3651913836, 14430073860, 57018604752, 225301777344, 890251367868, 3517715249892, 13899805185312, 54923315409216, 217022507533260, 857536884383364, 3388448121977520, 13389022541682432, 52905022644129948, 209047479923369700
Offset: 0

Views

Author

N. J. A. Sloane, Apr 08 2011

Keywords

Comments

G.f. for number of ways to spin a dreidel n times without having a run of length 4 of any of gimel, heh, nun or shin.
More generally, fix an alphabet of size M and consider the number of words of length n which do not contain M consecutive equal letters. The present sequence is the case M = 4.
For the cases M=2 through 5 see A040000, A121907, A188714, A188680.

Crossrefs

Cf. A040000, A121907, A188680. Column 4 of A265624.

Programs

  • Maple
    # First download the Maple package DAVID_IAN from the Zeilberger web site
    read(DAVID_IAN);
    M:=4;
    lis1:={}; for i from 1 to M do lis1:={op(lis1),x[i]}; od:
    lis2:={}; for i from 1 to M do t1:=[]; for j from 1 to M do t1:=[op(t1),x[i]]; od: lis2:={op(lis2),t1}; od:
    GJs(lis1, lis2, x);
  • Mathematica
    CoefficientList[Series[(1+x+x^2+x^3)/(1-3x-3x^2-3x^3),{x,0,30}], x]  (* Harvey P. Dale, Apr 16 2011 *)

A143787 Number of compositions of n into floor((3*j)/2) kinds of j's for all j>=1.

Original entry on oeis.org

1, 1, 4, 11, 33, 95, 278, 808, 2355, 6856, 19969, 58151, 169353, 493190, 1436288, 4182793, 12181260, 35474611, 103310209, 300862991, 876181998, 2551642760, 7430968523, 21640683328, 63022629465, 183536340391, 534499885849, 1556586163406, 4533135643968, 13201529892305, 38445880553108, 111963215139163, 326062542045345
Offset: 0

Views

Author

Joerg Arndt, Jul 06 2011

Keywords

Comments

The g.f. for compositions of k_1 kinds of 1's, k_2 kinds of 2's, ..., k_j kinds of j's, ... is 1/(1-sum(j>=1, k_j * x^j )).

Crossrefs

Cf. A121907 (floor((3*j-1)/2)), A055841 (3*j-1), A052156 (2*j-1), A006053 (floor(j/2)), A176848 (floor(j/3)).

Programs

  • Mathematica
    LinearRecurrence[{2,3,-1},{1,1,4,11},50] (* Paolo Xausa, Nov 14 2023 *)

Formula

a(n) = +2*a(n-1) +3*a(n-2) -1*a(n-3).
G.f.: ((1-x)^2*(1+x))/(1-2*x-3*x^2+x^3).
G.f.: 1/(1-sum(j>=1, floor((3*j)/2)*x^j )).

A176848 Number of compositions of n into floor(j/3) kinds of j's for all j>=1.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 3, 4, 5, 10, 15, 21, 36, 56, 83, 134, 210, 320, 505, 791, 1221, 1911, 2988, 4639, 7240, 11305, 17595, 27436, 42806, 66691, 103968, 162144, 252720, 393965, 614285, 957581, 1492791, 2327396, 3628273, 5656274, 8818275, 13747425, 21431700, 33411976, 52088551, 81204526, 126596778, 197361904, 307682405
Offset: 0

Views

Author

Joerg Arndt, Jul 06 2011

Keywords

Comments

The g.f. for compositions of k_1 kinds of 1's, k_2 kinds of 2's, ..., k_j kinds of j's, ... is 1/(1-sum(j>=1, k_j * x^j )).

Crossrefs

Cf. A121907 (floor((3*j-1)/2)), A055841 (3*j-1), A052156 (2*j-1), A006053 (floor(j/2)), A143787 (floor((3*j)/2)).

Programs

  • PARI
    N=66; x='x+O('x^N) /* that many terms */
    gf= 1/(1-sum(j=1,N, floor(j/3)*x^j ))
    Vec(gf) /* show terms */

Formula

G.f.: 1/(1-sum(j>=1, floor(j/3)*x^j )).
Conjectural g.f.: (x-1)^2*(x^2+x+1) / (x^4-2*x^3-x+1). - Colin Barker, May 15 2013
G.f.: 1 + x^3*Q(0)/2 , where Q(k) = 1 + 1/(1 - x*(4*k+1 + 2*x^2 - x^3)/( x*(4*k+3 + 2*x^2 - x^3 ) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 11 2013

A188580 Number of words of length n over an alphabet of size 5 which do not contain a run of 5 identical letters.

Original entry on oeis.org

1, 5, 25, 125, 625, 3120, 15580, 77800, 388500, 1940000, 9687520, 48375280, 241565200, 1206272000, 6023600000, 30079249920, 150202748480, 750047481600, 3745412320000, 18702967200000, 93394519000320, 466371784007680, 2328858730112000, 11629312001280000, 58071748137600000, 289985162611998720, 1448060325923962880, 7230986194699366400
Offset: 0

Views

Author

N. J. A. Sloane, Apr 09 2011

Keywords

Comments

This is the case M=5 of the general problem mentioned in A188714.

Crossrefs

Programs

  • Maple
    See A188714.
  • Mathematica
    CoefficientList[Series[(1 + x + x^2 + x^3 + x^4)/(1 - 4*x - 4*x^2 - 4*x^3 - 4*x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 09 2012 *)

Formula

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

A181140 The number of ways to color n balls in a row with 3 colors with no color runs having lengths greater than 4. This sequence is a special case of the general problem for coloring n balls in a row with p colors where each color has a given maximum run-length. In this example, the bounds are uniformly 4. It can be phrased in terms of tossing a p-faced die n times, requiring each face to have no runs longer than b.

Original entry on oeis.org

3, 9, 27, 81, 240, 714, 2124, 6318, 18792, 55896, 166260, 494532, 1470960, 4375296, 13014096, 38709768, 115140240, 342478800, 1018685808, 3030029232, 9012668160, 26807724000, 79738214400, 237177271584, 705471756288, 2098389932544
Offset: 1

Views

Author

William Sit (wyscc(AT)sci.ccny.cuny.edu), Oct 06 2010

Keywords

Comments

Generating function and recurrence for given p and uniform bound b are known.
a(n+b) = (p-1)(a(n) + ... + a(n+b-1)),
using b initial values a(1)=p, a(2)=p^2, ..., a(b)=p^(b).
The g.f. is p G/(1-(p-1)G) where G = t + t^2 + ... + t^b.

Examples

			The first nontrivial value is a(5)=240. These solutions are listed below: 11112,11113,11121,11122,11123,
11131,11132,11133,11211,11212,11213,11221,11222,11223,11231,11232,11233,11311,11312,11313,11321,11322,11323,
11331,11332,11333,12111,12112,12113,12121,12122,12123,12131,12132,12133,12211,12212,12213,12221,12222,12223,
12231,12232,12233,12311,12312,12313,12321,12322,12323,12331,12332,12333,13111,13112,13113,13121,13122,13123,
13131,13132,13133,13211,13212,13213,13221,13222,13223,13231,
13232,13233,13311,13312,13313,13321,13322,13323,13331,13332,13333,21111,21112,21113,21121,21122,21123,21131,
21132,21133,21211,21212,21213,21221,21222,21223,21231,21232,21233,21311,21312,21313,21321,21322,21323,21331,
21332,21333,22111,22112,22113,22121,22122,22123,22131,22132,22133,22211,22212,22213,22221,22223,22231,22232,
22233,22311,22312,22313,22321,22322,22323,22331,22332,22333,23111,23112,23113,23121,23122,23123,23131,23132,
23133,23211,23212,23213,23221,23222,23223,23231,23232,23233,23311,
23312,23313,23321,23322,23323,23331,23332,23333,31111,31112,31113,31121,31122,31123,31131,31132,31133,31211,
31212,31213,31221,31222,31223,31231,31232,31233,31311,31312,31313,31321,31322,31323,31331,31332,31333,32111,
32112,32113,32121,32122,32123,32131,32132,32133,32211,32212,32213,32221,32222,32223,32231,32232,32233,32311,
32312,32313,32321,32322,32323,32331,32332,32333,33111,33112,33113,33121,33122,33123,33131,33132,33133,33211,
33212,33213,33221,33222,33223,33231,33232,33233,33311,33312,33313,33321,33322,33323,33331,33332
		

Crossrefs

Programs

  • Mathematica
    (* next[p,z] computes the next member in a sequence and next[p,z] = a(n+b)= (p-1)( c(b)+ ... + c(n+b-1))
    where z is the preceding b items on the sequence starting with a(n) where b is the uniform bound on runs.
    The function sequence[p,z,n] computes the next n terms. *)
    next[p_,z_]:=(p-1) Apply[Plus,z]
    sequence[p_,z_,n_]:=Module[{y=z,seq=z, m=n, b=Length[z]}, While[m>0, seq = Join[seq,{next[p,y]}]; y = Take[seq, -b]; m-- ]; seq]
    (* sequence[3,{3,9,27,81},10] computes the next 10 terms after 3,9,27, 81. *)

Formula

For this sequence (p=3, b=4):
G.f.: 3t(t^3+t^2+t+1)/(1 - 2t(t^3+t^2+t+1));
a(n+4) = 2(a(n)+a(n+1)+a(n+2)+a(n+3)); a(1)=3, a(2)=9, a(3)=27, a(4)=81.
Showing 1-7 of 7 results.