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

A228362 The number of all possible covers of L-length line segment by 3-length line segments with allowed gaps < 3.

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 3, 4, 6, 8, 10, 13, 18, 24, 31, 41, 55, 73, 96, 127, 169, 224, 296, 392, 520, 689, 912, 1208, 1601, 2121, 2809, 3721, 4930, 6531, 8651, 11460, 15182, 20112, 26642, 35293, 46754, 61936, 82047, 108689, 143983, 190737
Offset: 0

Views

Author

Philipp O. Tsvetkov, Aug 21 2013

Keywords

Comments

For n>2, a(n) = A017818(n+3).

Crossrefs

Third row of A228360.

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^3 - x^4 - x^5)^-1*(1 + x + x^2)^2*x^3 , {x,0, 100}],x]

Formula

G.f.: x^3*(1 + x + x^2)^2 / (1 - x^3 - x^4 - x^5).
a(0)=a(1)=a(2)=0; a(3)=1; a(4)=2; a(5)= a(6)=3; a(7)=4; a(n)= a(n-3) + a(n-4) + a(n-5).

A245367 Compositions of n into parts 3, 5 and 7.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 1, 3, 3, 3, 6, 5, 8, 10, 11, 17, 18, 25, 32, 37, 52, 61, 79, 102, 123, 163, 200, 254, 326, 402, 519, 649, 819, 1045, 1305, 1664, 2096, 2643, 3358, 4220, 5352, 6759, 8527, 10806, 13622, 17237, 21785, 27501, 34802, 43934, 55544, 70209, 88672, 112131, 141644, 179018, 226274, 285860, 361358
Offset: 0

Views

Author

David Neil McGrath, Aug 20 2014

Keywords

Examples

			a(16) = 10: the compositions are the permutations of [5533] (there are 4!/2!2!=6 of them) and the permutations of [7333] (there are 4!/3!=4).
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,1,0,1,0,1},{1,0,0,1,0,1,1},70] (* Harvey P. Dale, Jan 27 2017 *)
  • PARI
    Vec(1/(1-x^3-x^5-x^7) +O(x^66)) \\ Joerg Arndt, Aug 20 2014

Formula

G.f: 1/(1-x^3-x^5-x^7).
a(n) = a(n-3) + a(n-5) + a(n-7).

A245368 Compositions of n into parts 3, 4 and 7.

Original entry on oeis.org

1, 0, 0, 1, 1, 0, 1, 3, 1, 1, 5, 5, 2, 7, 13, 8, 10, 25, 26, 20, 42, 64, 54, 72, 131, 144, 146, 245, 339, 344, 463, 715, 827, 953, 1423, 1881, 2124, 2839, 4019, 4832, 5916, 8281, 10732, 12872, 17036, 23032, 28436, 35824, 48349, 62200, 77132, 101209, 133581
Offset: 0

Views

Author

David Neil McGrath, Aug 20 2014

Keywords

Examples

			a(14) = 13. The compositions (ordered partitions) of 14 into parts 3, 4 and 7 are the permutations of (7,7) (there is only one), the permutations of (7,4,3) (there are 3!=6 of these) and the permutations of (4,4,3,3) (there are 4!/2!2!=6 of these).
		

Crossrefs

Programs

  • Magma
    I:=[1,0,0,1,1,0,1]; [n le 7 select I[n] else Self(n-3)+Self(n-4)+Self(n-7): n in [1..60]]; // Vincenzo Librandi, Jan 08 2016
  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          `if`(n<0, 0, add(a(n-j), j=[3, 4, 7])))
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Aug 21 2014
  • Mathematica
    LinearRecurrence[{0, 0, 1, 1, 0, 0, 1}, {1, 0, 0, 1, 1, 0, 1}, 60] (* Jean-François Alcover, Jan 08 2016 *)

Formula

G.f: 1/(1-x^3-x^4-x^7).
a(n) = a(n-3) + a(n-4) + a(n-7).

