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

A356604 Number of integer compositions of n into odd parts covering an initial interval of odd positive integers.

Original entry on oeis.org

1, 1, 1, 1, 3, 4, 5, 9, 13, 24, 40, 61, 101, 160, 257, 415, 679, 1103, 1774, 2884, 4656, 7517, 12165, 19653, 31753, 51390, 83134, 134412, 217505, 351814, 569081, 920769, 1489587, 2409992, 3899347, 6309059, 10208628, 16518910, 26729830, 43254212, 69994082
Offset: 0

Views

Author

Gus Wiseman, Aug 30 2022

Keywords

Examples

			The a(1) = 1 through a(8) = 13 compositions:
  (1)  (11)  (111)  (13)    (113)    (1113)    (133)      (1133)
                    (31)    (131)    (1131)    (313)      (1313)
                    (1111)  (311)    (1311)    (331)      (1331)
                            (11111)  (3111)    (11113)    (3113)
                                     (111111)  (11131)    (3131)
                                               (11311)    (3311)
                                               (13111)    (111113)
                                               (31111)    (111131)
                                               (1111111)  (111311)
                                                          (113111)
                                                          (131111)
                                                          (311111)
                                                          (11111111)
The a(9) = 24 compositions:
  (135)  (11133)  (1111113)  (111111111)
  (153)  (11313)  (1111131)
  (315)  (11331)  (1111311)
  (351)  (13113)  (1113111)
  (513)  (13131)  (1131111)
  (531)  (13311)  (1311111)
         (31113)  (3111111)
         (31131)
         (31311)
         (33111)
		

Crossrefs

The case of partitions is A053251, ranked by A356232 and A356603.
These compositions are ranked by the intersection of A060142 and A333217.
This is the odd initial case of A107428.
This is the odd restriction of A107429.
This is the normal/covering case of A324969 (essentially A000045).
The non-initial version is A356605.
A000041 counts partitions, compositions A011782.
A055932 lists numbers with prime indices covering an initial interval.
A066208 lists numbers with all odd prime indices, counted by A000009.

Programs

  • Mathematica
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[(#+1)/2]&]],{n,0,15}]

Extensions

More terms from Alois P. Heinz, Sep 01 2022

A356846 Number of integer compositions of n into parts not covering an interval of positive integers.

Original entry on oeis.org

0, 0, 0, 0, 2, 5, 11, 25, 57, 115, 236, 482, 978, 1986, 4003, 8033, 16150, 32402, 64943, 130207, 260805, 522123, 1045168, 2091722, 4185431, 8374100, 16753538, 33515122, 67042865, 134106640, 268246886, 536549760, 1073194999, 2146553011, 4293391411, 8587283895
Offset: 0

Views

Author

Gus Wiseman, Sep 03 2022

Keywords

Examples

			The a(0) = 0 through a(6) = 8 compositions:
  .  .  .  .  (13)  (14)   (15)
              (31)  (41)   (24)
                    (113)  (42)
                    (131)  (51)
                    (311)  (114)
                           (141)
                           (411)
                           (1113)
                           (1131)
                           (1311)
                           (3111)
		

Crossrefs

The complement is counted by A107428, initial A107429.
The case of partitions is A239955, ranked by A073492, initial A053251, complement A034296.
These compositions are ranked by A356842, complement A356841.
A000041 counts partitions, compositions A011782.
A066208 lists numbers with all odd prime indices, counted by A000009.
A073491 lists numbers with gapless prime indices, initial A055932.

Programs

  • Mathematica
    gappyQ[m_]:=And[m!={},Union[m]!=Range[Min[m],Max[m]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],gappyQ]],{n,0,15}]

Formula

a(n) = A011782(n) - A107428(n).

A060139 Ordered set S defined by these rules: 0 and 1 are in S and if x is a nonzero number in S, then 3x-1 and 9x are in S.

Original entry on oeis.org

