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

A143453 Square array A(n,k) of numbers of length n ternary words with at least k 0-digits between any other digits (n,k >= 0), read by antidiagonals.

Original entry on oeis.org

1, 1, 3, 1, 3, 9, 1, 3, 5, 27, 1, 3, 5, 11, 81, 1, 3, 5, 7, 21, 243, 1, 3, 5, 7, 13, 43, 729, 1, 3, 5, 7, 9, 23, 85, 2187, 1, 3, 5, 7, 9, 15, 37, 171, 6561, 1, 3, 5, 7, 9, 11, 25, 63, 341, 19683, 1, 3, 5, 7, 9, 11, 17, 39, 109, 683, 59049, 1, 3, 5, 7, 9, 11, 13, 27, 57, 183, 1365, 177147
Offset: 0

Views

Author

Alois P. Heinz, Aug 16 2008

Keywords

Examples

			A(3,1) = 11, because 11 ternary words of length 3 have at least 1 0-digit between any other digits: 000, 001, 002, 010, 020, 100, 101, 102, 200, 201, 202.
Square array A(n,k) begins:
     1,   1,  1,  1,  1,  1,  1,  1, ...
     3,   3,  3,  3,  3,  3,  3,  3, ...
     9,   5,  5,  5,  5,  5,  5,  5, ...
    27,  11,  7,  7,  7,  7,  7,  7, ...
    81,  21, 13,  9,  9,  9,  9,  9, ...
   243,  43, 23, 15, 11, 11, 11, 11, ...
   729,  85, 37, 25, 17, 13, 13, 13, ...
  2187, 171, 63, 39, 27, 19, 15, 15, ...
		

Crossrefs

Column k=0: A000244, k=1: A001045(n+2), k=2: A003229(n+1) and A077949(n+2), k=3: A052942(n+3), k=4: A143447, k=5: A143448, k=6: A143449, k=7: A143450, k=8: A143451, k=9: A143452.
Diagonal: A005408.

Programs

  • Maple
    A := proc (n::nonnegint, k::nonnegint) option remember; if k=0 then 3^n elif n<=k+1 then 2*n+1 else A(n-1, k) +2*A(n-k-1, k) fi end: seq(seq(A(n,d-n), n=0..d), d=0..14);
  • Mathematica
    a[n_, 0] := 3^n; a[n_, k_] /; n <= k+1 := 2*n+1; a[n_, k_] := a[n, k] = a[n-1, k] + 2*a[n-k-1, k]; Table[a[n-k, k], {n, 0, 14}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Dec 11 2013 *)

Formula

G.f. of column k: 1/(x^k*(1-x-2*x^(k+1))).
A(n,k) = 3^n if k=0, else A(n,k) = 2*n+1 if n<=k+1, else A(n,k) = A(n-1,k) + 2*A(n-k-1,k).

A318777 Coefficients in expansion of 1/(1 - x - 2*x^5).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 5, 7, 9, 11, 17, 27, 41, 59, 81, 115, 169, 251, 369, 531, 761, 1099, 1601, 2339, 3401, 4923, 7121, 10323, 15001, 21803, 31649, 45891, 66537, 96539, 140145, 203443, 295225, 428299, 621377, 901667, 1308553, 1899003, 2755601, 3998355, 5801689, 8418795
Offset: 0

Views

Author

Zagros Lalo, Sep 25 2018

Keywords

Comments

The coefficients in the expansion of 1/(1 - x - 2*x^5) are given by the sequence generated by the row sums in triangle A318775.
Coefficients in expansion of 1/(1 - x - 2*x^5) are given by the sum of numbers along "fourth Layer" skew diagonals pointing top-right in triangle A013609 ((1+2x)^n) and by the sum of numbers along "fourth Layer" skew diagonals pointing top-left in triangle A038207 ((2+x)^n), see links.

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3.

Crossrefs

Essentially a duplicate of A143447.

Programs

  • GAP
    a:=[1,1,1,1,1,3];; for n in [7..50] do a[n]:=a[n-1]+2*a[n-5]; od; a; # Muniru A Asiru, Sep 26 2018
  • Maple
    seq(coeff(series((1-x-2*x^5)^(-1),x,n+1), x, n), n = 0 .. 50); # Muniru A Asiru, Sep 26 2018
  • Mathematica
    a[0] = 1; a[n_] := a[n] = If[n < 0, 0, a[n - 1] + 2 * a[n - 5]];Table[a[n], {n, 0, 45}] // Flatten
    LinearRecurrence[{1, 0, 0, 0, 2}, {1, 1, 1, 1, 1}, 46]
    CoefficientList[Series[1/(1 - x - 2 x^5), {x, 0, 45}], x]

