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!)
A239561 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-n,...,n}. 2
1, 1, 1, 2, 4, 8, 16, 31, 63, 125, 252, 504, 1013, 2027, 4069, 8141, 16318, 32650, 65381, 130801, 261791, 523677, 1047780, 2095796, 4192533, 8385623, 16773321, 33547917, 67100362, 134203614, 268417029, 536840509, 1073702131, 2147418493, 4294882224, 8589795592 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

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

FORMULA

a(n) ~ 2^(n-2). - Vaclav Kotesovec, May 01 2014

EXAMPLE

There are 2^5 = 32 compositions of 7 with first part = 1.  Exactly one of these has second differences not in {-7,...,7}, namely [1,5,1].  Thus a(7) = 32 - 1 = 31.

MAPLE

b:= proc(n) option remember; `if`(n<5, [1, 1, 3, 4, 8][n+1],

      (-(n^3+3*n^2+184*n-348) *b(n-1)

       +(2*n^4+23*n^3-155*n^2-166*n+3776) *b(n-2)

       +(n^4+14*n^3-5*n^2+122*n+768) *b(n-3)

       +(2*n^3+10*n^2-64*n-1328) *b(n-4)

       -(2*n^4+28*n^3-78*n^2-272*n+2320) *b(n-5))/

      (n^4+10*n^3-75*n^2-20*n+1244))

    end:

a:= n-> `if`(n<7, ceil(2^(n-2)), 2^(n-2)-b(n-7)):

seq(a(n), n=0..40);

CROSSREFS

Main diagonal of A239550.

Sequence in context: A251749 A251763 A243083 * A010747 A318776 A036130

Adjacent sequences:  A239558 A239559 A239560 * A239562 A239563 A239564

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Mar 21 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 10:15 EST 2020. Contains 332304 sequences. (Running on oeis4.)