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

A245738 Number of compositions of n into parts 1 and 2 with both parts present.

Original entry on oeis.org

2, 3, 7, 11, 20, 32, 54, 87, 143, 231, 376, 608, 986, 1595, 2583, 4179, 6764, 10944, 17710, 28655, 46367, 75023, 121392, 196416, 317810, 514227, 832039, 1346267, 2178308, 3524576, 5702886, 9227463, 14930351, 24157815, 39088168, 63245984, 102334154, 165580139, 267914295, 433494435, 701408732, 1134903168, 1836311902
Offset: 3

Views

Author

David Neil McGrath, Jul 31 2014

Keywords

Examples

			a(9) = 54. The tuples are (22221) = 5!/4! = 5, (222111) = 6!/3!/3! = 20, (2211111) = 7!/5!/2! = 21, (21111111) = 8!/7! = 8.
		

Crossrefs

Column k=2 of A373118.

Programs

  • Mathematica
    LinearRecurrence[{1,2,-1,-1},{2,3,7,11},50] (* Harvey P. Dale, Dec 20 2014 *)
  • PARI
    Vec(1+1/(1-x-x^2)-1/(1-x)-1/(1-x^2)+O(x^66)) \\ Joerg Arndt, Aug 04 2014

Formula

G.f.: 1+1/(1-x-x^2)-1/(1-x)-1/(1-x^2).
a(n) = A052952(n-4)+2*A052952(n-3). - R. J. Mathar, Aug 05 2014
From Colin Barker, Jul 13 2017: (Start)
a(n) = (-20 + sqrt(5)*(-(1-sqrt(5))^(1+n) + (1+sqrt(5))^(1+n))/2^n) / 10 for n even.
a(n) = (-10 + sqrt(5)*(-(1-sqrt(5))^(1+n) + (1+sqrt(5))^(1+n))/2^n) / 10 for n odd.
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4) for n>6. (End)
a(n) = Sum_{i=1..floor((n-1)/2)} C(n-i,i). - Wesley Ivan Hurt, Sep 19 2017
a(n) = A000045(n+1) - A000034(n+1). - J. M. Bergot and Robert Israel, Oct 11 2021

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
Showing 1-2 of 2 results.