A193771 Expansion of 1 / (1 - x - x^3 + x^6) in powers of x.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 7, 10, 13, 17, 23, 31, 41, 54, 72, 96, 127, 168, 223, 296, 392, 519, 688, 912, 1208, 1600, 2120, 2809, 3721, 4929, 6530, 8651, 11460, 15181, 20111, 26642, 35293, 46753, 61935, 82047, 108689, 143982, 190736, 252672, 334719, 443408, 587391
Offset: 0

Views

Author

Michael Somos, Jan 01 2013

Keywords

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 5*x^6 + 7*x^7 + 10*x^8 + 13*x^9 + ...
		

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/(1-x-x^3+x^6)));  // G. C. Greubel, Aug 10 2018
  • Mathematica
    CoefficientList[Series[1/(1-x-x^3+x^6),{x,0,50}],x] (* or *) LinearRecurrence[ {1,0,1,0,0,-1},{1,1,1,2,3,4},50] (* Harvey P. Dale, Jul 25 2017 *)
  • PARI
    {a(n) = if( n<0, n = -n; polcoeff( - x^6 / (1 - x^3 - x^5 + x^6) + x * O(x^n), n), polcoeff( 1 / (1 - x - x^3 + x^6) + x * O(x^n), n))};
    

Formula

G.f.: 1 / (1 - x - x^3 + x^6) = 1 / (1 - x / (1 - x^2 / (1 + x^2 / (1 - x / (1 + x / (1 + x^2 / (1 - x^2))))))).
a(n) = a(n-1) + a(n-3) - a(n-6) for all n in Z.
Convolution of A008621 and A000931. PSUM transform of A017818.

A243254 Number of compositions of n into parts {3,4,5} when all parts 3,4 and 5 are present.

Original entry on oeis.org

6, 0, 0, 12, 12, 12, 20, 30, 50, 60, 80, 120, 162, 225, 305, 401, 560, 763, 1017, 1365, 1834, 2484, 3328, 4420, 5936, 7943, 10593, 14148, 18828, 25092, 33468, 44517, 59214, 78734, 104698, 139232, 184889, 245532, 326177, 433052, 574841, 762856, 1012219, 1343160
Offset: 12

Views

Author

David Neil McGrath, Jul 30 2014

Keywords

Comments

Compositions of n from the set {3,4,5} that can be partitioned into the equivalence classes [345][34][45][35][3][4][5], where each class is defined by the relation "all elements are present".

Examples

			a(24) = 162 = 42 + 90 + 30: the tuples are (5433333) -> 7!/5! = 42, (554433) -> 6!/2!2!2! = 90, (544443) -> 6!/4! = 30.
		

Crossrefs

Programs

  • Maple
    N:= 100;
    C34:= Vector(N):
    C35:= Vector(N):
    C45:= Vector(N):
    C345:= Vector(N):
    C1:= Vector(N,i -> numboccur([i mod 3, i mod 4, i mod 5],0)):
    C34[3]:= 1: C34[4]:= 1:
    C35[3]:= 1: C35[5]:= 1:
    C45[4]:= 1: C45[5]:= 1:
    C345[3]:= 1: C345[4]:= 1: C345[5]:= 1:
    for n from 6 to N do
      C34[n]:= C34[n-3] + C34[n-4];
      C35[n]:= C35[n-3] + C35[n-5];
      C45[n]:= C45[n-4] + C45[n-5];
      C345[n]:= C345[n-3]+C345[n-4]+C345[n-5];
    od:
    A:= C345 - C34 - C35 - C45 + C1:
    convert(A[12..N],list); # Robert Israel, Aug 18 2014
  • Mathematica
    CoefficientList[Series[x^12*(x^15 + 5*x^14 + 13*x^13 + 24*x^12 + 34*x^11 + 36*x^10 + 24*x^9 - 26*x^7 - 40*x^6 - 36*x^5 - 18*x^4 + 12*x^2 + 12*x +6)/((1 - x)*(x + 1)*(x^2 + 1)*(x^3 + x^2 - 1)*(x^4 + x^3 - 1)*(x^5 + x^3 - 1)*(x^2 + x + 1)*(x^5 + x^4 - 1)*(x^4 + x^3 + x^2 + x + 1)), {x, 0, 50}], x] (* Wesley Ivan Hurt, Aug 02 2014 *)
    Drop[LinearRecurrence[{-2,-2,2,9,16,14,-2,-29,-52,-52,-20,34,82,97,67,7,-53,-84,-77,-43,-4,22,29,23,13,5,1},{0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,12,12,12,20,30,50,60,80,120,162,225,305,401},60],12] (* Harvey P. Dale, Jun 06 2025 *)

