|
|
A342330
|
|
Number of compositions of n with all adjacent parts (x,y) satisfying x < 2y and y < 2x.
|
|
16
|
|
|
1, 1, 2, 2, 3, 4, 4, 7, 9, 11, 17, 23, 32, 44, 63, 91, 127, 180, 255, 363, 516, 732, 1044, 1485, 2109, 3002, 4277, 6089, 8660, 12323, 17550, 24986, 35562, 50628, 72084, 102616, 146077, 207980, 296114, 421555, 600153, 854469, 1216543, 1731983, 2465842, 3510713
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Each quotient of adjacent parts is between 1/2 and 2 exclusive.
|
|
LINKS
|
|
|
EXAMPLE
|
The a(1) = 1 through a(9) = 11 partitions:
1 2 3 4 5 6 7 8 9
11 111 22 23 33 34 35 45
1111 32 222 43 44 54
11111 111111 223 53 234
232 233 333
322 323 432
1111111 332 2223
2222 2232
11111111 2322
3222
111111111
|
|
MAPLE
|
b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, j)
, j=`if`(i=0, 1..n, floor(i/2)+1..min(n, 2*i-1))))
end:
a:= n-> b(n, 0):
|
|
MATHEMATICA
|
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@Table[#[[i]]<2*#[[i-1]]&&#[[i-1]]<2*#[[i]], {i, 2, Length[#]}]&]], {n, 0, 15}]
(* Second program: *)
b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - j, j], {j, If[i == 0, 1, Floor[i/2] + 1], If[i == 0, n, Min[n, 2i - 1]]}]];
a[n_] := b[n, 0];
|
|
PROG
|
(PARI)
C(n, pred)={my(M=matid(n)); for(k=1, n, for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); sum(q=1, n, M[q, ])}
seq(n)={concat([1], C(n, (i, j)->i<2*j && j<2*i))} \\ Andrew Howroyd, Mar 13 2021
|
|
CROSSREFS
|
The version allowing equality is A224957.
The unordered version (partitions) is A342096, with strict case A342097.
Reversing operators and changing 'and' into 'or' gives A342332.
The version allowing partial equality is A342338.
A000929 counts partitions with all adjacent parts x >= 2y.
A002843 counts compositions with all adjacent parts x <= 2y.
A154402 counts partitions with all adjacent parts x = 2y.
A274199 counts compositions with all adjacent parts x < 2y.
A342094 counts partitions with all adjacent parts x <= 2y (strict: A342095).
A342098 counts partitions with all adjacent parts x > 2y.
A342331 counts compositions where each part is twice or half the prior.
A342335 counts compositions with all adjacent parts x >= 2y or y = 2x.
A342337 counts compositions with all adjacent parts x = y or x = 2y.
Cf. A003114, A003242, A034296, A167606, A342083, A342084, A342087, A342191, A342333, A342334, A342336, A342339, A342340.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|