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 34 results. Next

A342332 Number of compositions of n with all adjacent parts (x, y) satisfying x > 2y or y > 2x.

Original entry on oeis.org

1, 1, 1, 1, 3, 4, 4, 7, 12, 17, 23, 34, 51, 75, 111, 164, 239, 350, 520, 767, 1123, 1652, 2439, 3587, 5263, 7745, 11411, 16789, 24695, 36347, 53489, 78686, 115779, 170390, 250711, 368866, 542783, 798713, 1175208, 1729189, 2544462, 3744077, 5509068, 8106165, 11927785, 17550956, 25824938, 37999743, 55914293, 82274088, 121060721
Offset: 0

Views

Author

Gus Wiseman, Mar 10 2021

Keywords

Examples

			The a(1) =  1 through a(9) = 17 compositions:
  (1)  (2)  (3)  (4)   (5)    (6)    (7)    (8)     (9)
                 (13)  (14)   (15)   (16)   (17)    (18)
                 (31)  (41)   (51)   (25)   (26)    (27)
                       (131)  (141)  (52)   (62)    (72)
                                     (61)   (71)    (81)
                                     (151)  (152)   (162)
                                     (313)  (161)   (171)
                                            (251)   (252)
                                            (314)   (261)
                                            (413)   (315)
                                            (1313)  (414)
                                            (3131)  (513)
                                                    (1314)
                                                    (1413)
                                                    (3141)
                                                    (4131)
                                                    (13131)
		

Crossrefs

The unordered version (partitions) is A342098.
Reversing operators and changing 'or' into 'and' gives A342330 (strict: A342341).
The version allowing equality (i.e., non-strict relations) is A342333.
The version allowing partial equality is counted by A342334.
A000929 counts partitions with adjacent parts x >= 2y.
A002843 counts compositions with adjacent parts x <= 2y.
A154402 counts partitions with adjacent parts x = 2y.
A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
A274199 counts compositions with adjacent parts x < 2y.
A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342331 counts compositions with adjacent parts x = 2y or y = 2x.
A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, j),
          j=select(x-> i=0 or x>2*i or i>2*x , {$1..n})))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, May 24 2021
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]>2*#[[i-1]]||#[[i-1]]>2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - j, j], {j, Select[Range[n], i == 0 || # > 2 i || i > 2 # &]}]];
    a[n_] := b[n, 0];
    a /@ Range[0, 50] (* Jean-François Alcover, Jun 09 2021, after Alois P. Heinz *)

Extensions

More terms from Joerg Arndt, Mar 12 2021

A342333 Number of compositions of n with all adjacent parts (x, y) satisfying x >= 2y or y >= 2x.

Original entry on oeis.org

1, 1, 1, 3, 4, 5, 10, 18, 26, 42, 72, 114, 184, 305, 494, 799, 1305, 2123, 3446, 5611, 9134, 14851, 24162, 39314, 63945, 104025, 169238, 275305, 447863, 728592, 1185248, 1928143, 3136706, 5102743, 8301086, 13504175, 21968436, 35737995, 58138282, 94578751, 153859673
Offset: 0

Views

Author

Gus Wiseman, Mar 10 2021

Keywords

Comments

Either quotient x/y or y/x must be >= 2.

Examples

			The a(1) =  1 through a(7) = 18 compositions:
  (1)  (2)  (3)   (4)    (5)    (6)     (7)
            (12)  (13)   (14)   (15)    (16)
            (21)  (31)   (41)   (24)    (25)
                  (121)  (131)  (42)    (52)
                         (212)  (51)    (61)
                                (141)   (124)
                                (213)   (142)
                                (312)   (151)
                                (1212)  (214)
                                (2121)  (241)
                                        (313)
                                        (412)
                                        (421)
                                        (1213)
                                        (1312)
                                        (2131)
                                        (3121)
                                        (12121)
		

Crossrefs