Formula

a(n) = A017818(n-1) -A245492(n) -A245487(n) -A245527(n) -A022003(n) -A011765(n) -A112765(n).
G.f.: -(x^15 +5*x^14 +13*x^13 +24*x^12 +34*x^11 +36*x^10 +24*x^9-26*x^7 -40*x^6 -36*x^5 -18*x^4 +12*x^2 +12*x +6) *x^12 /((x-1) *(x+1) *(x^2+1) *(x^3+x^2-1) *(x^4+x^3-1) *(x^5+x^3-1) *(x^2+x+1) *(x^5+x^4-1) *(x^4+x^3+x^2+x+1)). - Alois P. Heinz, Jul 30 2014
a(n) = A017818(n) - A017817(n) - A052920(n) - A017827(n) + A079978(n) + A121262(n) + A079998(n). - Robert Israel, Aug 18 2014

A247920 Expansion of 1 / (1 + x + x^2 - x^5) in powers of x.

Original entry on oeis.org

1, -1, 0, 1, -1, 1, -1, 0, 2, -3, 2, 0, -2, 4, -5, 3, 2, -7, 9, -7, 1, 8, -16, 17, -8, -8, 24, -32, 25, -1, -32, 57, -57, 25, 31, -88, 114, -83, -6, 120, -202, 196, -77, -125, 322, -399, 273, 49, -447, 720, -672, 225, 496, -1168, 1392, -896, -271, 1663, -2560
Offset: 0

Views

Author

Michael Somos, Sep 26 2014

Keywords

Examples

			G.f. = 1 - x + x^3 - x^4 + x^5 - x^6 + 2*x^8 - 3*x^9 + 2*x^10 - 2*x^12 + ...
		

Crossrefs

Cf. A017818.

Programs

  • GAP
    a:=[1,-1,0,1,-1];; for n in [6..60] do a[n]:=-(a[n-1]+a[n-2]-a[n-5]); od; a; # G. C. Greubel, Dec 29 2019
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(1 / ((1+x^2)*(1+x-x^3)))); // G. C. Greubel, Aug 04 2018
    
  • Maple
    seq(coeff(series(1/(1+x+x^2-x^5), x, n+1), x, n), n = 0..60); # G. C. Greubel, Dec 29 2019
  • Mathematica
    CoefficientList[Series[1/(1+x+x^2-x^5), {x, 0, 60}], x] (* Vincenzo Librandi, Sep 27 2014 *)
  • PARI
    {a(n) = if( n<0, n=-5-n; polcoeff( 1 / (1 - x^3 - x^4 - x^5) + x * O(x^n), n), polcoeff( 1 / (1 + x + x^2 - x^5) + x * O(x^n), n))};
    
  • Sage
    def A247920_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( 1/(1+x+x^2-x^5) ).list()
    A247920_list(60) # G. C. Greubel, Dec 29 2019
    

Formula

G.f.: 1 / ((1 + x^2) * (1 + x - x^3)).
a(n) = A017818(-5-n) for all n in Z.
0 = a(n) - a(n+3) - a(n+4) - a(n+5) for all n in Z.
0 = a(n) - a(n+2) - a(n+3) + (-1)^floor(n/2) * mod(n,2) for all n in Z.
Showing 1-6 of 6 results.