login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245368 Compositions of n into parts 3, 4 and 7. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,8

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000

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

FORMULA

G.f: 1/(1-x^3-x^4-x^7).

a(n) = a(n-3) + a(n-4) + a(n-7).

EXAMPLE

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).

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 *)

PROG

(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

CROSSREFS

Cf. A017818, A079956.

Sequence in context: A158418 A124925 A073145 * A354971 A239331 A145033

Adjacent sequences:  A245365 A245366 A245367 * A245369 A245370 A245371

KEYWORD

nonn,easy

AUTHOR

David Neil McGrath, Aug 20 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 29 06:24 EDT 2022. Contains 357082 sequences. (Running on oeis4.)