The unordered version (partitions) is A000929.
Reversing operators and changing 'or' into 'and' gives A224957 (strict: A342342).
The version not allowing equality (i.e., strict relations) is A342332.
The version allowing partial equality is A342334.
A002843 counts compositions with adjacent parts x <= 2y.
A154402 counts partitions with adjacent parts x = 2y.
A274199 counts compositions with adjacent parts x < 2y.
A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342098 counts partitions with adjacent parts x > 2y.
A342330 counts compositions with x < 2y and y < 2x (strict: A342341).
A342331 counts compositions with adjacent parts x = 2y or y = 2x.
A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(b(n-j, j), j=
          `if`(i=0, 1..n, {$1..min(n, iquo(i, 2)), $(2*i)..n})))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..42);  # Alois P. Heinz, May 24 2021
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]>=2*#[[i-1]]||#[[i-1]]>=2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i == 0, Sum[b[n-j, j], {j, 1, n}], Sum[b[n-j, j], {j, Range[Min[n, Quotient[i, 2]]]~Union~Range[2i, n]}]]];
    a[n_] := b[n, 0];
    a /@ Range[0, 42] (* Jean-François Alcover, Jun 10 2021, after_Alois P. Heinz_ *)

Extensions

More terms from Joerg Arndt, Mar 12 2021

A342335 Number of compositions of n with all adjacent parts (x, y) satisfying x >= 2y or y = 2x.

Original entry on oeis.org

1, 1, 1, 3, 3, 3, 7, 9, 9, 16, 21, 22, 36, 47, 51, 77, 101, 114, 165, 217, 251, 350, 459, 540, 733, 962, 1152, 1535, 2010, 2437, 3207, 4192, 5141, 6698, 8728, 10802, 13979, 18170, 22652, 29169, 37814, 47410, 60854, 78716, 99144, 126974, 163897, 207159, 264918, 341331, 432606, 552693, 711013, 903041, 1153060
Offset: 0

Views

Author

Gus Wiseman, Mar 10 2021

Keywords

Comments

Also the number of compositions of n with all adjacent parts (x, y) satisfying x = 2y or y >= 2x.

Examples

			The a(1) = 1 through a(9) = 16 compositions:
  (1)  (2)  (3)   (4)    (5)    (6)     (7)      (8)      (9)
            (12)  (13)   (14)   (15)    (16)     (17)     (18)
            (21)  (121)  (212)  (24)    (25)     (26)     (27)
                                (42)    (124)    (125)    (36)
                                (213)   (142)    (215)    (63)
                                (1212)  (214)    (242)    (126)
                                (2121)  (421)    (1214)   (216)
                                        (1213)   (1421)   (1215)
                                        (12121)  (21212)  (1242)
                                                          (2124)
                                                          (2142)
                                                          (2421)
                                                          (4212)
                                                          (21213)
                                                          (121212)
                                                          (212121)
		

Crossrefs

The first condition alone gives A002843, or A000929 for partitions.
The second condition alone gives A154402 for partitions.
The case of equality is A342331.
The version not allowing equality (i.e., strict relations) is A342336.
A224957 counts compositions with adjacent parts x <= 2y and y <= 2x.
A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342098 counts partitions with adjacent parts x > 2y.
A342330 counts compositions with x < 2y and y < 2x (strict: A342341).
A342332 counts compositions with adjacent parts x > 2y or y > 2x.
A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.
A342342 counts strict compositions with adjacent parts x <= 2y and y <= 2x.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]>=2*#[[i-1]]||#[[i-1]]==2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]
    (* Second program: *)
    c[n_, pred_] := Module[{M = IdentityMatrix[n], i, k}, For[k = 1, k <= n, k++, For[i = 1, i <= k-1, i++, M[[i, k]] = Sum[If[pred[j, i], M[[j, k-i]], 0], {j, 1, k-i}]]]; Sum[M[[q, All]], {q, 1, n}]];
    pred[i_, j_] := i >= 2j || j == 2i;
    Join[{1}, c[60, pred]] (* Jean-François Alcover, Jun 10 2021, after Andrew Howroyd *)
  • PARI
    C(n, pred)={my(M=matid(n)); for(k=1, n, for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); sum(q=1, n, M[q, ])}
    seq(n)={concat([1], C(n, (i,j)->i>=2*j || j==2*i))} \\ Andrew Howroyd, Mar 13 2021

Extensions

More terms from Joerg Arndt, Mar 12 2021

A342336 Number of compositions of n with all adjacent parts (x, y) satisfying x > 2y or y = 2x.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 4, 6, 5, 6, 8, 10, 12, 15, 19, 22, 25, 28, 37, 41, 46, 62, 72, 79, 95, 113, 123, 144, 176, 200, 232, 268, 311, 363, 412, 485, 577, 658, 743, 875, 999, 1126, 1338, 1562, 1767, 2034, 2365, 2691, 3088, 3596, 4152, 4785, 5479, 6310, 7273, 8304, 9573, 11136, 12799, 14619, 16910, 19425, 22142, 25579
Offset: 0

