cp's OEIS Frontend

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.

A333148 Number of compositions of n whose non-adjacent parts are weakly decreasing.

This page as a plain text file.
%I A333148 #24 Oct 31 2024 21:53:07
%S A333148 1,1,2,4,7,12,19,30,46,69,102,149,214,304,428,596,823,1127,1532,2068,
%T A333148 2774,3697,4900,6460,8474,11061,14375,18600,23970,30770,39354,50153,
%U A333148 63702,80646,101783,128076,160701,201076,250933,312346,387832,480409,593716,732105,900810,1106063,1355336,1657517,2023207,2464987,2997834,3639464
%N A333148 Number of compositions of n whose non-adjacent parts are weakly decreasing.
%H A333148 Alois P. Heinz, <a href="/A333148/b333148.txt">Table of n, a(n) for n = 0..700</a>
%F A333148 See Sage code for the formula. - _Max Alekseyev_, Oct 31 2024
%e A333148 The a(1) = 1 through a(6) = 19 compositions:
%e A333148   (1)  (2)   (3)    (4)     (5)      (6)
%e A333148        (11)  (12)   (13)    (14)     (15)
%e A333148              (21)   (22)    (23)     (24)
%e A333148              (111)  (31)    (32)     (33)
%e A333148                     (121)   (41)     (42)
%e A333148                     (211)   (131)    (51)
%e A333148                     (1111)  (212)    (141)
%e A333148                             (221)    (222)
%e A333148                             (311)    (231)
%e A333148                             (1211)   (312)
%e A333148                             (2111)   (321)
%e A333148                             (11111)  (411)
%e A333148                                      (1311)
%e A333148                                      (2121)
%e A333148                                      (2211)
%e A333148                                      (3111)
%e A333148                                      (12111)
%e A333148                                      (21111)
%e A333148                                      (111111)
%e A333148 For example, (2,3,1,2) is such a composition, because the non-adjacent pairs of parts are (2,1), (2,2), (3,2), all of which are weakly decreasing.
%t A333148 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{___,x_,__,y_,___}/;y>x]&]],{n,0,15}]
%o A333148 (Sage) def a333148(n): return number_of_partitions(n) + sum( Partitions(m, max_part=l, length=k).cardinality() * Partitions(n-m-l^2, min_length=k+2*l).cardinality() for l in range(1, (n+1).isqrt()) for m in range((n-l^2-2*l)*l//(l+1)+1) for k in range(ceil(m/l), min(m,n-m-l^2-2*l)+1) ) # _Max Alekseyev_, Oct 31 2024
%Y A333148 Unimodal compositions are A001523.
%Y A333148 The case of normal sequences appears to be A028859.
%Y A333148 A version for ordered set partitions is A332872.
%Y A333148 The case of strict compositions is A333150.
%Y A333148 The version for strictly decreasing parts is A333193.
%Y A333148 Standard composition numbers (A066099) of these compositions are A334966.
%Y A333148 Cf. A056242, A059204, A072706, A107429, A115981, A329398, A332578, A332669, A332673, A332724, A332834.
%K A333148 nonn
%O A333148 0,3
%A A333148 _Gus Wiseman_, May 16 2020
%E A333148 Edited and terms a(21)-a(51) added by _Max Alekseyev_, Oct 30 2024