login
A287144
Number of partitions of n such that the absolute difference between any part i and the sum of all other parts not larger than i is not larger than two.
2
1, 1, 2, 2, 4, 4, 7, 6, 10, 8, 15, 11, 17, 13, 23, 16, 24, 18, 33, 23, 34, 26, 43, 28, 41, 30, 53, 36, 52, 39, 63, 40, 58, 42, 75, 51, 74, 56, 90, 57, 83, 60, 103, 69, 97, 71, 112, 69, 99, 71, 124, 83, 119, 89, 141, 88, 127, 91, 154, 102, 142, 103, 161, 98
OFFSET
0,3
LINKS
FORMULA
a(2^n-1) = A265278(n) for n>0.
a(2^n) = A052542(n).
a(2^n+1) = A182780(n-1) for n>0.
EXAMPLE
a(7) = 6: 31111, 3211, 322, 331, 4111, 421.
a(8) = 10: 32111, 3221, 3311, 332, 41111, 4211, 422, 431, 5111, 521.
a(9) = 8: 42111, 4221, 4311, 432, 51111, 5211, 522, 531.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1)+`if`(i>n or abs(i-(n-i))>2, 0, b(n-i, i))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..100);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1] + If[i > n || Abs[i - (n - i)] > 2, 0, b[n - i, i]]]];
a[n_] := b[n, n];
a /@ Range[0, 100] (* Jean-François Alcover, Dec 11 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Alois P. Heinz, May 20 2017
STATUS
approved