Views

Author

Gus Wiseman, Mar 10 2021

Keywords

Comments

Also the number of compositions of n with all adjacent parts (x, y) satisfying x = 2y or y > 2x.

Examples

			The a(1) = 1 through a(12) = 12 compositions (A = 10, B = 11, C = 12):
  1   2   3    4    5    6     7     8      9      A       B       C
          21   13   14   15    16    17     18     19      1A      1B
                         42    25    26     27     28      29      2A
                         213   142   215    63     37      38      39
                               214   1421   216    163     137     84
                               421          2142   217     218     138
                                                   4213    263     219
                                                   21421   425     426
                                                           4214    1425
                                                           14213   2163
                                                                   4215
                                                                   14214
		

Crossrefs

The first condition alone gives A274199, or A342098 for partitions.
The second condition alone gives A154402 for partitions.
The case of equality is A342331.
The version allowing equality (i.e., non-strict relations) is A342335.
A000929 counts partitions with adjacent parts x >= 2y.
A002843 counts compositions with adjacent parts x <= 2y.
A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342330 counts compositions with x < 2y and y < 2x (strict: A342341).
A342332 counts compositions with adjacent parts x > 2y or y > 2x.
A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.
A342342 counts strict compositions with adjacent parts x <= 2y and y <= 2x.

Programs

  • Maple
    b:= proc(n, x) option remember; `if`(n=0, 1, add(
         `if`(x=0 or x>2*y or y=2*x, b(n-y, y), 0), y=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..80);  # Alois P. Heinz, Mar 14 2021
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]>2*#[[i-1]]||#[[i-1]]==2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]
    (* Second program: *)
    b[n_, x_] := b[n, x] = If[n == 0, 1, Sum[
         If[x == 0 || x > 2y || y == 2x, b[n-y, y], 0], {y, 1, n}]];
    a[n_] := b[n, 0];
    a /@ Range[0, 80] (* Jean-François Alcover, May 09 2021, after Alois P. Heinz *)
  • PARI
    \\ See PARI link. David A. Corneth, Mar 12 2021
    
  • PARI
    C(n, pred)={my(M=matid(n)); for(k=1, n, for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); sum(q=1, n, M[q, ])}
    seq(n)={concat([1], C(n, (i,j)->i>2*j || j==2*i))} \\ Andrew Howroyd, Mar 13 2021

Extensions

More terms from Joerg Arndt, Mar 12 2021

A342338 Number of compositions of n with all adjacent parts (x, y) satisfying x < 2y and y <= 2x.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 12, 17, 24, 34, 51, 73, 106, 155, 224, 328, 477, 695, 1013, 1477, 2154, 3140, 4578, 6673, 9728, 14176, 20663, 30113, 43882, 63940, 93167, 135747, 197776, 288138, 419773, 611522, 890829, 1297685, 1890305, 2753505, 4010804, 5842113, 8509462
Offset: 0

Views

Author

Gus Wiseman, Mar 11 2021

Keywords

Comments

Also the number of compositions of n with all adjacent parts (x, y) satisfying x <= 2y and y < 2x.

Examples

			The a(1) = 1 through a(7) = 12 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (23)     (33)      (34)
             (111)  (211)   (32)     (42)      (43)
                    (1111)  (221)    (222)     (223)
                            (2111)   (321)     (232)
                            (11111)  (2211)    (322)
                                     (21111)   (421)
                                     (111111)  (2221)
                                               (3211)
                                               (22111)
                                               (211111)
                                               (1111111)
		

Crossrefs

