This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A160786 The number of odd partitions of consecutive odd integers. 4
 1, 2, 4, 8, 16, 29, 52, 90, 151, 248, 400, 632, 985, 1512, 2291, 3431, 5084, 7456, 10836, 15613, 22316, 31659, 44601, 62416, 86809, 120025, 165028, 225710, 307161, 416006, 560864, 752877, 1006426, 1340012, 1777365, 2348821, 3093095, 4059416, 5310255, 6924691 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..1000 V. I. Arnold, On teaching mathematics FORMULA a(n) = A027193(2n+1). MAPLE b:= proc(n, i) option remember; `if`(n=0, [1, 0\$3],       `if`(i<1, [0\$4], b(n, i-1)+`if`(i>n, [0\$4], (p->       `if`(irem(i, 2)=0, [p[3], p[4], p[1], p[2]],           [p[2], p[1], p[4], p[3]]))(b(n-i, i)))))     end: a:= n-> b(2*n+1\$2)[2]: seq(a(n), n=0..40);  # Alois P. Heinz, Feb 16 2014 MATHEMATICA b[n_, i_] := b[n, i] = If[n==0, {1, 0, 0, 0}, If[i<1, {0, 0, 0, 0}, b[n, i-1] + If[i>n, {0, 0, 0, 0}, Function[{p}, If[Mod[i, 2]==0, p[[{3, 4, 1, 2}]], p[[{2, 1, 4, 3}]]]][b[n-i, i]]]]]; a[n_] := b[2*n+1, 2*n+1][[2]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 01 2015, after Alois P. Heinz *) PROG (Python) # Could be memoized for speedup def numoddpart(n, m=1): ...."""The number of partitions of n into an odd number of parts of size at least m""" ....if.n.<.m: ........return.0 ....elif.n.==.m: ........return.1 ....else: ........#.1.(namely.n.=.n).and.all.partitions.of.the.form ........#.k.+.even.partitions.that.start.with.>=.k ........return.1.+.sum([numevenpart(n.-.k, .k).for.k.in.range(m, n//3.+.1)]) . def.numevenpart(n, m=1): ...."""The number of partitions of n into an even number of parts of size at least m""" ....if.n.<.2*m: ........return.0 ....elif.n.==.2*m: ........return.1 ....else: ........return.sum([numoddpart(n.-.k, .k).for.k.in.range(m, .n//2.+.1)]) . [numoddpart(n).for.n.in.range(1, 70, 2)] CROSSREFS Sequence in context: A018726 A049884 A085583 * A054154 A292793 A018469 Adjacent sequences:  A160783 A160784 A160785 * A160787 A160788 A160789 KEYWORD nonn AUTHOR Utpal Sarkar (doetoe(AT)gmail.com), May 26 2009 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 April 21 07:53 EDT 2019. Contains 322327 sequences. (Running on oeis4.)