0, 1, 2, 5, 9, 14, 18, 26, 41, 45, 53, 77, 81, 122, 126, 134, 158, 162, 230, 234, 242, 365, 369, 377, 401, 405, 473, 477, 485, 689, 693, 701, 725, 729, 1094, 1098, 1106, 1130, 1134, 1202, 1206, 1214, 1418, 1422, 1430, 1454, 1458, 2066, 2070, 2078, 2102, 2106
Offset: 0

Views

Author

Clark Kimberling, Mar 05 2001

Keywords

Comments

The numbers 1 and 9x occupy same positions in S that 1 occupies in the infinite Fibonacci word (A003849).

Crossrefs

A356605 Number of integer compositions of n into odd parts covering an interval of odd positive integers.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 6, 10, 15, 26, 41, 65, 104, 164, 262, 424, 687, 1112, 1792, 2898, 4677, 7556, 12197, 19699, 31836, 51466, 83234, 134593, 217674, 352057, 569452, 921165, 1490173, 2410784, 3900288, 6310436, 10210358, 16521108, 26733020, 43258086, 69999295
Offset: 0

Views

Author

Gus Wiseman, Aug 31 2022

Keywords

Examples

			The a(1) = 1 through a(8) = 15 compositions:
  (1)  (11)  (3)    (13)    (5)      (33)      (7)        (35)
             (111)  (31)    (113)    (1113)    (133)      (53)
                    (1111)  (131)    (1131)    (313)      (1133)
                            (311)    (1311)    (331)      (1313)
                            (11111)  (3111)    (11113)    (1331)
                                     (111111)  (11131)    (3113)
                                               (11311)    (3131)
                                               (13111)    (3311)
                                               (31111)    (111113)
                                               (1111111)  (111131)
                                                          (111311)
                                                          (113111)
                                                          (131111)
                                                          (311111)
                                                          (11111111)
		

Crossrefs

These compositions are ranked by the intersection of A060142 and A356841.
Before restricting to odds we have A107428, initial A107429.
The not necessarily gapless version is A324969 (essentially A000045).
The strict case is A332032.
The initial case is A356604.
The case of partitions is A356737, initial A053251 (ranked by A356232).
A000041 counts partitions, compositions A011782.
A066208 lists numbers with all odd prime indices, counted by A000009.
A073491 lists numbers with gapless prime indices, initial A055932.

