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

A245487 Number of compositions of n into parts 3,4 where both parts are always present.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 3, 0, 4, 6, 4, 5, 10, 10, 11, 15, 20, 22, 27, 35, 43, 49, 63, 79, 92, 112, 144, 171, 204, 257, 316, 375, 462, 573, 692, 838, 1035, 1265, 1532, 1873, 2300, 2798, 3406, 4173, 5099, 6204, 7580, 9273, 11303, 13784, 16855, 20576
Offset: 0

Views

Author

David Neil McGrath, Jul 23 2014

Keywords

Examples

			a(16)=5, the compositions being 43333, 34333, 33433, 33343, 33334.
		

Crossrefs

Cf. A245332.

Programs

  • Mathematica
    CoefficientList[Series[x^7 (x^3 + 2 x^2 + 2 x + 2)/((x - 1) (x + 1) (x^2 + 1) (x^2 + x + 1) * (x^4 + x^3 - 1)), {x, 0, 60}], x] (* Vincenzo Librandi, Jul 25 2014 *)
  • PARI
    a=[0,0,0,0,0,0,2,0,0,3]; b=[1,0,1,0,1,1,0,0,2,0,0,1]; k=1; for(n=11, 100, a=concat(a, a[n-3]+a[n-4]+b[k]); if(k==#b, k=1, k++)); a \\ Colin Barker, Jul 24 2014

Formula

a(n) = a(n-3)+a(n-4)+b(n) where b(n) is the 12-cycle (1,0,1,0,1,1,0,0,2,0,0,1) starting with initial value b(11)=1 and b(n)=b(n-12) e.g. b(23)=b(11). The initial values for a(n) are a(7)=2,a(8)=0,a(9)=0,a(10)=3.
G.f.: x^7*(x^3+2*x^2+2*x+2) / ((x-1)*(x+1)*(x^2+1)*(x^2+x+1)*(x^4+x^3-1)). - Colin Barker, Jul 24 2014

Extensions

More terms from Colin Barker, Jul 24 2014

A245492 Number of compositions of n into parts 3 and 5 with at least one 3 and one 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 3, 4, 0, 6, 5, 4, 10, 6, 10, 15, 12, 20, 21, 23, 35, 34, 44, 56, 57, 80, 91, 101, 137, 148, 181, 230, 249, 318, 379, 430, 549, 629, 748, 928, 1060, 1298, 1557, 1809, 2226, 2617, 3109, 3783, 4426, 5336, 6400, 7536, 9120
Offset: 0

Views

Author

David Neil McGrath, Jul 24 2014

Keywords

Examples

			a(20)=6, the tuples being: (533333),(353333),(335333),(333533),(333353),(333335).
		

Crossrefs

Programs

  • Haskell
    a245492 n = a245492_list !! (n-1)
    a245492_list = [0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0] ++
                   zipWith3 (((+) .) . (+))
                   (drop 8 a245492_list) (drop 10 a245492_list)
                   (cycle [1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 2, 0, 0, 1, 0])
    -- Reinhard Zumkeller, Jul 28 2014
  • Mathematica
    CoefficientList[Series[x^8*(x^4 + x^3 + 2*x^2 + 2*x + 2)/((x - 1)*(x^2 + x + 1)*(x^4 + x^3 + x^2 + x + 1)*(x^5 + x^3 - 1)), {x, 0, 60}], x] (* Wesley Ivan Hurt, Jul 24 2014 *)
  • PARI
    a=[0,0,0,0,0,0,0,2,0,0,3,0]; b=[1,1,0,0,1,1,0,1,0,0,2,0,0,1,0]; k=1; for(n=13, 100, a=concat(a, a[n-3]+a[n-5]+b[k]); if(k==#b, k=1, k++)); a \\ Colin Barker, Jul 24 2014
    

Formula

a(n) = a(n-3)+a(n-5)+b(n) where b(n) is the 15-cycle: (1,1,0,0,1,1,0,1,0,0,2,0,0,1,0) with b(n)=b(n-15) starting at b(13)=1. e.g. b(28)=b(13). The initial values for a(n) are: a(8)=2, a(9)=0, a(10)=0, a(11)=3, a(12)=0.
G.f.: x^8*(x^4+x^3+2*x^2+2*x+2) / ((x-1)*(x^2+x+1)*(x^4+x^3+x^2+x+1)*(x^5+x^3-1)). - Colin Barker, Jul 24 2014

Extensions

More terms from Colin Barker, Jul 24 2014

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

A245527 Number of compositions of n into parts 4 and 5 with at least one 4 and one 5.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 3, 0, 0, 4, 6, 4, 0, 5, 10, 10, 5, 6, 15, 20, 15, 13, 21, 35, 35, 29, 35, 56, 70, 65, 64, 92, 126, 136, 129, 156, 219, 263, 265, 285, 375, 484, 528, 550, 660, 860, 1013, 1078, 1210, 1521, 1873, 2092, 2288, 2732, 3394
Offset: 0

Views

Author

David Neil McGrath, Jul 25 2014

Keywords

Examples

			a(22)=10 The tuples are (55444)(54544)(54454)... where a(22)=5!/3!2!=10.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1 + 1/(1 - x^5 - x^4) - 1/(1 - x^5) - 1/(1 - x^4), {x, 0, 60}], x] (* Wesley Ivan Hurt, Jul 26 2014 *)

Formula

a(n) = a(n-4)+a(n-5)+b(n) where b(n) is the 20-cycle (1,0,0,1,0,1,0,1,0,0,1,1,0,0,0,2,0,0,0,1) and b(n)=b(n-20). Initial values are b(14)=1, a(9)=2, a(10)=0, a(11)=0, a(12)=0, a(13)=3.
G.f.: 1+1/(1-x^5-x^4)-1/(1-x^5)-1/(1-x^4) (see comment A245332). - courtesy of Joerg Arndt
Showing 1-4 of 4 results.