A328508 Number of compositions of n with no part divisible by the next or the prior.
1, 1, 1, 1, 1, 3, 1, 6, 4, 8, 14, 14, 27, 30, 55, 69, 97, 155, 200, 312, 421, 630, 893, 1260, 1864, 2600, 3813, 5395, 7801, 11196, 15971, 23126, 32917, 47514, 67993, 97670, 140334, 200913, 289147, 414119, 595109, 853751, 1225086, 1759405, 2523151, 3623984, 5198759
Offset: 0
Keywords
Examples
The a(1) = 1 through a(11) = 14 compositions (A = 10, B = 11): (1) (2) (3) (4) (5) (6) (7) (8) (9) (A) (B) (23) (25) (35) (27) (37) (29) (32) (34) (53) (45) (46) (38) (43) (323) (54) (64) (47) (52) (72) (73) (56) (232) (234) (235) (65) (252) (253) (74) (432) (325) (83) (343) (92) (352) (254) (523) (272) (532) (353) (2323) (434) (3232) (452)
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
Mathematica
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,x_,y_,_}/;Divisible[y,x]||Divisible[x,y]]&]],{n,0,10}]
-
PARI
seq(n)={my(r=matid(n)); for(k=1, n, for(i=1, k-1, r[i,k]=sum(j=1, k-i, if(i%j && j%i, r[j, k-i])))); concat([1], vecsum(Col(r)))} \\ Andrew Howroyd, Oct 19 2019
Extensions
Terms a(26) and beyond from Andrew Howroyd, Oct 19 2019