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

A333221 Irregular triangle read by rows where row n lists the set of STC-numbers of permutations of the prime indices of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 7, 10, 9, 12, 16, 11, 13, 14, 32, 17, 24, 18, 20, 15, 64, 21, 22, 26, 128, 19, 25, 28, 34, 40, 33, 48, 256, 23, 27, 29, 30, 36, 65, 96, 42, 35, 49, 56, 512, 37, 38, 41, 44, 50, 52, 1024, 31, 66, 80, 129, 192, 68, 72, 43, 45, 46, 53, 54, 58
Offset: 1

Views

Author

Gus Wiseman, Mar 17 2020

Keywords

Comments

This is a permutation of the nonnegative integers.
The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. We define the composition with STC-number k to be the k-th composition in standard order.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			Reading by columns gives:
  0  1  2  3  4  5  8  7  10  9   16  11  32  17  18  15  64  21  128  19
                 6            12      13      24  20          22       25
                                      14                      26       28
  34  33  256  23  36  65  42  35  512  37  1024  31  66  129  68  43
  40  48       27      96      49       38            80  192  72  45
               29              56       41                         46
               30                       44                         53
                                        50                         54
                                        52                         58
The sequence of terms together with the corresponding compositions begins:
     0: ()           24: (1,4)          27: (1,2,1,1)
     1: (1)          18: (3,2)          29: (1,1,2,1)
     2: (2)          20: (2,3)          30: (1,1,1,2)
     3: (1,1)        15: (1,1,1,1)      36: (3,3)
     4: (3)          64: (7)            65: (6,1)
     5: (2,1)        21: (2,2,1)        96: (1,6)
     6: (1,2)        22: (2,1,2)        42: (2,2,2)
     8: (4)          26: (1,2,2)        35: (4,1,1)
     7: (1,1,1)     128: (8)            49: (1,4,1)
    10: (2,2)        19: (3,1,1)        56: (1,1,4)
     9: (3,1)        25: (1,3,1)       512: (10)
    12: (1,3)        28: (1,1,3)        37: (3,2,1)
    16: (5)          34: (4,2)          38: (3,1,2)
    11: (2,1,1)      40: (2,4)          41: (2,3,1)
    13: (1,2,1)      33: (5,1)          44: (2,1,3)
    14: (1,1,2)      48: (1,5)          50: (1,3,2)
    32: (6)         256: (9)            52: (1,2,3)
    17: (4,1)        23: (2,1,1,1)    1024: (11)
		

Crossrefs

Row lengths are A008480.
Column k = 1 is A233249.
Column k = -1 is A333220.
A related triangle for partitions is A215366.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    fbi[q_]:=If[q=={},0,Total[2^q]/2];
    Table[Sort[fbi/@Accumulate/@Permutations[primeMS[n]]],{n,30}]

A057335 a(0) = 1, and for n > 0, a(n) = A000040(A000120(n)) * a(floor(n/2)); essentially sequence A055932 generated using A000120, hence sorted by number of factors.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 18, 30, 16, 24, 36, 60, 54, 90, 150, 210, 32, 48, 72, 120, 108, 180, 300, 420, 162, 270, 450, 630, 750, 1050, 1470, 2310, 64, 96, 144, 240, 216, 360, 600, 840, 324, 540, 900, 1260, 1500, 2100, 2940, 4620, 486, 810, 1350, 1890, 2250, 3150, 4410
Offset: 0

Views

Author

Alford Arnold, Aug 27 2000

Keywords

Comments

