Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A090752
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A090752 Number of compositions (ordered partitions) of n whereby at most 1 increase is allowed and this increase must be by 1. +0
1
1, 2, 4, 7, 13, 21, 36, 56, 89, 134, 204, 296, 435, 618, 879, 1223, 1702, 2323, 3171, 4263, 5720, 7589, 10043, 13158, 17202, 22305, 28839, 37038, 47437, 60391, 76686, 96872, 122047, 153081, 191513, 238625, 296620, 367379, 453948, 559112, 687107 (list; graph; listen)
OFFSET

1,2

COMMENT

Number of compositions of n in which exactly 1 increase is allowed and this increase must be by 1, is a(n)-A000041(n). - Vladeta Jovovic (vladeta(AT)eunet.rs), Feb 09 2004

EXAMPLE

a(5)=13, as we have 5, 41, 32, 23, 311, 221, 212, 122, 2111, 1211, 1121, 1112 and 11111.

PROGRAM

(PARI) Ta = matrix(70, 70, i, j, -1); Tn = Ta; doAllowed(last, left) = local(c); c = Ta[last, left]; if (c == -1, c = 0; for (i = 1, min(last, left), c += b(i, left - i, 1)); c += b(last + 1, left - last - 1, 0); Ta[last, left] = c); c; doNot(last, left) = local(c); c = Tn[last, left]; if (c == -1, c = 0; for (i = 1, min(last, left), c += b(i, left - i, 0)); Tn[last, left] = c); c; b(last, left, allowed) = if (left == 0, return(1)); if (left < 0, return(0)); if (allowed, doAllowed(last, left), doNot(last, left)); a(n) = sum (i = 1, n, b(i, n - i, 1)); (Wasserman)

CROSSREFS

Cf. A034297, A003116.

Sequence in context: A112997 A037032 A165753 this_sequence A051058 A026625 A026691

Adjacent sequences: A090749 A090750 A090751 this_sequence A090753 A090754 A090755

KEYWORD

nonn

AUTHOR

Jon Perry (perry(AT)globalnet.co.uk), Feb 06 2004

EXTENSIONS

More terms from Vladeta Jovovic (vladeta(AT)eunet.rs), Feb 13 2004

More terms from David Wasserman (wasserma(AT)spawar.navy.mil), Feb 02 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 5 17:24 EST 2009. Contains 170342 sequences.


AT&T Labs Research