login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245738 Number of compositions of n into parts 1 and 2 with both parts present. 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

3,1

LINKS

Colin Barker, Table of n, a(n) for n = 3..1000

Index entries for linear recurrences with constant coefficients, signature (1,2,-1,-1).

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

EXAMPLE

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

MATHEMATICA

LinearRecurrence[{1, 2, -1, -1}, {2, 3, 7, 11}, 50] (* Harvey P. Dale, Dec 20 2014 *)

PROG

(PARI) Vec(1+1/(1-x-x^2)-1/(1-x)-1/(1-x^2)+O(x^66)) \\ Joerg Arndt, Aug 04 2014

CROSSREFS

Cf. A245332, A245492, A245487, A245527.

Sequence in context: A159262 A160434 A139630 * A265093 A133044 A014529

Adjacent sequences:  A245735 A245736 A245737 * A245739 A245740 A245741

KEYWORD

nonn,easy

AUTHOR

David Neil McGrath, Jul 31 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 27 18:47 EST 2020. Contains 332308 sequences. (Running on oeis4.)