Note that for n>0 the prime divisors of a(n) are consecutive primes starting with 2. All of the least prime signatures (A025487) are included; with the other values forming A056808.
Using the formula, terms of b(n)= a(n)/A057334(n) are: 1, 1, 2, 2, 4, 4, 6, 6, 8, ..., indeed a(n) repeated. - Michel Marcus, Feb 09 2014
a(n) is the unique normal number whose unsorted prime signature is the k-th composition in standard order (graded reverse-lexicographic). This composition (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. A number is normal if its prime indices cover an initial interval of positive integers. Unsorted prime signature is the sequence of exponents in a number's prime factorization. - Gus Wiseman, Apr 19 2020

Examples

			From _Gus Wiseman_, Apr 19 2020: (Start)
The sequence of terms together with their prime indices begins:
      1: {}
      2: {1}
      4: {1,1}
      6: {1,2}
      8: {1,1,1}
     12: {1,1,2}
     18: {1,2,2}
     30: {1,2,3}
     16: {1,1,1,1}
     24: {1,1,1,2}
     36: {1,1,2,2}
     60: {1,1,2,3}
     54: {1,2,2,2}
     90: {1,2,2,3}
    150: {1,2,3,3}
    210: {1,2,3,4}
     32: {1,1,1,1,1}
     48: {1,1,1,1,2}
For example, the 27th composition in standard order is (1,2,1,1), and the normal number with prime signature (1,2,1,1) is 630 = 2*3*3*5*7, so a(27) = 630.
(End)
		

Crossrefs

Cf. A324939.
Unsorted prime signature is A124010.
Numbers whose prime signature is aperiodic are A329139.
The reversed version is A334031.
A partial inverse is A334032.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Aperiodic compositions are A328594.
- Normal compositions are A333217.
- Permutations are A333218.
- Heinz number is A333219.
Related to A019565 via A122111 and to A000079 via A336321.

Programs

  • Mathematica
    Table[Times @@ Map[If[# == 0, 1, Prime@ #] &, Accumulate@ IntegerDigits[n, 2]], {n, 0, 54}] (* Michael De Vlieger, May 23 2017 *)
  • PARI
    mg(n) = if (n==0, 1, prime(hammingweight(n))); \\ A057334
    lista(nn) = {my(v = vector(nn)); v[1] = 1; for (i=2, nn, v[i] = mg(i-1)*v[(i+1)\2];); v;} \\ Michel Marcus, Feb 09 2014
    
  • PARI
    A057335(n) = if(0==n,1,prime(hammingweight(n))*A057335(n\2)); \\ Antti Karttunen, Jul 20 2020

Formula

a(n) = A057334(n) * a (repeated).
A334032(a(n)) = n; a(A334032(n)) = A071364(n). - Gus Wiseman, Apr 19 2020
a(n) = A122111(A019565(n)); A019565(n) = A122111(a(n)). - Peter Munn, Jul 18 2020
a(n) = A336321(2^n). - Peter Munn, Mar 04 2022
Sum_{n>=0} 1/a(n) = Sum_{n>=0} 1/A005867(n) = 2.648101... (A345974). - Amiram Eldar, Jun 26 2025

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 29 2003
New primary name from Antti Karttunen, Jul 20 2020

A333220 The number k such that the k-th composition in standard order consists of the prime indices of n in weakly increasing order.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 7, 10, 12, 16, 14, 32, 24, 20, 15, 64, 26, 128, 28, 40, 48, 256, 30, 36, 96, 42, 56, 512, 52, 1024, 31, 80, 192, 72, 58, 2048, 384, 160, 60, 4096, 104, 8192, 112, 84, 768, 16384, 62, 136, 100, 320, 224, 32768, 106, 144, 120, 640, 1536
Offset: 1

Views

Author

Gus Wiseman, Mar 17 2020

Keywords

Comments

The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of terms together with the corresponding compositions begins:
      0: ()             128: (8)             2048: (12)
      1: (1)             28: (1,1,3)          384: (1,8)
      2: (2)             40: (2,4)            160: (2,6)
      3: (1,1)           48: (1,5)             60: (1,1,1,3)
      4: (3)            256: (9)             4096: (13)
      6: (1,2)           30: (1,1,1,2)        104: (1,2,4)
      8: (4)             36: (3,3)           8192: (14)
      7: (1,1,1)         96: (1,6)            112: (1,1,5)
     10: (2,2)           42: (2,2,2)           84: (2,2,3)
     12: (1,3)           56: (1,1,4)          768: (1,9)
     16: (5)            512: (10)           16384: (15)
     14: (1,1,2)         52: (1,2,3)           62: (1,1,1,1,2)
     32: (6)           1024: (11)             136: (4,4)
     24: (1,4)           31: (1,1,1,1,1)      100: (1,3,3)
     20: (2,3)           80: (2,5)            320: (2,7)
     15: (1,1,1,1)      192: (1,7)            224: (1,1,6)
     64: (7)             72: (3,4)          32768: (16)
     26: (1,2,2)         58: (1,1,2,2)        106: (1,2,2,2)
		

Crossrefs

The version with prime indices taken in weakly decreasing order is A233249.
A partial inverse is A333219.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    fbi[q_]:=If[q=={},0,Total[2^q]/2];
    Table[fbi[Accumulate[Reverse[primeMS[n]]]],{n,100}]

Formula

A000120(a(n)) = A056239(n).

A124760 Number of rises for compositions in standard order.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 2
Offset: 0

Views

Author

Keywords

Comments

The standard order of compositions is given by A066099.
A114994 seems to give the positions of zeros. - Antti Karttunen, Jul 09 2017
A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. a(n) is one fewer than the number of maximal weakly decreasing runs in this composition. Alternatively, a(n) is the number of strict ascents in the same composition. For example, the weakly decreasing runs of the 1234567th composition are ((3,2,1),(2,2,1),(2),(5,1,1,1)), so a(1234567) = 4 - 1 = 3. The 3 strict ascents together with the weak descents are: 3 >= 2 >= 1 < 2 >= 2 >= 1 < 2 < 5 >= 1 >= 1 >= 1. - Gus Wiseman, Apr 08 2020

Examples

			Composition number 11 is 2,1,1; 2>=1>=1, so a(11) = 0.
The table starts:
  0
  0
  0 0
  0 0 1 0
  0 0 0 0 1 1 1 0
  0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0
  0 0 0 0 0 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 0
		

Crossrefs

Cf. A066099, A124761, A124762, A124763, A124764, A011782 (row lengths), A045883 (row sums), A233249, A333213, A333380.
Compositions of n with k strict ascents are A238343.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Weakly decreasing compositions are A114994.
- Weakly decreasing runs are counted by A124765.
- Weakly increasing runs are counted by A124766.
- Equal runs are counted by A124767.
- Strictly increasing runs are counted by A124768.
- Strictly decreasing runs are counted by A124769.
- Weakly increasing compositions are A225620.
- Reverse is A228351 (triangle).
- Strict compositions are A233564.
- Constant compositions are A272919.
- Normal compositions are A333217.
- Strictly decreasing compositions are A333255.
- Strictly increasing compositions are A333256.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.
- Anti-runs are A333489.
- Runs-resistance is A333628.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Select[Partition[stc[n],2,1],Less@@#&]],{n,0,100}] (* Gus Wiseman, Apr 08 2020 *)
  • PARI
    A066099row(n) = {my(v=vector(n), j=0, k=0); while(n>0, k++; if(n%2==1, v[j++]=k; k=0); n\=2);  vector(j, i, v[j-i+1]); } \\ Returns empty for n=0. - From code of Franklin T. Adams-Watters in A066099.
    A124760(n) = { my(v=A066099row(n), r=0); for(i=2,length(v),r += (v[i]>v[i-1])); (r); }; \\ Antti Karttunen, Jul 09 2017

Formula

For a composition b(1),...,b(k), a(n) = Sum_{i = 1 .. k-1} [b(i+1) > b(i)], where [ ] is Iverson bracket, giving in this case 1 only if b(i+1) > b(i), and 0 otherwise. - Formula clarified by Antti Karttunen, Jul 10 2017
For n > 0, a(n) = A124765(n) - 1. - Gus Wiseman, Apr 08 2020

A335405 Number of integer compositions of n with product n.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 7, 1, 23, 11, 21, 1, 241, 1, 43, 73, 1092, 1, 1041, 1, 1339, 157, 111, 1, 23023, 137, 157, 1603, 3945, 1, 11599, 1, 153446, 421, 273, 601, 204586, 1, 343, 601, 206351, 1, 34789, 1, 16273, 25179, 507, 1, 5992730, 667, 33913, 1057, 27291, 1
Offset: 0

Views

Author

Gus Wiseman, Jun 06 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.

Examples

			The compositions for n = 1, 4, 6, 8, 9, 10:
  (1)  (4)   (6)    (8)      (9)      (10)
       (22)  (123)  (1124)   (11133)  (11125)
             (132)  (1142)   (11313)  (11152)
             (213)  (1214)   (11331)  (11215)
             (231)  (1241)   (13113)  (11251)
             (312)  (1412)   (13131)  (11512)
             (321)  (1421)   (13311)  (11521)
                    (2114)   (31113)  (12115)
                    (2141)   (31131)  (12151)
                    (2411)   (31311)  (12511)
                    (4112)   (33111)  (15112)
                    (4121)            (15121)
                    (4211)            (15211)
                    (11222)           (21115)
                    (12122)           (21151)
                    (12212)           (21511)
                    (12221)           (25111)
                    (21122)           (51112)
                    (21212)           (51121)
                    (21221)           (51211)
                    (22112)           (52111)
                    (22121)
                    (22211)
		

Crossrefs

The case of partitions is A001055.
Compositions are counted by A011782.
These compositions are ranked by A335404.

Programs

  • Mathematica
    Table[Length[Join@@Permutations/@Select[IntegerPartitions[n],Times@@#==n&]],{n,0,30}]

A124764 Number of non-falls (levels or rises) for compositions in standard order.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 1, 1, 1, 2, 3, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 2, 3, 4, 0, 0, 0, 1, 1, 0, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 4, 5, 0, 0, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 2, 3, 1, 1, 2, 2, 2, 2, 3, 4, 1, 1, 1, 2, 2, 1, 2, 3, 2
Offset: 0

Views

Author

Keywords

Comments

The standard order of compositions is given by A066099.
A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. a(n) is one fewer than the number of maximal strictly decreasing runs in this composition. Alternatively, a(n) is the number of weak ascents in the same composition. For example, the strictly decreasing runs of the 1234567th composition are ((3,2,1),(2),(2,1),(2),(5,1),(1),(1)), so a(1234567) = 7 - 1 = 6. The 6 weak ascents together with the strict descents are: 3 > 2 > 1 <= 2 <= 2 > 1 <= 2 <= 5 > 1 <= 1 <= 1. - Gus Wiseman, Apr 08 2020

Examples

			Composition number 11 is 2,1,1; 2>1<=1, so a(11) = 1.
The table starts:
  0
  0
  0 1
  0 0 1 2
  0 0 1 1 1 1 2 3
  0 0 0 1 1 1 1 2 1 1 2 2 2 2 3 4
  0 0 0 1 1 0 1 2 1 1 2 2 1 1 2 3 1 1 1 2 2 2 2 3 2 2 3 3 3 3 4 5
		

Crossrefs

Cf. A066099, A124760, A124761, A124762, A124763, A011782 (row lengths), A045883 (row sums), A233249, A238343.
Compositions of n with k weak ascents are A333213.
Positions of zeros are A333256.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Partial sums from the right are A048793 (triangle).
- Sum is A070939.
- Weakly decreasing compositions are A114994.
- Weakly decreasing runs are counted by A124765.
- Weakly increasing runs are counted by A124766.
- Equal runs are counted by A124767.
- Strictly increasing runs are counted by A124768.
- Strictly decreasing runs are counted by A124769.
- Reversed initial intervals A164894.
- Weakly increasing compositions are A225620.
- Reverse is A228351 (triangle).
- Strict compositions are A233564.
- Constant compositions are A272919.
- Normal compositions are A333217.
- Permutations are A333218.
- Heinz number is A333219.
- Strictly decreasing compositions are A333255.
- Strictly increasing compositions are A333256.
- Anti-runs are A333489.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Select[Partition[stc[n],2,1],LessEqual@@#&]],{n,0,100}] (* Gus Wiseman, Apr 08 2020 *)

Formula

a(n) = A124760(n) + A124762(n)
For a composition b(1),...,b(k), a(n) = Sum_{1<=i=1=b(i+1)} 1.
For n > 0, a(n) = A124769(n) - 1. - Gus Wiseman, Apr 08 2020

A335404 Numbers k such that the k-th composition in standard order (A066099) has the same product as sum.

Original entry on oeis.org

1, 2, 4, 8, 10, 16, 32, 37, 38, 41, 44, 50, 52, 64, 128, 139, 141, 142, 163, 171, 173, 174, 177, 181, 182, 184, 186, 197, 198, 209, 213, 214, 216, 218, 226, 232, 234, 256, 295, 307, 313, 316, 403, 409, 412, 457, 460, 484, 512, 535, 539, 541, 542, 647, 707, 737
Offset: 1

Views

Author

Gus Wiseman, Jun 06 2020

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The sequence together with the corresponding compositions begins:
    1: (1)
    2: (2)
    4: (3)
    8: (4)
   10: (2,2)
   16: (5)
   32: (6)
   37: (3,2,1)
   38: (3,1,2)
   41: (2,3,1)
   44: (2,1,3)
   50: (1,3,2)
   52: (1,2,3)
   64: (7)
  128: (8)
  139: (4,2,1,1)
  141: (4,1,2,1)
  142: (4,1,1,2)
  163: (2,4,1,1)
  171: (2,2,2,1,1)
		

Crossrefs

The lengths of standard compositions are given by A000120.
Sum of binary indices is A029931.
Sum of prime indices is A056239.
Sum of standard compositions is A070939.
Product of standard compositions is A124758.
Taking GCD instead of product gives A131577.
The version for prime indices is A301987.
The version for prime indices of nonprime numbers is A301988.
These compositions are counted by A335405.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],Times@@stc[#]==Plus@@stc[#]&]

Formula

A124758(a(n)) = A070939(a(n)).

A233312 Terms of A114994 which are c-equivalent to "c-squares" (A020330).

Original entry on oeis.org

0, 3, 10, 15, 36, 43, 43, 63, 136, 147, 170, 175, 147, 175, 175, 255, 528, 547, 586, 591, 586, 683, 683, 703, 547, 591, 683, 703, 591, 703, 703, 1023, 2080, 2115, 2186, 2191, 2340, 2347, 2347, 2367, 2186, 2347, 2730, 2735, 2347, 2735, 2735, 2815, 2115, 2191
Offset: 0

Views

Author

Vladimir Shevelev, Dec 07 2013

Keywords

Comments

About c-equivalent see in comment in A233249.
a(n) is even iff A171791(n+1) is odd - holds for at least the first 1028 terms. The reason, put very briefly, is that: a(n) is even if and only if n is the double of a "fibbinary number". Cf. A267508. [Jörgen Backelin, Jan 15 2016 added by Jeremy Gardiner, Jan 26 2016]

Examples

			c-square of 5 in binary is (10)(1)(10)(1)~(10)(10)(1)(1) which is 43 in decimal. So a(5)=43.
		

Crossrefs

Extensions

More terms from Peter J. C. Moses, Dec 07 2013

A331579 Position of first appearance of n in A124758 (products of compositions in standard order).

Original entry on oeis.org

1, 2, 4, 8, 16, 18, 64, 34, 36, 66, 1024, 68, 4096, 258, 132, 136, 65536, 146, 262144, 264, 516, 4098
Offset: 1

Views

Author

Gus Wiseman, Mar 20 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again.

Examples

			The list of terms together with the corresponding compositions begins:
       1: (1)
       2: (2)
       4: (3)
       8: (4)
      16: (5)
      18: (3,2)
      64: (7)
      34: (4,2)
      36: (3,3)
      66: (5,2)
    1024: (11)
      68: (4,3)
    4096: (13)
     258: (7,2)
     132: (5,3)
     136: (4,4)
   65536: (17)
     146: (3,3,2)
  262144: (19)
     264: (5,4)
		

Crossrefs

The product of prime indices is A003963.
The sum of binary indices is A029931.
The sum of prime indices is A056239.
Sums of compositions in standard order are A070939.
The product of binary indices is A096111.
All terms belong to A114994.
Products of compositions in standard order are A124758.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    q=Table[Times@@stc[n],{n,1000}];
    Table[Position[q,i][[1,1]],{i,First[Split[Union[q],#1+1==#2&]]}]

A334032 The a(n)-th composition in standard order (graded reverse-lexicographic) is the unsorted prime signature of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 5, 1, 3, 3, 8, 1, 6, 1, 5, 3, 3, 1, 9, 2, 3, 4, 5, 1, 7, 1, 16, 3, 3, 3, 10, 1, 3, 3, 9, 1, 7, 1, 5, 5, 3, 1, 17, 2, 6, 3, 5, 1, 12, 3, 9, 3, 3, 1, 11, 1, 3, 5, 32, 3, 7, 1, 5, 3, 7, 1, 18, 1, 3, 6, 5, 3, 7, 1, 17, 8, 3, 1, 11
Offset: 1

Views

Author

Gus Wiseman, Apr 17 2020

Keywords

Comments

Unsorted prime signature (A124010) is the sequence of exponents in a number's prime factorization.
The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The unsorted prime signature of 12345678 is (1,2,1,1), which is the 27th composition in standard order, so a(12345678) = 27.
		

Crossrefs

Positions of first appearances are A057335 (a partial inverse).
Least number with same prime signature is A071364.
Unsorted prime signature is A124010.
Least number with reversed prime signature is A331580.
Minimal numbers with standard reversed prime signatures are A334031.
The reversed version is A334033.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Aperiodic compositions are A328594.
- Normal compositions are A333217.
- Permutations are A333218.
- Heinz number is A333219.

Programs

  • Mathematica
    stcinv[q_]:=Total[2^Accumulate[Reverse[q]]]/2;
    Table[stcinv[Last/@If[n==1,{},FactorInteger[n]]],{n,100}]

Formula

a(A057335(n)) = n.
A057335(a(n)) = A071364(n).
a(A334031(n))= A059893(n).
A334031(a(n)) = A331580(n).
Previous Showing 11-20 of 26 results. Next