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.

Showing 1-5 of 5 results.

A124758 Product of the parts of the compositions in standard order.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 2, 1, 4, 3, 4, 2, 3, 2, 2, 1, 5, 4, 6, 3, 6, 4, 4, 2, 4, 3, 4, 2, 3, 2, 2, 1, 6, 5, 8, 4, 9, 6, 6, 3, 8, 6, 8, 4, 6, 4, 4, 2, 5, 4, 6, 3, 6, 4, 4, 2, 4, 3, 4, 2, 3, 2, 2, 1, 7, 6, 10, 5, 12, 8, 8, 4, 12, 9, 12, 6, 9, 6, 6, 3, 10, 8, 12, 6, 12, 8, 8, 4, 8, 6, 8, 4, 6, 4, 4, 2, 6, 5, 8, 4, 9, 6
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. - Gus Wiseman, Apr 03 2020

Examples

			Composition number 11 is 2,1,1; 2*1*1 = 2, so a(11) = 2.
The table starts:
  1
  1
  2 1
  3 2 2 1
  4 3 4 2 3 2 2 1
  5 4 6 3 6 4 4 2 4 3 4 2 3 2 2 1
The 146-th composition in standard order is (3,3,2), with product 18, so a(146) = 18. - _Gus Wiseman_, Apr 03 2020
		

Crossrefs

Cf. A066099, A118851, A011782 (row lengths), A001906 (row sums).
The lengths of standard compositions are given by A000120.
The version for prime indices is A003963.
The version for binary indices is A096111.
Taking the sum instead of product gives A070939.
The sum of binary indices is A029931.
The sum of prime indices is A056239.
Taking GCD instead of product gives A326674.
Positions of first appearances are A331579.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Times@@stc[n],{n,0,100}] (* Gus Wiseman, Apr 03 2020 *)

Formula

For a composition b(1),...,b(k), a(n) = Product_{i=1}^k b(i).
a(A164894(n)) = a(A246534(n)) = n!. - Gus Wiseman, Apr 03 2020
a(A233249(n)) = a(A333220(n)) = A003963(n). - Gus Wiseman, Apr 03 2020
From Mikhail Kurkov, Jul 11 2021: (Start)
Some conjectures:
a(2n+1) = a(n) for n >= 0.
a(2n) = (1 + 1/A001511(n))*a(n) = 2*a(n) + a(n - 2^f(n)) - a(2n - 2^f(n)) for n > 0 with a(0)=1 where f(n) = A007814(n).
From the 1st formula for a(2n) we get a(4n+2) = 2*a(n), a(4n) = 2*a(2n) - a(n).
Sum_{k=0..2^n - 1} a(k) = A001519(n+1) for n >= 0.
a((4^n - 1)/3) = A011782(n) for n >= 0.
a(2^m*(2^n - 1)) = m + 1 for n > 0, m >= 0. (End)

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}]

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)).

A333492 Position of first appearance of n in A271410 (LCM of binary indices).

Original entry on oeis.org

1, 2, 4, 8, 16, 6, 64, 128, 256, 18, 1024, 12, 4096, 66, 20, 32768, 65536, 258, 262144, 24, 68, 1026, 4194304, 132, 16777216, 4098, 67108864, 72, 268435456, 22, 1073741824, 2147483648, 1028, 65538, 80, 264, 68719476736, 262146, 4100, 144, 1099511627776, 70, 4398046511104
Offset: 1

Views

Author

Gus Wiseman, Mar 28 2020

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The sequence together with the corresponding binary expansions and binary indices begins:
      1:                 1 ~ {1}
      2:                10 ~ {2}
      4:               100 ~ {3}
      8:              1000 ~ {4}
     16:             10000 ~ {5}
      6:               110 ~ {2,3}
     64:           1000000 ~ {7}
    128:          10000000 ~ {8}
    256:         100000000 ~ {9}
     18:             10010 ~ {2,5}
   1024:       10000000000 ~ {11}
     12:              1100 ~ {3,4}
   4096:     1000000000000 ~ {13}
     66:           1000010 ~ {2,7}
     20:             10100 ~ {3,5}
  32768:  1000000000000000 ~ {16}
  65536: 10000000000000000 ~ {17}
    258:         100000010 ~ {2,9}
		

Crossrefs

The version for prime indices is A330225.
The version for standard compositions is A333225.
Let q(k) be the binary indices of k:
- The sum of q(k) is A029931(k).
- The elements of q(k) are row k of A048793.
- The product of q(k) is A096111(k).
- The LCM of q(k) is A271410(k).
- The GCD of q(k) is A326674(k).
GCD of prime indices is A289508.
LCM of prime indices is A290103.
LCM of standard compositions is A333226.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    q=Table[LCM@@bpe[n],{n,10000}];
    Table[Position[q,i][[1,1]],{i,First[Split[Union[q],#1+1==#2&]]}]

Extensions

Terms a(23) and beyond from Giovanni Resta, Mar 29 2020

A330225 Position of first appearance of n in A290103 = LCM of prime indices.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 35, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271
Offset: 1

Views

Author

Gus Wiseman, Mar 26 2020

Keywords

Comments

Appears to be the prime numbers (A000040) with 2 replaced by 1 and 37 replaced by 35.
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.

Crossrefs

The version for product instead of lcm is A318871
The version for standard compositions is A333225.
The version for binary indices is A333492.
Let q(k) be the prime indices of k:
- The product of q(k) is A003963(k).
- The sum of q(k) is A056239(k).
- The terms of q(k) are row k of A112798.
- The GCD of q(k) is A289508(k).
- The LCM of q(k) is A290103(k).
- The LCM of q(k) + 1 is A328219(k).

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    q=Table[If[n==1,1,LCM@@primeMS[n]],{n,100}];
    Table[Position[q,i][[1,1]],{i,First[Split[Union[q],#1+1==#2&]]}]
Showing 1-5 of 5 results.