The first condition alone gives A274199.
The second condition alone gives A002843.
Reversing operators and changing 'and' to 'or' gives A342334.
The version with both relations strict is A342341.
The version with neither relation strict is A342342.
A000929 counts partitions with adjacent parts x >= 2y.
A002843 counts compositions with adjacent parts x <= 2y.
A154402 counts partitions with adjacent parts x = 2y.
A224957 counts compositions with x <= 2y and y <= 2x.
A274199 counts compositions with adjacent parts x < 2y.
A342094 counts partitions with adjacent x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342098 counts partitions with adjacent parts x > 2y.
A342330 counts compositions with x < 2y and y < 2x.
A342331 counts compositions with adjacent parts x = 2y or y = 2x.
A342332 counts compositions with adjacent parts x > 2y or y > 2x.
A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]<2*#[[i-1]]&&#[[i-1]]<=2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]
    (* Second program: *)
    c[n_, pred_] := Module[{M = IdentityMatrix[n], i, k}, For[k = 1, k <= n, k++, For[i = 1, i <= k - 1, i++, M[[i, k]] = Sum[If[pred[j, i], M[[j, k - i]], 0], {j, 1, k - i}]]]; Sum[M[[q, All]], {q, 1, n}]];
    pred[i_, j_] := i < 2j && j <= 2i;
    Join[{1}, c[60, pred]] (* Jean-François Alcover, Jun 10 2021, after Andrew Howroyd *)
  • PARI
    C(n, pred)={my(M=matid(n)); for(k=1, n, for(i=1, k-1, M[i, k]=sum(j=1, k-i, if(pred(j, i), M[j, k-i], 0)))); sum(q=1, n, M[q, ])}
    seq(n)={concat([1], C(n, (i,j)->i<2*j && j<=2*i))} \\ Andrew Howroyd, Mar 13 2021

Extensions

Terms a(21) and beyond from Andrew Howroyd, Mar 13 2021

A342340 Number of compositions of n where each part after the first is either twice, half, or equal to the prior part.

Original entry on oeis.org

1, 1, 2, 4, 6, 9, 17, 24, 41, 67, 109, 173, 296, 469, 781, 1284, 2109, 3450, 5713, 9349, 15422, 25351, 41720, 68590, 112982, 185753, 305752, 503041, 827819, 1361940, 2241435, 3687742, 6068537, 9985389, 16431144, 27036576, 44489533, 73205429, 120460062, 198214516, 326161107
Offset: 0

Views

Author

Gus Wiseman, Mar 12 2021

Keywords

Examples

			The a(1) = 1 through a(6) = 17 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (12)   (22)    (122)    (24)
             (21)   (112)   (212)    (33)
             (111)  (121)   (221)    (42)
                    (211)   (1112)   (222)
                    (1111)  (1121)   (1122)
                            (1211)   (1212)
                            (2111)   (1221)
                            (11111)  (2112)
                                     (2121)
                                     (2211)
                                     (11112)
                                     (11121)
                                     (11211)
                                     (12111)
                                     (21111)
                                     (111111)
		

Crossrefs

The case of partitions is A342337.
The anti-run version is A342331.
A000929 counts partitions with adjacent parts x >= 2y.
A002843 counts compositions with adjacent parts x <= 2y.
A154402 counts partitions with adjacent parts x = 2y.
A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
A274199 counts compositions with adjacent parts x < 2y.
A342094 counts partitions with adjacent x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342098 counts partitions with adjacent parts x > 2y.
A342330 counts compositions with x < 2y and y < 2x (strict: A342341).
A342332 counts compositions with adjacent parts x > 2y or y > 2x.
A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
A342334 counts compositions with adjacent parts x >= 2y or y > 2x.
A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(
          b(n-j, j), j=`if`(i=0, {$1..n}, select(x->
           x::integer and x<=n, {i/2, i, 2*i}))))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..42);  # Alois P. Heinz, May 24 2021
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]==#[[i-1]]||#[[i]]==2*#[[i-1]]||#[[i-1]]==2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - j, j], {j, If[i == 0, Range[n], Select[ {i/2, i, 2 i}, IntegerQ[#] && # <= n &]]}]];
    a[n_] := b[n, 0];
    a /@ Range[0, 42] (* Jean-François Alcover, Jun 10 2021, after Alois P. Heinz *)
  • PARI
    seq(n)={my(M=matid(n)); for(k=1, n, for(i=1, k-1, M[i, k] = if(i%2==0, M[i/2,k-i]) + if(i*2<=k, M[i,k-i]) + if(i*3<=k, M[i*2,k-i]))); concat([1], sum(q=1, n, M[q, ]))} \\ Andrew Howroyd, Mar 13 2021

Extensions

Terms a(21) and beyond from Andrew Howroyd, Mar 13 2021

A342341 Number of strict compositions of n with all adjacent parts (x, y) satisfying x < 2y and y < 2x.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 3, 3, 5, 5, 5, 9, 7, 13, 15, 17, 19, 29, 31, 39, 43, 63, 59, 75, 121, 119, 169, 167, 199, 279, 305, 343, 479, 537, 733, 789, 883, 1057, 1421, 1545, 1831, 2409, 2577, 3343, 4001, 4657, 5131, 6065, 7755, 8841, 10473, 12995, 14659, 17671, 20619, 25157, 28255, 33131, 38265, 47699, 53171, 62611, 80005, 88519, 105937, 119989
Offset: 0

