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!)
A214253 Number of compositions of n where differences between neighboring parts are in {-2,0,2}. 2
1, 1, 2, 2, 5, 5, 10, 10, 21, 22, 42, 47, 87, 103, 179, 224, 380, 491, 802, 1074, 1721, 2354, 3696, 5157, 7995, 11305, 17328, 24778, 37680, 54320, 82071, 119076, 179061, 261046, 391087, 572275, 854975, 1254578, 1870298, 2750361, 4093539, 6029538, 8962963 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

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

FORMULA

a(n) ~ c * d^n, where d = 1.480632733359847628849916564959539381483927975663120268887..., c = 0.6193575859000249187293498067457554927448225891538342... . - Vaclav Kotesovec, Sep 02 2014

EXAMPLE

a(5) = 5: [5], [3,1,1], [1,3,1], [1,1,3], [1,1,1,1,1].

a(6) = 10: [6], [4,2], [3,3], [3,1,1,1], [2,4], [2,2,2], [1,3,1,1], [1,1,3,1], [1,1,1,3], [1,1,1,1,1,1].

MAPLE

b:= proc(n, i) option remember; `if`(n<1 or i<1, 0,

      `if`(n=i, 1, add(b(n-i, i+j), j=[-2, 0, 2])))

    end:

a:= n-> `if`(n=0, 1, add(b(n, j), j=1..n)):

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

MATHEMATICA

b[n_, i_] := b[n, i] = If[n < 1 || i < 1, 0, If[n == i, 1, Sum[b[n-i, i+j], {j, {-2, 0, 2}}]]]; a[n_] := If[n == 0, 1, Sum[b[n, j], {j, 1, n}]]; Table[a[n], {n, 0, 60}] (* Jean-Fran├žois Alcover, Nov 06 2014, after Alois P. Heinz *)

CROSSREFS

Column k=2 of A214246.

Sequence in context: A330106 A214795 A287744 * A306320 A325347 A171967

Adjacent sequences:  A214250 A214251 A214252 * A214254 A214255 A214256

KEYWORD

nonn

AUTHOR

Alois P. Heinz, Jul 08 2012

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 September 23 22:32 EDT 2020. Contains 337315 sequences. (Running on oeis4.)