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.

A325680 Number of compositions of n such that every distinct circular subsequence has a different sum.

Original entry on oeis.org

1, 1, 2, 4, 5, 6, 8, 14, 16, 29, 24, 42, 46, 78, 66, 146, 133, 242, 208, 386, 352, 620, 494, 948, 842, 1447
Offset: 0

Views

Author

Gus Wiseman, May 13 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
A circular subsequence is a sequence of consecutive terms where the first and last parts are also considered consecutive.

Examples

			The a(1) = 1 through a(8) = 16 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (12)   (13)    (14)     (15)      (16)       (17)
             (21)   (22)    (23)     (24)      (25)       (26)
             (111)  (31)    (32)     (33)      (34)       (35)
                    (1111)  (41)     (42)      (43)       (44)
                            (11111)  (51)      (52)       (53)
                                     (222)     (61)       (62)
                                     (111111)  (124)      (71)
                                               (142)      (125)
                                               (214)      (152)
                                               (241)      (215)
                                               (412)      (251)
                                               (421)      (512)
                                               (1111111)  (521)
                                                          (2222)
                                                          (11111111)
		

Crossrefs

Programs

  • Mathematica
    subalt[q_]:=Union[ReplaceList[q,{_,s__,_}:>{s}],DeleteCases[ReplaceList[q,{t___,,u___}:>{u,t}],{}]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Total/@subalt[#]&]],{n,0,15}]

Extensions

a(18)-a(25) from Robert Price, Jun 19 2021