Formula

a(0)=1, a(n) = a(n-1) + 2 * a(n-5) for n = 0,1...; a(n)=0 for n < 0.
G.f.: -1/(2*x^5 + x - 1). - Chai Wah Wu, Aug 03 2020

A193517 T(n,k) = number of ways to place any number of 5X1 tiles of k distinguishable colors into an nX1 grid.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 4, 5, 4, 1, 1, 1, 1, 5, 7, 7, 5, 1, 1, 1, 1, 6, 9, 10, 9, 6, 1, 1, 1, 1, 7, 11, 13, 13, 11, 8, 1, 1, 1, 1, 8, 13, 16, 17, 16, 17, 11, 1, 1, 1, 1, 9, 15, 19, 21, 21, 28, 27, 15, 1, 1, 1, 1, 10, 17, 22, 25, 26, 41, 49, 41, 20, 1, 1, 1
Offset: 1

Views

Author

R. H. Hardin, with proof and formula from Robert Israel in the Sequence Fans Mailing List, Jul 29 2011

Keywords

Comments

Table starts:
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..1..1...1...1...1...1...1....1....1....1....1....1....1....1....1....1....1
..2..3...4...5...6...7...8....9...10...11...12...13...14...15...16...17...18
..3..5...7...9..11..13..15...17...19...21...23...25...27...29...31...33...35
..4..7..10..13..16..19..22...25...28...31...34...37...40...43...46...49...52
..5..9..13..17..21..25..29...33...37...41...45...49...53...57...61...65...69
..6.11..16..21..26..31..36...41...46...51...56...61...66...71...76...81...86
..8.17..28..41..56..73..92..113..136..161..188..217..248..281..316..353..392
.11.27..49..77.111.151.197..249..307..371..441..517..599..687..781..881..987
.15.41..79.129.191.265.351..449..559..681..815..961.1119.1289.1471.1665.1871
.20.59.118.197.296.415.554..713..892.1091.1310.1549.1808.2087.2386.2705.3044
.26.81.166.281.426.601.806.1041.1306.1601.1926.2281.2666.3081.3526.4001.4506

Examples

			Some solutions for n=11 k=3; colors=1, 2, 3; empty=0
..0....2....2....0....0....1....0....3....3....0....0....0....0....3....1....0
..0....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..0....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....2....2....0....1....1....3....3....3....3....2....3....1....3....1....1
..3....1....0....2....1....0....3....3....0....3....2....3....1....0....0....1
..3....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..3....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....1....3....2....1....1....2....3....2....0....0....3....0....3....0....2
..0....0....3....0....1....1....2....0....2....0....0....3....0....3....0....2
		

Crossrefs

Column 1 is A003520,
Column 2 is A143447(n-4),
Column 3 is A143455(n-4),
Row 10 is A028884.

Programs

  • Maple
    T:= proc(n, k) option remember;
          `if`(n<0, 0,
          `if`(n<5 or k=0, 1, k*T(n-5, k) +T(n-1, k)))
        end:
    seq(seq(T(n, d+1-n), n=1..d), d=1..13); # Alois P. Heinz, Jul 29 2011
  • Mathematica
    T[n_, k_] := T[n, k] = If[n<0, 0, If[n < 5 || k == 0, 1, k*T[n-5, k]+T[n-1, k]]]; Table[Table[T[n, d+1-n], {n, 1, d}], {d, 1, 14}] // Flatten (* Jean-François Alcover, Mar 04 2014, after Alois P. Heinz *)

Formula

With z X 1 tiles of k colors on an n X 1 grid (with n >= z), either there is a tile (of any of the k colors) on the first spot, followed by any configuration on the remaining (n-z) X 1 grid, or the first spot is vacant, followed by any configuration on the remaining (n-1) X 1. So T(n,k) = T(n-1,k) + k*T(n-z,k), with T(n,k) = 1 for n=0,1,...,z-1. The solution is T(n,k) = sum_r r^(-n-1)/(1 + z k r^(z-1)) where the sum is over the roots of the polynomial k x^z + x - 1.
T(n,k) = sum {s=0..[n/5]} (binomial(n-4*s,s)*k^s).
For z X 1 tiles, T(n,k,z) = sum{s=0..[n/z]} (binomial(n-(z-1)*s,s)*k^s). - R. H. Hardin, Jul 31 2011
Showing 1-3 of 3 results.