This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A274174 #54 Aug 03 2025 23:40:05 %S A274174 1,1,2,4,7,12,22,36,60,97,162,254,406,628,974,1514,2305,3492,5254, %T A274174 7842,11598,17292,25294,37090,53866,78113,112224,161092,230788,328352, %U A274174 466040,658846,928132,1302290,1821770,2537156,3536445,4897310,6777806,9341456,12858960,17625970,24133832,32910898,44813228,60922160,82569722 %N A274174 Number of compositions of n if all summand runs are kept together. %C A274174 a(n^2) is odd. - _Gregory L. Simay_, Jun 23 2019 %C A274174 Also the number of compositions of n avoiding the patterns (1,2,1) and (2,1,2). - _Gus Wiseman_, Jul 07 2020 %H A274174 Alois P. Heinz, <a href="/A274174/b274174.txt">Table of n, a(n) for n = 0..5000</a> %H A274174 Gus Wiseman, <a href="https://oeis.org/A102726/a102726.txt">Sequences counting and ranking compositions by the patterns they match or avoid.</a> %F A274174 a(n) = Sum_{k>=0} k! * A116608(n,k). - _Joerg Arndt_, Jun 12 2016 %e A274174 If the summand runs are blocked together, there are 22 compositions of a(6): 6; 5+1, 1+5, 4+2, 2+4, (3+3), 4+(1+1), (1+1)+4, 1+2+3, 1+3+2, 2+1+3, 2+3+1, 3+1+2, 3+2+1, (2+2+2), 3+(1+1+1), (1+1+1)+3, (2+2)+(1+1), (1+1)+(2+2), 2+(1+1+1+1), (1+1+1+1)+2, (1+1+1+1+1+1). %e A274174 a(0)=1; a(1)= 1; a(4) = 7; a(9) = 97; a(16) = 2305; a(25) = 78113 and a(36) = 3536445. - _Gregory L. Simay_, Jun 23 2019 %p A274174 b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0, %p A274174 add(b(n-i*j, i-1, p+`if`(j=0, 0, 1)), j=0..n/i))) %p A274174 end: %p A274174 a:= n-> b(n$2, 0): %p A274174 seq(a(n), n=0..50); # _Alois P. Heinz_, Jun 12 2016 %t A274174 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#]]==Length[Union[#]]&]],{n,0,10}] (* _Gus Wiseman_, Jul 07 2020 *) %t A274174 b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0, %t A274174 Sum[b[n - i*j, i - 1, p + If[j == 0, 0, 1]], {j, 0, n/i}]]]; %t A274174 a[n_] := b[n, n, 0]; %t A274174 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Jul 11 2021, after _Alois P. Heinz_ *) %Y A274174 Cf. A000070, A101880, A116608. %Y A274174 The version for patterns is A001339. %Y A274174 The version for prime indices is A333175. %Y A274174 The complement (i.e., the matching version) is A335548. %Y A274174 Anti-run compositions are A003242. %Y A274174 (1,2,1)- and (2,1,2)-matching permutations of prime indices are A335462. %Y A274174 (1,2,1)-matching compositions are A335470. %Y A274174 (1,2,1)-avoiding compositions are A335471. %Y A274174 (2,1,2)-matching compositions are A335472. %Y A274174 (2,1,2)-avoiding compositions are A335473. %Y A274174 Cf. A000670, A056986, A181796, A335451, A335452, A335460, A335463. %K A274174 nonn %O A274174 0,3 %A A274174 _Gregory L. Simay_, Jun 12 2016 %E A274174 Terms a(9) and beyond from _Joerg Arndt_, Jun 12 2016