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.

Previous Showing 21-30 of 35 results. Next

A373958 Number of compositions of 6*n-3 into parts 1 and 6.

Original entry on oeis.org

1, 5, 21, 92, 414, 1869, 8427, 37975, 171121, 771119, 3474913, 15659094, 70564951, 317988473, 1432958824, 6457375642, 29099021980, 131129599227, 590912361256, 2662842109828, 11999627299824, 54074199444301, 243675821963849, 1098082020999797, 4948312537227216
Offset: 1

Views

Author

Seiichi Manyama, Jun 23 2024

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7,-15,20,-15,6,-1},{1,5,21,92,414,1869},30] (* Harvey P. Dale, Nov 04 2024 *)
  • PARI
    a(n) = sum(k=0, n, binomial(n+2+5*k, n-1-k));

Formula

a(n) = A005708(6*n-3).
a(n) = Sum_{k=0..n} binomial(n+2+5*k,n-1-k).
a(n) = 7*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6).
G.f.: x*(1-x)^2/((1-x)^6 - x).
a(n) = A373302(n) - A373302(n-1).

A373959 Number of compositions of 6*n-4 into parts 1 and 6.

Original entry on oeis.org

1, 4, 16, 71, 322, 1455, 6558, 29548, 133146, 599998, 2703794, 12184181, 54905857, 247423522, 1114970351, 5024416818, 22641646338, 102030577247, 459782762029, 2071929748572, 9336785189996, 42074572144477, 189601622519548, 854406199035948, 3850230516227419
Offset: 1

Views

Author

Seiichi Manyama, Jun 23 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n, binomial(n+1+5*k, n-1-k));

Formula

a(n) = A005708(6*n-4).
a(n) = Sum_{k=0..n} binomial(n+1+5*k,n-1-k).
a(n) = 7*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6).
G.f.: x*(1-x)^3/((1-x)^6 - x).
a(n) = A373958(n) - A373958(n-1).

A373960 Number of compositions of 6*n-5 into parts 1 and 6.

Original entry on oeis.org

1, 3, 12, 55, 251, 1133, 5103, 22990, 103598, 466852, 2103796, 9480387, 42721676, 192517665, 867546829, 3909446467, 17617229520, 79388930909, 357752184782, 1612146986543, 7264855441424, 32737786954481, 147527050375071, 664804576516400, 2995824317191471
Offset: 1

Views

Author

Seiichi Manyama, Jun 23 2024

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n, binomial(n+5*k, n-1-k));

Formula

a(n) = A005708(6*n-5).
a(n) = Sum_{k=0..n} binomial(n+5*k,n-1-k).
a(n) = 7*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6).
G.f.: x*(1-x)^4/((1-x)^6 - x).
a(n) = A373959(n) - A373959(n-1).

A143284 Number of binary words of length n containing at least one subword 100001 and no subwords 10^{i}1 with i<4.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 7, 11, 17, 25, 35, 48, 66, 92, 129, 180, 249, 342, 468, 640, 875, 1195, 1629, 2216, 3009, 4080, 5526, 7477, 10107, 13649, 18415, 24823, 33433, 44995, 60513, 81330, 109241, 146644, 196742, 263813, 353570, 473640, 634201
Offset: 0

Views

Author

Alois P. Heinz, Aug 04 2008

Keywords

Examples

			a(7)=2 because 2 binary words of length 7 have at least one subword 100001 and no subwords 10^{i}1 with i<4: 0100001, 1000010.
		

Crossrefs

Cf. A003520, A005708, 4th column of A143291.

