

A342335


Number of compositions of n with all adjacent parts (x, y) satisfying x >= 2y or y = 2x.


14



1, 1, 1, 3, 3, 3, 7, 9, 9, 16, 21, 22, 36, 47, 51, 77, 101, 114, 165, 217, 251, 350, 459, 540, 733, 962, 1152, 1535, 2010, 2437, 3207, 4192, 5141, 6698, 8728, 10802, 13979, 18170, 22652, 29169, 37814, 47410, 60854, 78716, 99144, 126974, 163897, 207159, 264918, 341331, 432606, 552693, 711013, 903041, 1153060
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


COMMENTS

Also the number of compositions of n with all adjacent parts (x, y) satisfying x = 2y or y >= 2x.


LINKS



EXAMPLE

The a(1) = 1 through a(9) = 16 compositions:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(12) (13) (14) (15) (16) (17) (18)
(21) (121) (212) (24) (25) (26) (27)
(42) (124) (125) (36)
(213) (142) (215) (63)
(1212) (214) (242) (126)
(2121) (421) (1214) (216)
(1213) (1421) (1215)
(12121) (21212) (1242)
(2124)
(2142)
(2421)
(4212)
(21213)
(121212)
(212121)


MATHEMATICA

Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@Table[#[[i]]>=2*#[[i1]]#[[i1]]==2*#[[i]], {i, 2, Length[#]}]&]], {n, 0, 15}]
(* Second program: *)
c[n_, pred_] := Module[{M = IdentityMatrix[n], i, k}, For[k = 1, k <= n, k++, For[i = 1, i <= k1, i++, M[[i, k]] = Sum[If[pred[j, i], M[[j, ki]], 0], {j, 1, ki}]]]; Sum[M[[q, All]], {q, 1, n}]];
pred[i_, j_] := i >= 2j  j == 2i;


PROG

(PARI)
C(n, pred)={my(M=matid(n)); for(k=1, n, for(i=1, k1, M[i, k]=sum(j=1, ki, if(pred(j, i), M[j, ki], 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 second condition alone gives A154402 for partitions.
The version not allowing equality (i.e., strict relations) is A342336.
A224957 counts compositions with adjacent parts x <= 2y and y <= 2x.
A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
A342098 counts partitions with adjacent parts x > 2y.
A342332 counts compositions with adjacent parts x > 2y or y > 2x.
A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.
A342342 counts strict compositions with adjacent parts x <= 2y and y <= 2x.


KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



