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.

A325557 Number of compositions of n with equal differences up to sign.

This page as a plain text file.
%I A325557 #12 Aug 24 2019 11:50:55
%S A325557 1,1,2,4,6,8,13,12,20,24,25,29,49,40,50,64,86,80,105,102,164,175,186,
%T A325557 208,325,316,382,476,624,660,814,961,1331,1500,1739,2140,2877,3274,
%U A325557 3939,4901,6345,7448,9054,11157,14315,17181,20769,25843,32947,39639,48257,60075
%N A325557 Number of compositions of n with equal differences up to sign.
%C A325557 A composition of n is a finite sequence of positive integers summing to n.
%C A325557 The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (3,1,2) are (-2,1).
%H A325557 Andrew Howroyd, <a href="/A325557/b325557.txt">Table of n, a(n) for n = 0..200</a>
%H A325557 Gus Wiseman, <a href="/A325325/a325325.txt">Sequences counting and ranking integer partitions by the differences of their successive parts.</a>
%e A325557 The a(1) = 1 through a(8) = 20 compositions:
%e A325557   (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
%e A325557        (11)  (12)   (13)    (14)     (15)      (16)       (17)
%e A325557              (21)   (22)    (23)     (24)      (25)       (26)
%e A325557              (111)  (31)    (32)     (33)      (34)       (35)
%e A325557                     (121)   (41)     (42)      (43)       (44)
%e A325557                     (1111)  (131)    (51)      (52)       (53)
%e A325557                             (212)    (123)     (61)       (62)
%e A325557                             (11111)  (141)     (151)      (71)
%e A325557                                      (222)     (232)      (161)
%e A325557                                      (321)     (313)      (242)
%e A325557                                      (1212)    (12121)    (323)
%e A325557                                      (2121)    (1111111)  (1232)
%e A325557                                      (111111)             (1313)
%e A325557                                                           (2123)
%e A325557                                                           (2222)
%e A325557                                                           (2321)
%e A325557                                                           (3131)
%e A325557                                                           (3212)
%e A325557                                                           (21212)
%e A325557                                                           (11111111)
%t A325557 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Abs[Differences[#]]&]],{n,0,15}]
%o A325557 (PARI)
%o A325557 step(R,n,s)={matrix(n, n, i, j, if(i>j, if(j>s, R[i-j, j-s]) + if(j+s<=n, R[i-j, j+s])) )}
%o A325557 w(n,s)={my(R=matid(n), t=0); while(R, R=step(R,n,s); t+=vecsum(R[n,])); t}
%o A325557 a(n) = {numdiv(max(1,n)) + sum(s=1, n-1, w(n,s))} \\ _Andrew Howroyd_, Aug 22 2019
%Y A325557 Cf. A000079, A047966, A049988, A070211, A098504, A173258, A175342, A325545, A325546, A325547, A325548, A325552, A325558.
%K A325557 nonn
%O A325557 0,3
%A A325557 _Gus Wiseman_, May 11 2019
%E A325557 a(26)-a(42) from _Lars Blomberg_, May 30 2019
%E A325557 Terms a(43) and beyond from _Andrew Howroyd_, Aug 22 2019