The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287146 Number of partitions of n into distinct parts such that the absolute difference between any part and the sum of all smaller parts is not larger than one. 2
1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0, 0, 0, 1, 1, 2, 1, 3, 2, 3, 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, 1, 5, 4, 7, 3, 8, 5, 7, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,14
LINKS
FORMULA
a(2^n) = 0 for n > 0.
a(2^n-1) = 1 for n >= 0.
EXAMPLE
a(3) = 1: 21.
a(13) = 2: 6421, 7321.
a(25) = 3: (12)6421, (12)7321, (13)6321.
MAPLE
b:= proc(n, i) option remember; `if`(i*(i+1)/2<n, 0, `if`(n=0, 1,
b(n, i-1)+`if`(i>n or abs(i-(n-i))>1, 0, b(n-i, i-1))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..120);
MATHEMATICA
b[n_, i_] := b[n, i] = If[i(i+1)/2 < n, 0, If[n == 0, 1, b[n, i - 1] + If[i > n || Abs[i - (n - i)] > 1, 0, b[n - i, i - 1]]]];
a[n_] := b[n, n];
a /@ Range[0, 120] (* Jean-François Alcover, Dec 11 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A321922 A362496 A360003 * A025926 A175134 A027355
KEYWORD
nonn,look
AUTHOR
Alois P. Heinz, May 20 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 19:53 EDT 2024. Contains 372607 sequences. (Running on oeis4.)