login
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
OFFSET
0,3
COMMENTS
Each quotient of adjacent parts is between 1/2 and 2 exclusive.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2000 (first 1001 terms from Andrew Howroyd)
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):
seq(a(n), n=0..45); # Alois P. Heinz, Mar 15 2021
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];
a /@ Range[0, 45] (* Jean-François Alcover, May 09 2021, after Alois P. Heinz *)
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.
The strict case is A342341.
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.
Sequence in context: A036822 A056099 A084848 * A358911 A153937 A357710
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 09 2021
EXTENSIONS
Terms a(31) and beyond from Andrew Howroyd, Mar 13 2021
STATUS
approved