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.

A325558 Number of compositions of n with equal circular differences up to sign.

This page as a plain text file.
%I A325558 #14 Aug 24 2019 11:51:15
%S A325558 1,2,4,5,6,10,8,16,13,16,18,32,20,30,30,57,34,52,46,96,74,86,84,174,
%T A325558 119,170,192,306,244,332,372,628,560,694,812,1259,1228,1566,1852,2696,
%U A325558 2806,3538,4260,5894,6482,8098,9890,13392,15049,18706,23018,30298,35198
%N A325558 Number of compositions of n with equal circular differences up to sign.
%C A325558 A composition of n is a finite sequence of positive integers summing to n.
%C A325558 The circular differences of a composition c of length k are c_{i + 1} - c_i for i < k and c_1 - c_i for i = k. For example, the circular differences of (1,2,1,3) are (1,-1,2,-2).
%H A325558 Andrew Howroyd, <a href="/A325558/b325558.txt">Table of n, a(n) for n = 1..200</a>
%H A325558 Gus Wiseman, <a href="/A325325/a325325.txt">Sequences counting and ranking integer partitions by the differences of their successive parts.</a>
%e A325558 The a(1) = 1 through a(8) = 16 compositions:
%e A325558   (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
%e A325558        (11)  (12)   (13)    (14)     (15)      (16)       (17)
%e A325558              (21)   (22)    (23)     (24)      (25)       (26)
%e A325558              (111)  (31)    (32)     (33)      (34)       (35)
%e A325558                     (1111)  (41)     (42)      (43)       (44)
%e A325558                             (11111)  (51)      (52)       (53)
%e A325558                                      (222)     (61)       (62)
%e A325558                                      (1212)    (1111111)  (71)
%e A325558                                      (2121)               (1232)
%e A325558                                      (111111)             (1313)
%e A325558                                                           (2123)
%e A325558                                                           (2222)
%e A325558                                                           (2321)
%e A325558                                                           (3131)
%e A325558                                                           (3212)
%e A325558                                                           (11111111)
%t A325558 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Abs[Differences[Append[#,First[#]]]]&]],{n,15}]
%o A325558 (PARI)
%o A325558 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 A325558 w(n,k,s)={my(R=matrix(n,n,i,j,i==j&&abs(i-k)==s), t=0); while(R, R=step(R,n,s); t+=R[n,k]); t}
%o A325558 a(n) = {numdiv(max(1,n)) + sum(s=1, n-1, sum(k=1, n, w(n,k,s)))} \\ _Andrew Howroyd_, Aug 22 2019
%Y A325558 Cf. A000079, A008965, A047966, A049988, A098504, A173258, A175342, A325553, A325557, A325588, A325589.
%K A325558 nonn
%O A325558 1,2
%A A325558 _Gus Wiseman_, May 11 2019
%E A325558 a(26)-a(42) from _Lars Blomberg_, May 30 2019
%E A325558 Terms a(43) and beyond from _Andrew Howroyd_, Aug 22 2019