Views

Author

Gus Wiseman, Mar 12 2021

Keywords

Comments

Each quotient of adjacent parts is between 1/2 and 2 exclusive.

Examples

			The a(1) = 1 through a(17) = 17 compositions (A..G = 10..16):
  1  2  3  4  5   6  7   8   9    A    B   C    D    E     F     G
              23     34  35  45   46   47  57   58   59    69    6A
              32     43  53  54   64   56  75   67   68    78    79
                             234  235  65  345  76   86    87    97
                             432  532  74  354  85   95    96    A6
                                           435  346  347   357   358
                                           453  643  356   456   457
                                           534       653   465   475
                                           543       743   546   547
                                                     2345  564   574
                                                     2354  645   745
                                                     4532  654   754
                                                     5432  753   853
                                                           2346  2347
                                                           6432  2356
                                                                 6532
                                                                 7432
		

Crossrefs

The unordered version (partitions) is A342097 (non-strict: A342096).
The non-strict version is A342330.
The version allowing equality is A342342 (non-strict: A224957).
A000929 counts partitions with adjacent parts x >= 2y.
A002843 counts compositions with adjacent parts x <= 2y.
A154402 counts partitions with adjacent parts x = 2y.
A274199 counts compositions with adjacent parts x < 2y.
A342094 counts partitions with adjacent x <= 2y (strict: A342095).
A342098 counts partitions with adjacent parts x > 2y.
A342331 counts compositions with adjacent parts x = 2y or y = 2x.
A342332 counts compositions with adjacent parts x > 2y or y > 2x.
A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&],And@@Table[#[[i]]<2*#[[i-1]]&&#[[i-1]]<2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]

Extensions

More terms from Bert Dobbelaere, Mar 19 2021

A342334 Number of compositions of n with all adjacent parts (x, y) satisfying x >= 2y or y > 2x.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 11, 16, 23, 35, 54, 82, 125, 193, 294, 447, 680, 1037, 1580, 2408, 3676, 5606, 8544, 13024, 19860, 30277, 46155, 70374, 107300, 163586, 249397, 380235, 579705, 883810, 1347467, 2054371, 3132102, 4775211, 7280321, 11099613, 16922503, 25800136, 39335052, 59970425, 91431195
Offset: 0

Views

Author

Gus Wiseman, Mar 10 2021

Keywords

Comments

Also the number of compositions of n with all adjacent parts (x, y) satisfying x > 2y or y >= 2x.

Examples

			The a(1) = 1 through a(8) = 16 compositions:
  (1)  (2)  (3)   (4)   (5)    (6)    (7)     (8)
            (12)  (13)  (14)   (15)   (16)    (17)
                  (31)  (41)   (24)   (25)    (26)
                        (131)  (51)   (52)    (62)
                               (141)  (61)    (71)
                               (312)  (124)   (125)
                                      (151)   (152)
                                      (241)   (161)
                                      (313)   (251)
                                      (412)   (314)
                                      (1312)  (413)
                                              (512)
                                              (1241)
                                              (1313)
                                              (1412)
                                              (3131)
		

Crossrefs

The unordered version (partitions) is A342098 or A000929 (multisets).
The version not allowing equality (i.e., strict relations) is A342332.
The version allowing equality (i.e., non-strict relations) is A342333.
Reversing operators and changing 'or' into 'and' gives A342338.
A002843 counts compositions with adjacent parts x <= 2y.
A154402 counts partitions with adjacent parts x = 2y.
A224957 counts compositions with x <= 2y and y <= 2x (strict: A342342).
A274199 counts compositions with adjacent parts x < 2y.
A342094 counts partitions with adjacent parts x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342330 counts compositions with x < 2y and y < 2x (strict: A342341).
A342331 counts compositions with adjacent parts x = 2y or y = 2x.
A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],And@@Table[#[[i]]>=2*#[[i-1]]||#[[i-1]]>2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]

Extensions

More terms from Joerg Arndt, Mar 12 2021

A342342 Number of strict compositions of n with all adjacent parts (x, y) satisfying x <= 2y and y <= 2x.

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 5, 5, 3, 11, 9, 11, 17, 15, 29, 39, 31, 39, 65, 57, 107, 127, 149, 155, 187, 265, 293, 419, 523, 571, 781, 763, 941, 1371, 1387, 2125, 2383, 2775, 3243, 4189, 4555, 5349, 7241, 7997, 10591, 13171, 14581, 17213, 20253, 25177, 27701, 34317
Offset: 0

Views

Author

Gus Wiseman, Mar 12 2021

Keywords

Comments

Each quotient of adjacent parts is between 1/2 and 2 inclusive.

Examples

			The a(1) = 1 through a(12) = 17 strict compositions (A = 10, B = 11, C = 12):
  1   2   3    4   5    6     7     8    9     A      B      C
          12       23   24    34    35   36    46     47     48
          21       32   42    43    53   45    64     56     57
                        123   124        54    235    65     75
                        321   421        63    532    74     84
                                         234   1234   236    246
                                         243   1243   245    345
                                         324   3421   542    354
                                         342   4321   632    435
                                         423          1235   453
                                         432          5321   534
                                                             543
                                                             642
                                                             1236
                                                             1245
                                                             5421
                                                             6321
		

Crossrefs

The non-strict version is A224957.
The case with strict relations is A342341 (non-strict: A342330).
A000929 counts partitions with adjacent parts x >= 2y.
A002843 counts compositions with adjacent parts x <= 2y.
A154402 counts partitions with adjacent parts x = 2y.
A274199 counts compositions with adjacent parts x < 2y.
A342094 counts partitions with adjacent x <= 2y (strict: A342095).
A342096 counts partitions without adjacent x >= 2y (strict: A342097).
A342098 counts partitions with adjacent parts x > 2y.
A342331 counts compositions with adjacent parts x = 2y or y = 2x.
A342332 counts compositions with adjacent parts x > 2y or y > 2x.
A342333 counts compositions with adjacent parts x >= 2y or y >= 2x.
A342335 counts compositions with adjacent parts x >= 2y or y = 2x.
A342337 counts partitions with adjacent parts x = y or x = 2y.
A342338 counts compositions with adjacent parts x < 2y and y <= 2x.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&],And@@Table[#[[i]]<=2*#[[i-1]]&&#[[i-1]]<=2*#[[i]],{i,2,Length[#]}]&]],{n,0,15}]

Extensions

a(40)-a(51) from Alois P. Heinz, May 24 2021

A342495 Number of compositions of n with constant (equal) first quotients.

Original entry on oeis.org

1, 1, 2, 4, 5, 6, 8, 10, 10, 11, 12, 12, 16, 16, 18, 20, 19, 18, 22, 22, 24, 28, 24, 24, 30, 27, 30, 30, 34, 30, 38, 36, 36, 36, 36, 40, 43, 40, 42, 46, 48, 42, 52, 46, 48, 52, 48, 48, 56, 55, 54, 54, 58, 54, 60, 58, 64, 64, 60, 60, 72, 64, 68, 74, 69, 72, 72
Offset: 0

Views

Author

Gus Wiseman, Mar 17 2021

Keywords

Comments

The first quotients of a sequence are defined as if the sequence were an increasing divisor chain, so for example the first quotients of (6,3,1) are (1/2,1/3).

Examples

			The composition (1,2,4,8) has first quotients (2,2,2) so is counted under a(15).
The composition (4,5,6) has first quotients (5/4,6/5) so is not counted under a(15).
The a(1) = 1 through a(7) = 10 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (12)   (13)    (14)     (15)      (16)
             (21)   (22)    (23)     (24)      (25)
             (111)  (31)    (32)     (33)      (34)
                    (1111)  (41)     (42)      (43)
                            (11111)  (51)      (52)
                                     (222)     (61)
                                     (111111)  (124)
                                               (421)
                                               (1111111)
		

Crossrefs

The version for differences instead of quotients is A175342.
The unordered version is A342496, ranked by A342522.
The strict unordered version is A342515.
The distinct version is A342529.
A000005 counts constant compositions.
A000009 counts strictly increasing (or strictly decreasing) compositions.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A003238 counts chains of divisors summing to n - 1 (strict: A122651).
A167865 counts strict chains of divisors > 1 summing to n.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ@@Divide@@@Partition[#,2,1]&]],{n,0,15}]

Formula

a(n > 0) = 2*A342496(n) - A000005(n).
Previous Showing 11-20 of 34 results. Next