Programs

  • Mathematica
    nogapQ[m_]:=m=={}||Union[m]==Range[Min[m],Max[m]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@OddQ/@#&&nogapQ[(#+1)/2]&]],{n,0,15}]

Extensions

More terms from Alois P. Heinz, Sep 01 2022

A060141 Ordered set S defined by these rules: 0 and 1 are in S and if x is a nonzero number in S, then 3x and 9x+2 are in S.

Original entry on oeis.org

0, 1, 3, 9, 11, 27, 29, 33, 81, 83, 87, 99, 101, 243, 245, 249, 261, 263, 297, 299, 303, 729, 731, 735, 747, 749, 783, 785, 789, 891, 893, 897, 909, 911, 2187, 2189, 2193, 2205, 2207, 2241, 2243, 2247, 2349, 2351, 2355, 2367, 2369, 2673, 2675, 2679, 2691
Offset: 0

Views

Author

Clark Kimberling, Mar 05 2001

Keywords

Comments

The numbers of the form 9x+1 occupy the same positions in S that 1 occupies in the infinite Fibonacci word (A003849).

Crossrefs

A336231 Integers whose binary digit expansion has an even number of 0’s between any two consecutive 1’s.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 15, 16, 18, 19, 24, 25, 28, 30, 31, 32, 33, 36, 38, 39, 48, 50, 51, 56, 57, 60, 62, 63, 64, 66, 67, 72, 73, 76, 78, 79, 96, 97, 100, 102, 103, 112, 114, 115, 120, 121, 124, 126, 127, 128, 129, 132, 134, 135, 144, 146, 147, 152
Offset: 1

Views

Author

Michel Marcus, Jul 13 2020

Keywords

Comments

If m is a term then 2*m is a term too.
If m is an odd term and k is odd then 2^k*m+1 is a term. - Robert Israel, Jul 16 2020

Examples

			9 is 1001 in binary, with 2 (an even number) consecutive zeros, so 9 is a term.
		

Crossrefs

Programs

  • Maple
    B[1]:= {1}: S[0]:= {0}: S[1]:= {1}: count:= 2:
    for d from 2 while count < 200 do
      B[d]:= map(op, {seq(map(t -> t*2^k+1, B[d-k]), k=1..d-1,2)});
      S[d]:= B[d] union map(`*`, S[d-1], 2);
      count:= count+nops(S[d]);
    od:
    [seq(op(sort(convert(S[t], list))), t=0..d-1)]; # Robert Israel, Jul 16 2020
  • PARI
    isok(n) = {my(vpos = select(x->(x==1), binary(n), 1)); for (i=1, #vpos-1, if ((vpos[i+1]-vpos[i]-1) % 2, return (0));); return(1);}

A383668 Numbers whose binary representation has a positive number of 0s, all with even runlength.

Original entry on oeis.org

4, 9, 12, 16, 19, 25, 28, 33, 36, 39, 48, 51, 57, 60, 64, 67, 73, 76, 79, 97, 100, 103, 112, 115, 121, 124, 129, 132, 135, 144, 147, 153, 156, 159, 192, 195, 201, 204, 207, 225, 228, 231, 240, 243, 249, 252, 256, 259, 265, 268, 271, 289, 292, 295, 304, 307
Offset: 1

Views

Author

Clark Kimberling, May 15 2025

Keywords

Comments

This is a subsequence of A060142.

Examples

			The binary representation 19 is 10011, so 19 is in the sequence.
		

Crossrefs

Programs

  • Maple
    with(priqueue):
    R:= NULL: count:= 0:
    q:= 1:
    initialize(pq);
    insert([-1],pq);
    while count < 100 do
      t:= op(extract(pq));
      if t = -q then q:= 2*q+1
      else R:= R,-t; count:= count+1;
      fi;
      insert([2*t-1],pq);
      insert([4*t],pq);
    od:
    R; # Robert Israel, Jun 16 2025
  • Mathematica
    Map[#[[1]] &, Cases[Map[{#, # =!= {} && Apply[And, EvenQ[StringLength[#]]] &[StringCases[IntegerString[#, 2], "0" ..]]} &, Range[1000]], {, True}]] (* _Peter J. C. Moses, Apr 23 2025 *)

A383669 Numbers whose binary representation has a positive number of 0s, all with odd runlength.

Original entry on oeis.org

2, 5, 6, 8, 10, 11, 13, 14, 17, 21, 22, 23, 24, 26, 27, 29, 30, 32, 34, 35, 40, 42, 43, 45, 46, 47, 49, 53, 54, 55, 56, 58, 59, 61, 62, 65, 69, 70, 71, 81, 85, 86, 87, 88, 90, 91, 93, 94, 95, 96, 98, 99, 104, 106, 107, 109, 110, 111, 113, 117, 118, 119, 120
Offset: 1

Views

Author

Clark Kimberling, May 15 2025

Keywords

Examples

			The binary representation 40 is 101000, so 40 is in the sequence.
		

Crossrefs

Programs

  • Maple
    with(priqueue):
    R:= NULL: count:= 0:
    q:= 1:
    initialize(pq);
    insert([-1],pq);
    while count < 100 do
      t:= op(extract(pq));
      if t = -q then q:= 2*q+1
      else R:= R,-t; count:= count+1;
      fi;
      insert([2*t-1],pq);
      if t::odd then insert([2*t],pq)
      else insert([4*t],pq)
      fi;
    od:
    R; # Robert Israel, Jun 16 2025
  • Mathematica
    Map[#[[1]] &, Cases[Map[{#, # =!= {} && Apply[And, OddQ[StringLength[#]]] &[StringCases[IntegerString[#, 2], "0" ..]]} &, Range[400]], {, True}]] (* _Peter J. C. Moses, Apr 23 2025 *)
  • Python
    def ok(n): return n&(n+1) > 0 and all(run == '' or len(run) % 2 for run in bin(n)[2:].split('1'))
    print([n for n in range(121) if ok(n)]) # David Radcliffe, Jun 16 2025

A356737 Number of integer partitions of n into odd parts covering an interval of odd numbers.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 4, 4, 6, 6, 7, 8, 9, 10, 13, 13, 15, 17, 19, 21, 25, 26, 29, 33, 37, 40, 46, 49, 54, 61, 66, 72, 81, 87, 97, 106, 115, 125, 139, 150, 163, 179, 193, 210, 232, 248, 269, 293, 317, 343, 373, 401, 433, 470, 507, 545, 590, 633, 682, 737, 790
Offset: 0

Views

Author

Gus Wiseman, Sep 03 2022

Keywords

Examples

			The a(1) = 1 through a(9) = 6 partitions:
  1  11  3    31    5      33      7        53        9
         111  1111  311    3111    331      3311      333
                    11111  111111  31111    311111    531
                                   1111111  11111111  33111
                                                      3111111
                                                      111111111
		

Crossrefs

The strict case is A034178, for compositions A332032.
The initial case is A053251, ranked by A356232 and A356603.
The initial case for compositions is A356604.
The version for compositions is A356605, ranked by A060142 /\ A356841.
A000041 counts partitions, compositions A011782.
A066208 lists numbers with all odd prime indices, counted by A000009.
A073491 lists gapless numbers, initial A055932.

Programs

  • Mathematica
    nogapQ[m_]:=Or[m=={},Union[m]==Range[Min[m],Max[m]]];
    Table[Length[Select[IntegerPartitions[n],And@@OddQ/@#&&nogapQ[(#+1)/2]&]],{n,0,30}]

A307096 Positive integers m such that for any positive integer k the last k bits of the binary expansion of m is not a multiple of 3.

Original entry on oeis.org

1, 5, 13, 17, 29, 37, 49, 61, 65, 77, 101, 113, 125, 133, 145, 157, 193, 205, 229, 241, 253, 257, 269, 293, 305, 317, 389, 401, 413, 449, 461, 485, 497, 509, 517, 529, 541, 577, 589, 613, 625, 637, 769, 781, 805, 817, 829, 901, 913, 925, 961, 973, 997, 1009
Offset: 1

Views

Author

John Rickert, Mar 24 2019

Keywords

Comments

The number of terms less than 2^n is the n-th Fibonacci number F(n), A000045.
The number of terms between 2^(n-1) and 2^n in the sequence is the Fibonacci number F(n-2), A000045.
If 2^(n-1) <= x < 2^n, then x is in the sequence if and only if x is not divisible by 3 and x - 2^(n-1) is in the sequence. - Robert Israel, Apr 25 2019

Examples

			29 is 11101_2 and none of 11101_2, 1101_2, 101_2, 1_2 are divisible by 3.
		

Crossrefs

Programs

  • Maple
    f := n-> if(n != 0, add(2^(k-1)*`if`((n mod 2^k) mod 3 = 0, 1, 0), k = 1 .. ceil(log(n)/log(2))), 0);
    ker := []; for n from 1 to 1024 do if f(n) = 0 then ker := [op(ker), n] end if end do; ker;
    # Alternative:
    A1:= {1}: A2:= {}:
    for d from 1 to 12 do
      if d::odd then A1:= A1 union map(`+`,A2,2^d)
      else A2:= A2 union map(`+`,A1,2^d)
      fi
    od:
    sort(convert(A1 union A2,list)); # Robert Israel, Apr 25 2019
  • Mathematica
    Select[Range[10^3], Function[s, NoneTrue[Array[FromDigits[Take[s, -#], 2] &, Length@ s], Mod[#, 3] == 0 &]]@ IntegerDigits[#, 2] &] (* Michael De Vlieger, Mar 24 2019 *)
  • PARI
    isok(n) = {if (n % 3, my(b=binary(n)); for (k=1, #b-1, b[k] = 0; if ((fromdigits(b, 2) % 3) == 0, return (0));); return (1);); return (0);} \\ Michel Marcus, Apr 24 2019

Formula

(a(n)+1)/2 = A219608(n), the n-th odd term in A060142.
Previous Showing 11-20 of 21 results. Next