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!)
A129853 Nonascending wiggly sums: number of sums adding to n in which terms alternately do not increase and do not decrease. 2
1, 2, 3, 6, 9, 17, 28, 50, 85, 149, 257, 448, 775, 1347, 2336, 4057, 7038, 12219, 21204, 36807, 63880, 110878, 192442, 334020, 579739, 1006237, 1746482, 3031310, 5261324, 9131892, 15849876, 27510049, 47748159, 82874713, 143842547, 249662173, 433329337, 752113633, 1305415658, 2265761441 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..40.

EXAMPLE

The a(4)=6 sums that add to 4 are 4, 3+1, 2+2, 2+1+1, 1+1+2 and 1+1+1+1. The

2 = 2^(n-1)-a(n) sums 1+2+1 and 1+3 do not satisfy the criterion and do not count.

From Joerg Arndt, May 21 2013: (Start)

The a(6)=17 such compositions are

01:  [ 1 1 1 1 1 1 ]

02:  [ 1 1 1 1 2 ]

03:  [ 1 1 2 1 1 ]

04:  [ 1 1 2 2 ]

05:  [ 1 1 3 1 ]

06:  [ 1 1 4 ]

07:  [ 2 1 1 1 1 ]

08:  [ 2 1 2 1 ]

09:  [ 2 1 3 ]

10:  [ 2 2 2 ]

11:  [ 3 1 1 1 ]

12:  [ 3 1 2 ]

13:  [ 3 3 ]

14:  [ 4 1 1 ]

15:  [ 4 2 ]

16:  [ 5 1 ]

17:  [ 6 ]

(End)

MAPLE

A129853rec := proc(part, n) local asum, a, k ; asum := add(i, i=part) ; if asum > n then RETURN(0) ; elif asum = n then RETURN(1) ; else a := 0 ; if nops(part) mod 2 = 0 then for k from op(-1, part) to n-asum do a := a+A129853rec([op(part), k], n) ; od: else for k from 1 to min(op(-1, part), n-asum) do a := a+A129853rec([op(part), k], n) ; od: fi ; RETURN(a) ; fi ; end: A129853 := proc(n) local a, a1 ; a := 0 ; for a1 from 1 to n do a := a+A129853rec([a1], n) ; od: RETURN(a) ; end: seq(A129853(n), n=1..20) ; # R. J. Mathar, Oct 31 2007

CROSSREFS

Cf. A129852.

Cf. A025048, A025049.

Sequence in context: A048815 A074045 A073776 * A095982 A095090 A061947

Adjacent sequences:  A129850 A129851 A129852 * A129854 A129855 A129856

KEYWORD

nonn

AUTHOR

Vladeta Jovovic, May 22 2007

EXTENSIONS

More terms from R. J. Mathar, Oct 31 2007

More terms from Joerg Arndt, May 21 2013

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 April 3 22:30 EDT 2020. Contains 333207 sequences. (Running on oeis4.)