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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A214254 Number compositions of n where differences between neighboring parts are in {-2,2}. 2
 1, 1, 1, 1, 3, 2, 3, 2, 6, 4, 4, 3, 13, 6, 5, 6, 21, 10, 10, 9, 33, 18, 14, 15, 58, 30, 19, 27, 96, 51, 31, 44, 159, 89, 45, 77, 271, 152, 66, 133, 456, 263, 104, 228, 768, 458, 156, 395, 1310, 791, 236, 685, 2228, 1371, 363, 1187, 3802, 2380, 551, 2056, 6509 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..1000 EXAMPLE a(7) = 2: [7], [3,1,3]. a(8) = 6: [8], [5,3], [3,5], [3,1,3,1], [2,4,2], [1,3,1,3]. a(9) = 4: [9], [5,3,1], [1,3,5], [1,3,1,3,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, 2])))     end: a:= n-> `if`(n=0, 1, add(b(n, j), j=1..n)): seq(a(n), n=0..80); 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, 2}}]]]; a[n_] := If[n == 0, 1, Sum[b[n, j], {j, 1, n}]]; Table [a[n], {n, 0, 80}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from Maple *) CROSSREFS Column k=2 of A214247. Sequence in context: A112924 A267148 A230406 * A153092 A165601 A324030 Adjacent sequences:  A214251 A214252 A214253 * A214255 A214256 A214257 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.

Last modified September 27 03:21 EDT 2020. Contains 337380 sequences. (Running on oeis4.)