Programs

  • Magma
    [n le 6 select 0 else n le 11 select n-6 else 2*Self(n-1)-Self(n-2) +Self(n-5)-Self(n-7)-Self(n-11): n in [1..60]]; // Vincenzo Librandi, Jun 05 2013
  • Maple
    a:= n-> coeff(series(x^6/((x^5+x-1)*(x^6+x-1)), x, n+1), x, n):
    seq(a(n), n=0..60);
  • Mathematica
    CoefficientList[Series[x^6 / ((x^5 + x - 1) (x^6 + x - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 04 2013 *)

Formula

G.f.: x^6/((x^5+x-1)*(x^6+x-1)).
a(n) = A003520(n+4) - A005708(n+5).
a(n) = 2*a(n-1)-a(n-2)+a(n-5)-a(n-7)-a(n-11). - Vincenzo Librandi, Jun 05 2013

A143285 Number of binary words of length n containing at least one subword 1000001 and no subwords 10^{i}1 with i<5.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 8, 12, 18, 26, 36, 48, 63, 83, 111, 150, 203, 273, 364, 482, 636, 839, 1108, 1464, 1933, 2548, 3352, 4402, 5774, 7568, 9914, 12980, 16983, 22204, 29008, 37870, 49408, 64425, 83963, 109373, 142406, 185331, 241088, 313486
Offset: 0

Views

Author

Alois P. Heinz, Aug 04 2008

Keywords

Examples

			a(8)=2 because 2 binary words of length 8 have at least one subword 1000001 and no subwords 10^{i}1 with i<5: 01000001, 10000010.
		

Crossrefs

Cf. A005708, A005709, 5th column of A143291.

Programs

  • Magma
    [n le 7 select 0 else n le 13 select n-7 else 2*Self(n-1)-Self(n-2) +Self(n-6)-Self(n-8)-Self(n-13): n in [1..60]]; // Vincenzo Librandi, Jun 05 2013
  • Maple
    a:= n-> coeff(series(x^7/((x^6+x-1)*(x^7+x-1)), x, n+1), x, n):
    seq(a(n), n=0..60);
  • Mathematica
    CoefficientList[Series[x^7 / ((x^6 + x - 1) (x^7 + x - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 04 2013 *)

Formula

G.f.: x^7/((x^6+x-1)*(x^7+x-1)).
a(n) = A005708(n+5) - A005709(n+6).
a(n) = 2*a(n-1) -a(n-2) +a(n-6) -a(n-8) -a(n-13). - Vincenzo Librandi, Jun 05 2013

A224812 Number of subsets of {1,2,...,n-10} without differences equal to 2, 4, 6, 8 or 10.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 42, 49, 63, 81, 108, 144, 192, 256, 336, 441, 567, 729, 918, 1156, 1462, 1849, 2365, 3025, 3905, 5041, 6532, 8464, 10948, 14161, 18207, 23409, 29988, 38416, 49196, 63001, 80822, 103684, 133308, 171396, 220662, 284089, 365638, 470596, 605052, 777924, 999306, 1283689, 1648515
Offset: 0

Views

Author

Vladimir Baltic, May 18 2013

Keywords

Comments

a(n) is the number of permutations (p(1), p(2), ..., p(n)) satisfying -k <= p(i)-i <= r and p(i)-i in the set I, i=1..n, with k=2, r=10, I={-2,0,10}.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[-(x + 1)*(x^23 - x^22 + x^21 - x^20 + x^19 - x^13 + x^12 - 3*x^11 + 3*x^10 - 3*x^9 + 2*x^8 - 2*x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)/((x^6 + x - 1)*(x^30 + x^24 - 2*x^20 - 2*x^18 - x^14 - 2*x^12 + x^10 + x^8 + x^6 + 1)), {x, 0, 50}], x] (* G. C. Greubel, Oct 28 2017 *)
  • PARI
    x='x+O('x^50); Vec(-(x + 1)*(x^23 - x^22 + x^21 - x^20 + x^19 - x^13 + x^12 - 3*x^11 + 3*x^10 - 3*x^9 + 2*x^8 - 2*x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)/((x^6 + x - 1)*(x^30 + x^24 - 2*x^20 - 2*x^18 - x^14 - 2*x^12 + x^10 + x^8 + x^6 + 1))) \\ G. C. Greubel, Oct 28 2017

Formula

a(n) = a(n-1) +a(n-7) -a(n-8) +a(n-9) -a(n-10) +a(n-11) +3*a(n-12) -2*a(n-13) +2*a(n-14) -a(n-15) +a(n-16) -2*a(n-19) +a(n-20) -2*a(n-21) -3*a(n-24) +a(n-25) -2*a(n-26) +a(n-31) +a(n-36).
G.f.: -(x+1) *(x^23 -x^22 +x^21 -x^20 +x^19 -x^13 +x^12 -3*x^11 +3*x^10 -3*x^9 +2*x^8 -2*x^7 +x^6 -x^5 +x^4 -x^3 +x^2 -x +1)/ ((x^6 +x -1) *(x^30 +x^24 -2*x^20 -2*x^18 -x^14 -2*x^12 +x^10 +x^8 +x^6+1) ).
a(2*k) = (A005708(k))^2, a(2*k+1) = A005708(k) * A005708(k+1).

A329146 Triangle read by rows: T(n,k) is the number of subsets of {1,...,n} such that the difference between any two elements is k or greater, 1 <= k <= n.

Original entry on oeis.org

2, 4, 3, 8, 5, 4, 16, 8, 6, 5, 32, 13, 9, 7, 6, 64, 21, 13, 10, 8, 7, 128, 34, 19, 14, 11, 9, 8, 256, 55, 28, 19, 15, 12, 10, 9, 512, 89, 41, 26, 20, 16, 13, 11, 10, 1024, 144, 60, 36, 26, 21, 17, 14, 12, 11, 2048, 233, 88, 50, 34, 27, 22, 18, 15, 13, 12, 4096, 377, 129
Offset: 1

Views

Author

Gerhard Kirchner, Nov 06 2019

Keywords

Comments

The restriction "the difference between any two elements is k or greater" does not apply to subsets with fewer than two elements.
Therefore T(n,k) = n+1 is valid not only for n=k, but also for n < k. These terms do not occur in the triangular matrix, but they help to simplify formula(3).
T(n,k) is, for 1 <= k <= 16, a subsequence of another sequence:
T(n,1) = A000079(n)
T(n,2) = A000045(n+2)
T(n,3) = A000930(n+2)
T(n,4) = A003269(n+4)
T(n,5) = A003520(n+4)
T(n,6) = A005708(n+5)
T(n,7) = A005709(n+6)
T(n,8) = A005710(n+7)
T(n,9) = A005711(n+7)
T(n,10) = A017904(n+19)
T(n,11) = A017905(n+21)
T(n,12) = A017906(n+23)
T(n,13) = A017907(n+25)
T(n,14) = A017908(n+27)
T(n,15) = A017909(n+29)
T(n,16) = A291149(n+16)
Note the recurrence formula(3) below: T(n,k) = T(n-1,k) + T(n-k,k), n >= 2*k.
As to the corresponding recurrence A..(n) = A..(n-1) + A..(n-k), see definition (1 <= k <= 9) or formula (k=13) or b-files in the remaining cases.

Examples

			a(1) = T(1,1) = |{}, {1}| = 2
a(2) = T(2,1) = |{}, {1}, {2}, {1,2}| = 4
a(3) = T(2,2) = |{}, {1}, {2}| = 3
a(4) = T(3,1) = |{}, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}| = 8
a(5) = T(3,2) = |{}, {1}, {2}, {3}, {1,3}| = 5
etc.
The triangle begins:
   2;
   4,  3;
   8,  5,  4;
  16,  8,  6,  5;
  32, 13,  9,  7,  6;
  ...
		

Crossrefs

Programs

  • PARI
    T(n,k) = sum(j=0, ceil(n/k), binomial(n-(k-1)*(j-1), j)); \\ Andrew Howroyd, Nov 06 2019

Formula

Let g(n,k,j) be the number of subsets of {1,...,n} with j elements such that the difference between any two elements is k or greater. Then
(1) T(n,k) = Sum_{j = 0..n} g(n,k,j)
(2) g(n,k,j) = binomial(n-(k-1)*(j-1),j) with the convention binomial(m,j)=0 for j > m
(3) T(n,k) = T(n-1,k) + T(n-k,k), n >= 2*k
or: T(n,k) = n+1 for n <= k and T(n,k) = T(n-1,k) + T(n-k,k) for n > k (see comments).
Formula(1) is evident.
Proof of formula(2):
Let C(n,k,j) be the class of subsets of {1,...,n} with j elements such that the difference between any two elements is k or greater. Let S be one of these subsets and let us write it as a j-tuple (c(1),..,c(j)) with c(i+1)-c(i)>=k, 1<=i
In particular, the number of subsets of C(m,1,j) is binomial(m,j), the basic tuple is (1,...,j) and the generating tuple is (d(1),...,d(j)) with 0 <= d(1) <= ... <= d(j) <= m-j.
With m-j = n-(j-1)*k-1, i.e., m = n-(j-1)*(k-1), the numbers of subsets in C(n,k,j) and C(m,1,j) are equal: g(n,k,j) = binomial(n-(k-1)*(j-1),j) qed
Proof of formula(3):
Using the binomial recurrence binomial(m,j) = binomial(m-1,j) + binomial(m-1,j-1) for m = n-(j-1)*(k-1), we find:
T(n,k) = Sum_{j = 0..n} binomial(n-(k-1)*(j-1),j)
= Sum_{j = 0..n-1} binomial(n-1-(k-1)*(j-1),j)
+ Sum_{j = 1..n} binomial(n-1-(k-1)*(j-1),j-1)
= T(n-1,k) + Sum_{j = 0..n-1} binomial(n-1-(k-1)*j,j)
= T(n-1,k) + Sum_{j = 0..n-k} binomial(n-k-(k-1)*(j-1),j)
= T(n-1,k) + T(n-k,k) qed
T(n-k,k) must be known in this recurrence, therefore n >= 2*k.
For k <= n < 2*k, formula(1) must be applied.

A003412 From a nim-like game.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 11, 14, 18, 24, 32, 43, 54, 68, 86, 110, 142, 185, 239, 307, 393, 503, 645, 830, 1069, 1376, 1769, 2272, 2917, 3747, 4816, 6192, 7961, 10233, 13150, 16897, 21713, 27905, 35866, 46099, 59249, 76146, 97859, 125764, 161630, 207729, 266978
Offset: 0

Keywords

References

  • R. K. Guy, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005708.

Programs

Formula

Recurrence: a(n) = a(n-1) + a(n-6) for n >= 12.
O.g.f.: -(1+x+x^2+x^3+2*x^4+2*x^5+2*x^6+x^7+x^8+2*x^9+2*x^10+3*x^11) / (-1+x+x^6). - R. J. Mathar, Dec 05 2007

A003413 From a nim-like game.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 12, 15, 19, 24, 31, 40, 52, 67, 86, 110, 141, 181, 233, 300, 386, 496, 637, 818, 1051, 1351, 1737, 2233, 2870, 3688, 4739, 6090, 7827, 10060, 12930, 16618, 21357, 27447, 35274, 45334, 58264, 74882, 96239, 123686, 158960, 204294, 262558
Offset: 0

Keywords

References

  • R. K. Guy, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005708.

Programs

Formula

Recurrence: a(n) = a(n-1) + a(n-6) for n >= 8.
O.g.f.: -(x^2+x+1)*(x^5+x^3+1)/(-1+x+x^6) = -x-1+(-2-x-x^3-x^4-2*x^5)/(-1+x+x^6). - R. J. Mathar, Dec 05 2007

A193518 T(n,k) = number of ways to place any number of 6X1 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, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 4, 5, 4, 1, 1, 1, 1, 1, 5, 7, 7, 5, 1, 1, 1, 1, 1, 6, 9, 10, 9, 6, 1, 1, 1, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 1, 1, 1, 8, 13, 16, 17, 16, 13, 9, 1, 1, 1, 1, 1, 9, 15, 19, 21, 21, 19, 19, 12, 1, 1, 1, 1, 1, 10, 17
Offset: 1

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....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...19
..3..5...7...9..11..13..15..17..19...21...23...25...27...29...31...33...35...37
..4..7..10..13..16..19..22..25..28...31...34...37...40...43...46...49...52...55
..5..9..13..17..21..25..29..33..37...41...45...49...53...57...61...65...69...73
..6.11..16..21..26..31..36..41..46...51...56...61...66...71...76...81...86...91
..7.13..19..25..31..37..43..49..55...61...67...73...79...85...91...97..103..109
..9.19..31..45..61..79..99.121.145..171..199..229..261..295..331..369..409..451
.12.29..52..81.116.157.204.257.316..381..452..529..612..701..796..897.1004.1117
.16.43..82.133.196.271.358.457.568..691..826..973.1132.1303.1486.1681.1888.2107
.21.61.121.201.301.421.561.721.901.1101.1321.1561.1821.2101.2401.2721.3061.3421

Examples

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

Crossrefs

Column 1 is A005708,
Column 2 is A143448(n-5),
Column 3 is A143456(n-5),
Row 12 is A190576(n+1),
Row 15 is A069133(n+1).

Programs

  • Maple
    T:= proc(n, k) option remember;
          `if`(n<0, 0,
          `if`(n<6 or k=0, 1, k*T(n-6, 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 < 6 || k == 0, 1, k*T[n-6, 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/6]} (binomial(n-5*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
Previous Showing 21-30 of 35 results. Next