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 A320387 #53 Jan 22 2023 11:35:42 %S A320387 1,1,1,2,1,2,3,2,2,4,3,4,5,3,5,7,4,7,8,6,8,11,7,9,13,9,11,16,12,15,18, %T A320387 13,17,20,17,21,24,19,24,30,22,28,34,26,34,38,30,37,43,37,42,48,41,50, %U A320387 58,48,55,64,53,64,71,59,73,81,69,79,89,79,90,101,87,100,111 %N A320387 Number of partitions of n into distinct parts such that the successive differences of consecutive parts are nonincreasing, and first difference <= first part. %C A320387 Partitions are usually written with parts in descending order, but the conditions are easier to check "visually" if written in ascending order. %C A320387 Generating function of the "second integrals" of partitions: given a partition (p_1, ..., p_s) written in weakly decreasing order, write the sequence B = (b_1, b_2, ..., b_s) = (p_1, p_1 + p_2, ..., p_1 + ... + p_s). The sequence gives the coefficients of the generating function summing q^(b_1 + ... + b_s) over all partitions of all nonnegative integers. - _William J. Keith_, Apr 23 2022 %C A320387 From _Gus Wiseman_, Jan 17 2023: (Start) %C A320387 Equivalently, a(n) is the number of multisets (weakly increasing sequences of positive integers) with weighted sum n. For example, the Heinz numbers of the a(0) = 1 through a(15) = 7 multisets are: %C A320387 1 2 3 4 7 6 8 10 15 12 16 18 20 26 24 28 %C A320387 5 11 9 17 19 14 21 22 27 41 30 32 %C A320387 13 23 29 31 33 55 39 34 %C A320387 25 35 37 43 45 %C A320387 49 77 47 %C A320387 65 %C A320387 121 %C A320387 These multisets are counted by A264034. The reverse version is A007294. The zero-based version is A359678. %C A320387 (End) %H A320387 Fausto A. C. Cariboni, <a href="/A320387/b320387.txt">Table of n, a(n) for n = 0..2000</a> (terms 0..300 from Seiichi Manyama) %F A320387 G.f.: Sum_{k>=1} x^binomial(k,2)/Product_{j=1..k-1} (1 - x^(binomial(k,2)-binomial(j,2))). - _Andrew Howroyd_, Jan 22 2023 %e A320387 There are a(29) = 15 such partitions of 29: %e A320387 01: [29] %e A320387 02: [10, 19] %e A320387 03: [11, 18] %e A320387 04: [12, 17] %e A320387 05: [13, 16] %e A320387 06: [14, 15] %e A320387 07: [5, 10, 14] %e A320387 08: [6, 10, 13] %e A320387 09: [6, 11, 12] %e A320387 10: [7, 10, 12] %e A320387 11: [8, 10, 11] %e A320387 12: [3, 6, 9, 11] %e A320387 13: [5, 7, 8, 9] %e A320387 14: [2, 4, 6, 8, 9] %e A320387 15: [3, 5, 6, 7, 8] %e A320387 There are a(30) = 18 such partitions of 30: %e A320387 01: [30] %e A320387 02: [10, 20] %e A320387 03: [11, 19] %e A320387 04: [12, 18] %e A320387 05: [13, 17] %e A320387 06: [14, 16] %e A320387 07: [5, 10, 15] %e A320387 08: [6, 10, 14] %e A320387 09: [6, 11, 13] %e A320387 10: [7, 10, 13] %e A320387 11: [7, 11, 12] %e A320387 12: [8, 10, 12] %e A320387 13: [3, 6, 9, 12] %e A320387 14: [9, 10, 11] %e A320387 15: [4, 7, 9, 10] %e A320387 16: [2, 4, 6, 8, 10] %e A320387 17: [6, 7, 8, 9] %e A320387 18: [4, 5, 6, 7, 8] %t A320387 prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; %t A320387 ots[y_]:=Sum[i*y[[i]],{i,Length[y]}]; %t A320387 Table[Length[Select[Range[2^n],ots[prix[#]]==n&]],{n,10}] (* _Gus Wiseman_, Jan 17 2023 *) %o A320387 (Ruby) %o A320387 def partition(n, min, max) %o A320387 return [[]] if n == 0 %o A320387 [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i - 1).map{|rest| [i, *rest]}} %o A320387 end %o A320387 def f(n) %o A320387 return 1 if n == 0 %o A320387 cnt = 0 %o A320387 partition(n, 1, n).each{|ary| %o A320387 ary << 0 %o A320387 ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]} %o A320387 cnt += 1 if ary0.sort == ary0 %o A320387 } %o A320387 cnt %o A320387 end %o A320387 def A320387(n) %o A320387 (0..n).map{|i| f(i)} %o A320387 end %o A320387 p A320387(50) %o A320387 (PARI) seq(n)={Vec(sum(k=1, (sqrtint(8*n+1)+1)\2, my(t=binomial(k,2)); x^t/prod(j=1, k-1, 1 - x^(t-binomial(j,2)) + O(x^(n-t+1)))))} \\ _Andrew Howroyd_, Jan 22 2023 %Y A320387 Cf. A007294, A179254, A179255, A179269, A320382, A320385, A320388. %Y A320387 Number of appearances of n > 0 in A304818, reverse A318283. %Y A320387 A053632 counts compositions by weighted sum. %Y A320387 A358194 counts partitions by weighted sum, reverse A264034. %Y A320387 Weighted sum of prime indices: A359497, A359676, A359682, A359754, A359755. %Y A320387 Cf. A029931, A359361, A359397, A359674, A359677, A359678. %K A320387 nonn %O A320387 0,4 %A A320387 _Seiichi Manyama_, Oct 12 2018