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.

Previous Showing 11-20 of 21 results. Next

A325769 Number of integer partitions of n whose distinct consecutive subsequences have different sums.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 11, 12, 17, 19, 29, 28, 41, 42, 62, 61, 88, 87, 123, 121, 168, 164, 234, 225, 306, 306, 411, 401, 527, 533, 700, 689, 894, 885, 1163, 1150, 1452, 1469, 1866, 1835, 2333, 2346, 2913, 2913, 3638, 3619, 4511, 4537, 5497, 5576, 6859, 6827, 8263
Offset: 0

Views

Author

Gus Wiseman, May 21 2019

Keywords

Comments

For example (3,3,1,1) is counted under a(8) because it has distinct consecutive subsequences (), (1), (1,1), (3), (3,1), (3,1,1), (3,3), (3,3,1), (3,3,1,1), all of which have different sums.
The Heinz numbers of these partitions are given by A325778.

Examples

			The a(1) = 1 through a(8) = 12 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (221)    (51)      (61)       (62)
                            (311)    (222)     (322)      (71)
                            (11111)  (411)     (331)      (332)
                                     (111111)  (421)      (521)
                                               (511)      (611)
                                               (2221)     (2222)
                                               (4111)     (3311)
                                               (1111111)  (5111)
                                                          (11111111)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Total/@Union[ReplaceList[#,{_,s__,_}:>{s}]]&]],{n,0,30}]

Extensions

a(41)-a(53) from Fausto A. C. Cariboni, Feb 24 2021

A325685 Number of compositions of n whose distinct consecutive subsequences have different sums, and such that these sums cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 3, 1, 5, 3, 5, 3, 9, 1, 9, 5, 7, 5, 11, 1, 13, 5, 9, 5, 13, 3, 13, 7, 9, 5, 17, 1, 17, 5, 9, 9, 15, 5, 15, 5, 13, 5, 21, 1, 17, 9, 9, 9, 17, 3, 21, 7, 13, 5, 17, 5, 21, 9, 13, 5, 21, 1, 21, 9, 11, 13, 19, 5, 17, 5, 17, 5, 29, 1, 21, 9, 9, 13, 17, 5, 25, 7, 17, 7
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.
Compare to the definition of perfect partitions (A002033).

Examples

			The distinct consecutive subsequences of (3,4,1,1) together with their sums are:
   1: {1}
   2: {1,1}
   3: {3}
   4: {4}
   5: {4,1}
   6: {4,1,1}
   7: {3,4}
   8: {3,4,1}
   9: {3,4,1,1}
Because the sums are all different and cover {1...9}, it follows that (3,4,1,1) is counted under a(9).
The a(1) = 1 through a(9) = 9 compositions:
  1   11   12    1111   113     132      1114      1133       1143
           21           122     231      1222      3311       1332
           111          221     111111   2221      11111111   2331
                        311              4111                 3411
                        11111            1111111              11115
                                                              12222
                                                              22221
                                                              51111
                                                              111111111
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Sort[Total/@Union[ReplaceList[#,{_,s__,_}:>{s}]]]==Range[n]&]],{n,0,15}]

Extensions

a(21)-a(25) from Jinyuan Wang, Jun 26 2020
a(21)-a(25) corrected, a(26)-a(80) from Fausto A. C. Cariboni, Feb 21 2022

A325684 Number of minimal complete rulers of length n.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 12, 12, 24, 40, 46, 92, 133, 192, 308, 546, 710, 1108, 1754, 2726, 3878, 5928, 9260, 14238, 20502, 30812, 48378, 72232, 105744, 160308, 241592, 362348, 540362, 797750, 1183984, 1786714
Offset: 0

Views

Author

Gus Wiseman, May 13 2019

Keywords

Comments

A complete ruler of length n is a subset of {0..n} containing 0 and n and such that the differences of distinct terms (up to sign) cover an initial interval of positive integers.
Also the number of maximal (most coarse) compositions of n whose consecutive subsequence-sums cover an initial interval of positive integers.

Examples

			The a(1) = 1 through a(7) = 12 rulers:
  {0,1}  {0,1,2}  {0,1,3}  {0,1,2,4}  {0,1,2,5}  {0,1,4,6}    {0,1,2,3,7}
                  {0,2,3}  {0,1,3,4}  {0,1,3,5}  {0,2,5,6}    {0,1,2,4,7}
                           {0,2,3,4}  {0,2,4,5}  {0,1,2,3,6}  {0,1,2,5,7}
                                      {0,3,4,5}  {0,1,3,5,6}  {0,1,3,5,7}
                                                 {0,3,4,5,6}  {0,1,3,6,7}
                                                              {0,1,4,5,7}
                                                              {0,1,4,6,7}
                                                              {0,2,3,6,7}
                                                              {0,2,4,6,7}
                                                              {0,2,5,6,7}
                                                              {0,3,5,6,7}
                                                              {0,4,5,6,7}
The a(1) = 1 through a(9) = 24 compositions:
  (1)  (11)  (12)  (112)  (113)  (132)   (1114)  (1133)   (1143)
             (21)  (121)  (122)  (231)   (1123)  (1241)   (1332)
                   (211)  (221)  (1113)  (1132)  (1322)   (2331)
                          (311)  (1221)  (1222)  (1412)   (3411)
                                 (3111)  (1231)  (1421)   (11115)
                                         (1312)  (2141)   (11124)
                                         (1321)  (2231)   (11142)
                                         (2131)  (3311)   (11241)
                                         (2221)  (11114)  (11322)
                                         (2311)  (11132)  (12141)
                                         (3211)  (23111)  (12222)
                                         (4111)  (41111)  (12231)
                                                          (12312)
                                                          (13221)
                                                          (14112)
                                                          (14121)
                                                          (14211)
                                                          (21141)
                                                          (21321)
                                                          (22221)
                                                          (22311)
                                                          (24111)
                                                          (42111)
                                                          (51111)
		

Crossrefs

Programs

  • Mathematica
    fasmin[y_]:=Complement[y,Union@@Table[Union[s,#]&/@Rest[Subsets[Complement[Union@@y,s]]],{s,y}]];
    Table[Length[fasmin[Accumulate/@Select[Join@@Permutations/@IntegerPartitions[n],SubsetQ[ReplaceList[#,{_,s__,_}:>Plus[s]],Range[n]]&]]],{n,0,15}]

Extensions

a(16)-a(36) from Fausto A. C. Cariboni, Feb 27 2022

A325679 Number of compositions of n such that every restriction to a circular subinterval has a different sum.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 5, 13, 13, 27, 21, 41, 41, 77, 63, 143, 129, 241, 203, 385, 347, 617, 491, 947, 835, 1445, 1185, 2511, 1991, 3585, 2915, 5411, 4569, 8063, 6321, 11131, 10133, 16465, 13207, 23817, 20133, 33929, 26663, 48357, 41363, 69605, 54363, 95727, 81183, 132257, 106581
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 subinterval is a sequence of consecutive indices where the first and last indices are also considered consecutive.
For n > 0, a(n) is the number of subsets of Z_n which contain 0 and such that every ordered pair of distinct elements has a different difference (modulo n). The elements of a subset correspond with the partial sums of a composition. For example, when n = 8 the subset {0,2,7} corresponds with the composition (251). - Andrew Howroyd, Mar 24 2025

Examples

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

Crossrefs

Programs

  • Mathematica
    suball[q_]:=Join[Take[q,#]&/@Select[Tuples[Range[Length[q]],2],OrderedQ],Drop[q,#]&/@Select[Tuples[Range[2,Length[q]-1],2],OrderedQ]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Total/@suball[#]&]],{n,0,15}]
  • PARI
    a(n)={
       my(recurse(k,b,w)=
          if(k >= n, 1,
             b+=1<Andrew Howroyd, Mar 24 2025

Extensions

a(21) onwards from Andrew Howroyd, Mar 24 2025

A325678 Maximum length of a composition of n such that every restriction to a subinterval has a different sum.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
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.
Also the maximum number of nonzero marks on a Golomb ruler of length n.

Crossrefs

Programs

  • Mathematica
    Table[Max[Length/@Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@ReplaceList[#,{_,s__,_}:>Plus[s]]&]],{n,0,15}]

Formula

a(n) + 1 = A143824(n + 1).

A325686 Number of strict length-3 compositions x + y + z = n satisfying x + y != z and x != y + z.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 6, 8, 18, 16, 30, 34, 48, 48, 72, 72, 96, 98, 126, 128, 162, 160, 198, 202, 240, 240, 288, 288, 336, 338, 390, 392, 450, 448, 510, 514, 576, 576, 648, 648, 720, 722, 798, 800, 882, 880, 966, 970, 1056, 1056, 1152, 1152, 1248, 1250, 1350, 1352
Offset: 0

Views

Author

Gus Wiseman, May 13 2019

Keywords

Comments

A strict composition of n is a finite sequence of distinct positive integers summing to n.
From Kevin O'Bryant, Jun 02 2025: (Start)
Also the number of Sidon sets in {0,1,...,n} with 4 elements that contain both 0 and n.
Also, the number of 3-tuples of positive integers with the 6 numbers x, y, z, x+y, y+z, x+y+z=n all distinct. (End)

Examples

			The a(6) = 2 through a(10) = 16 compositions:
  (132)  (124)  (125)  (126)  (127)
  (231)  (142)  (143)  (135)  (136)
         (214)  (152)  (153)  (154)
         (241)  (215)  (162)  (163)
         (412)  (251)  (216)  (172)
         (421)  (341)  (234)  (217)
                (512)  (243)  (253)
                (521)  (261)  (271)
                       (315)  (316)
                       (324)  (352)
                       (342)  (361)
                       (351)  (451)
                       (423)  (613)
                       (432)  (631)
                       (513)  (712)
                       (531)  (721)
                       (612)
                       (621)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Cases[Join@@Permutations/@IntegerPartitions[n,{3}],{x_,y_,z_}/;x!=y!=z&&x+y!=z &&x!=y+z]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 14 2019: (Start)
G.f.: 2*x^6*(1 + 3*x + 3*x^2 + 5*x^3) / ((1 - x)^3*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9) for n>9. (End)
Above conjecture confirmed for n <= 5000. - Fausto A. C. Cariboni, Feb 17 2022

A036501 Number of inequivalent Golomb rulers with n marks and shortest length.

Original entry on oeis.org

1, 1, 1, 2, 4, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2

Views

Author

Keywords

Comments

From Gus Wiseman, May 31 2019: (Start)
A Golomb ruler of length n is a subset of {0..n} containing 0 and n and such that every pair of distinct terms has a different difference. For example, the a(2) = 1 through a(8) = 1 Golomb rulers are:
2: {0,1}
3: {0,1,3}
4: {0,1,4,6}
5: {0,1,4,9,11}
5: {0,2,7,8,11}
6: {0,1,4,10,12,17}
6: {0,1,4,10,15,17}
6: {0,1,8,11,13,17}
6: {0,1,8,12,14,17}
7: {0,1,4,10,18,23,25}
7: {0,1,7,11,20,23,25}
7: {0,2,3,10,16,21,25}
7: {0,2,7,13,21,22,25}
7: {0,1,11,16,19,23,25}
8: {0,1,4,9,15,22,32,34}
Also half the number of length-(n - 1) compositions of A003022(n) such that every consecutive subsequence has a different sum. For example, the a(2) = 1 through a(8) = 1 compositions are (A = 10):
2: (1)
3: (1,2)
4: (1,3,2)
5: (1,3,5,2)
5: (2,5,1,3)
6: (1,3,6,2,5)
6: (1,3,6,5,2)
6: (1,7,3,2,4)
6: (1,7,4,2,3)
7: (1,3,6,8,5,2)
7: (1,6,4,9,3,2)
7: (2,1,7,6,5,4)
7: (2,5,6,8,1,3)
7: (1,A,5,3,4,2)
8: (1,3,5,6,7,A,2)
(End)

Crossrefs

A325681 Number of necklace compositions of n such that every restriction to a circular subinterval has a different sum.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 6, 6, 11, 9, 16, 16, 27, 23, 46, 42, 73, 63, 112, 102, 173, 141, 254, 228, 373, 313, 614, 500, 855, 709, 1252, 1074, 1827, 1457, 2470, 2260, 3559, 2905, 5044, 4294, 6997, 5623, 9752, 8422, 13741, 10913, 18562, 15912, 25213, 20569, 35146, 29286, 46307, 38241, 61396
Offset: 1

Views

Author

Gus Wiseman, May 13 2019

Keywords

Comments

A necklace composition of n is a finite sequence of positive integers summing to n that is lexicographically minimal among all of its cyclic rotations.
A circular subinterval is a sequence of consecutive indices where the first and last indices are also considered consecutive.

Examples

			The a(1) = 1 through a(10) = 9 necklace compositions (A = 10):
  (1)  (2)  (3)   (4)   (5)   (6)   (7)    (8)    (9)    (A)
            (12)  (13)  (14)  (15)  (16)   (17)   (18)   (19)
                        (23)  (24)  (25)   (26)   (27)   (28)
                                    (34)   (35)   (36)   (37)
                                    (124)  (125)  (45)   (46)
                                    (142)  (152)  (126)  (127)
                                                  (135)  (136)
                                                  (153)  (163)
                                                  (162)  (172)
                                                  (234)
                                                  (243)
		

Crossrefs

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    suball[q_]:=Join[Take[q,#]&/@Select[Tuples[Range[Length[q]],2],OrderedQ],Drop[q,#]&/@Select[Tuples[Range[2,Length[q]-1],2],OrderedQ]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&UnsameQ@@Total/@suball[#]&]],{n,15}]
  • PARI
    a(n)={
       my(recurse(k,r,b,w)=
          if(k >= n, 1/r,
             b+=1<Andrew Howroyd, Mar 25 2025

Extensions

a(21) onwards from Andrew Howroyd, Mar 24 2025

A351699 T(n,k) is the number of non-congruent maximal subsets of a grid of n X k lattice points (k <= n), such that no two points are at the same distance, and the points do not fit into a smaller grid. The size of the subsets is given by A351700. T(n,k) and A351700 are triangles read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 5, 10, 1, 5, 28, 7, 21, 2, 19, 8, 104, 330, 2, 1, 4, 70, 15, 110, 574, 1, 3, 30, 272, 205, 4, 71, 563, 1991, 4, 68, 50, 1001, 113, 1130, 4, 76, 383, 9, 8, 362, 35, 1150, 23, 363, 3975, 7, 38, 8, 18, 1082, 415, 2, 638, 7503, 23, 515, 5802, 2, 2, 150, 62, 4238, 120, 1, 55, 1776, 17277, 26, 481, 2388
Offset: 1

Views

Author

Rainer Rosenthal and Hugo Pfoertner, Apr 09 2022

Keywords

Comments

Configurations of points differing by any combination of rotation and reflection are counted only once.

Examples

			The triangle begins:
  #
  # 1:  1                   Counting grids n X k.
      ( 1 )                 Two lines per side length n:
  # 2:  2  2                1. for other side k = 1, 2, ...
      ( 1  1 )                 maximal number of points
  # 3:  2  3    3           2. number of configurations
      ( 1  2    1 )
  # 4:  3  4    4    4      Example: 28 figures with
      ( 1  1    5   10 )             4 points on 5 X 3
  # 5:  3  4    4    5    5
      ( 1  5   28    7   21 )
  # 6:  3  4    5    5    5    6
      ( 2 19    8  104  330    2 )
  # 7:  4  5    5    6    6    6    7
      ( 1  4   70   15  110  574    1 )
  # 8:  4  5    5    6    7    7    7     7
      ( 3 30  272  205    4   71  563  1991 )
  # 9:  4  5    6    6    7    7    8    8   8
      ( 4 68   50 1001  113 1130    4   76 383 )
  #10:  4  6    6    7    7    8    8    8   9    9
      ( 9  8  362   35 1150   23  363 3975   7   38 )
  #11:  4  6    6    7    8    8    8    9   9    9 10
      ( 8 18 1082  415    2  638 7503   23 515 5802  2 )
  #
  #   Grid n X k configurations with
  #       distinct distances
  .
  .
  All T(6,3) = 8 configurations
           0  1  2  3  4  5                    0  1  2  3  4  5
         -------------------                 -------------------
      2 |  .  X  X  .  X  .               2 |  .  .  .  .  X  .
      1 |  .  .  .  .  .  X               1 |  .  .  .  .  .  X
      0 |  X  .  .  .  .  .               0 |  X  .  X  .  .  X
      y /-------------------              y /-------------------
        x  0  1  2  3  4  5                 x  0  1  2  3  4  5
    {1,2,4,5,8,9,10,17,20,26}  dist^2   {1,2,4,5,8,9,10,20,25,26}
           0  1  2  3  4  5                    0  1  2  3  4  5
         -------------------                 -------------------
      2 |  .  .  X  .  X  .               2 |  .  X  .  X  .  .
      1 |  .  .  .  .  .  X               1 |  X  .  .  .  .  .
      0 |  X  X  .  .  .  .               0 |  X  .  .  .  .  X
      y /-------------------              y /-------------------
        x  0  1  2  3  4  5                 x  0  1  2  3  4  5
    {1,2,4,5,8,10,13,17,20,26}  dist^2  {1,2,4,5,8,10,13,20,25,26}
           0  1  2  3  4  5                    0  1  2  3  4  5
         -------------------                 -------------------
      2 |  .  .  .  .  X  .               2 |  .  .  X  .  X  .
      1 |  X  .  .  .  .  X               1 |  X  .  .  .  .  X
      0 |  X  .  X  .  .  .               0 |  X  .  .  .  .  .
      y /-------------------              y /-------------------
        x  0  1  2  3  4  5                 x  0  1  2  3  4  5
    {1,2,4,5,8,10,17,20,25,26}  dist^2  {1,2,4,5,8,10,17,20,25,26}
           0  1  2  3  4  5                    0  1  2  3  4  5
         -------------------                 -------------------
      2 |  .  .  X  .  .  X               2 |  X  .  .  .  .  X
      1 |  .  .  .  .  .  .               1 |  .  .  .  .  .  .
      0 |  X  X  .  .  .  X               0 |  X  .  .  X  X  .
      y /-------------------              y /-------------------
        x  0  1  2  3  4  5                 x  0  1  2  3  4  5
    {1,4,5,8,9,13,16,20,25,29}  dist^2  {1,4,5,8,9,13,16,20,25,29}
  .
		

Crossrefs

Extensions

Completed row 8 and new rows 9-12 from Hugo Pfoertner, Jul 12 2022

A308251 Number of subsets of {1,...,n + 1} containing n + 1 and such that all positive differences of distinct elements are distinct.

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 21, 34, 49, 76, 101, 146, 205, 294, 397, 560, 747, 1028, 1341, 1810, 2343, 3178, 4051, 5370, 6921, 9014, 11361, 14838, 18719, 24082, 29953, 38220, 47663, 60550, 74619, 93848, 115961, 145320, 177549, 221676, 270335, 335124
Offset: 0

Views

Author

Gus Wiseman, May 17 2019

Keywords

Comments

Also the number of subsets of {1...n} containing no positive differences of the elements and such that all such differences are distinct.

Examples

			The a(0) = 1 through a(5) = 14 subsets:
  {1}  {2}    {3}    {4}      {5}      {6}
       {1,2}  {1,3}  {1,4}    {1,5}    {1,6}
              {2,3}  {2,4}    {2,5}    {2,6}
                     {3,4}    {3,5}    {3,6}
                     {1,2,4}  {4,5}    {4,6}
                     {1,3,4}  {1,2,5}  {5,6}
                              {1,4,5}  {1,2,6}
                              {2,3,5}  {1,3,6}
                              {2,4,5}  {1,4,6}
                                       {1,5,6}
                                       {2,3,6}
                                       {2,5,6}
                                       {3,4,6}
                                       {3,5,6}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&UnsameQ@@Abs[Subtract@@@Subsets[#,{2}]]&]],{n,15}]

Formula

First differences of A143823. Partial sums of A169942.
Previous Showing 11-20 of 21 results. Next