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-10 of 20 results. Next

A071364 Smallest number with same sequence of exponents in canonical prime factorization as n.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 6, 2, 12, 2, 6, 6, 16, 2, 18, 2, 12, 6, 6, 2, 24, 4, 6, 8, 12, 2, 30, 2, 32, 6, 6, 6, 36, 2, 6, 6, 24, 2, 30, 2, 12, 12, 6, 2, 48, 4, 18, 6, 12, 2, 54, 6, 24, 6, 6, 2, 60, 2, 6, 12, 64, 6, 30, 2, 12, 6, 30, 2, 72, 2, 6, 18, 12, 6, 30, 2, 48, 16, 6, 2, 60, 6, 6, 6, 24
Offset: 1

Views

Author

Reinhard Zumkeller, May 21 2002

Keywords

Comments

A046523(a(n))=A046523(n); A046523(n)<=a(n)<=n; A001221(a(n))=A001221(n), A001222(a(n))=A001222(n); A020639(a(n))=2, A006530(a(n))=A000040(A001221(n))<=A006530(n); A000005(a(n))=A000005(n);
a(a(n))=a(n); a(n)=2^k iff n=p^k, p prime, k>0 (A000961); if n>1 is not a prime power, then a(n) mod 6 = 0; range of values = A055932, as distinct prime factors of a(n) are consecutive: a(n)=n iff n=A055932(k) for some k;
a(A003586(n))=A003586(n).

Examples

			a(105875) = a(5*5*5*7*11*11) = 2*2*2*3*5*5 = 600.
		

Crossrefs

Cf. A000040.
The range is A055932.
The reversed version is A331580.
Unsorted prime signature is A124010.
Numbers whose prime signature is aperiodic are A329139.

Programs

  • Haskell
    a071364 = product . zipWith (^) a000040_list . a124010_row
    -- Reinhard Zumkeller, Feb 19 2012
    
  • Mathematica
    Table[ e = Last /@ FactorInteger[n]; Product[Prime[i]^e[[i]], {i, Length[e]}], {n, 88}] (* Ray Chandler, Sep 23 2005 *)
  • PARI
    a(n) = f = factor(n); for (i=1, #f~, f[i,1] = prime(i)); factorback(f); \\ Michel Marcus, Jun 13 2014
    
  • Python
    from math import prod
    from sympy import prime, factorint
    def A071364(n): return prod(prime(i+1)**p[1] for i,p in enumerate(sorted(factorint(n).items()))) # Chai Wah Wu, Sep 16 2022

Formula

In prime factorization of n, replace least prime by 2, next least by 3, etc.
a(n) = product(A000040(k)^A124010(k): k=1..A001221(n)). - Reinhard Zumkeller, Apr 27 2013

Extensions

Extended by Ray Chandler, Sep 23 2005

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

A329131 Numbers whose prime signature is a Lyndon word.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 18, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 50, 53, 54, 59, 61, 64, 67, 71, 73, 75, 79, 81, 83, 89, 97, 98, 101, 103, 107, 108, 109, 113, 121, 125, 127, 128, 131, 137, 139, 147, 149, 150, 151, 157, 162, 163, 167
Offset: 1

Views

Author

Gus Wiseman, Nov 06 2019

Keywords

Comments

First differs from A133811 in having 50.
A Lyndon word is a finite sequence that is lexicographically strictly less than all of its cyclic rotations.
A number's prime signature is the sequence of positive exponents in its prime factorization.

Examples

			The prime signature of 30870 is (1,2,1,3), which is a Lyndon word, so 30870 is in the sequence.
The sequence of terms together with their prime indices begins:
    2: {1}
    3: {2}
    4: {1,1}
    5: {3}
    7: {4}
    8: {1,1,1}
    9: {2,2}
   11: {5}
   13: {6}
   16: {1,1,1,1}
   17: {7}
   18: {1,2,2}
   19: {8}
   23: {9}
   25: {3,3}
   27: {2,2,2}
   29: {10}
   31: {11}
   32: {1,1,1,1,1}
		

Crossrefs

Numbers whose reversed binary expansion is Lyndon are A328596.
Numbers whose prime signature is a necklace are A329138.
Numbers whose prime signature is aperiodic are A329139.
Lyndon compositions are A059966.
Prime signature is A124010.

Programs

  • Mathematica
    lynQ[q_]:=Array[Union[{q,RotateRight[q,#]}]=={q,RotateRight[q,#]}&,Length[q]-1,1,And];
    Select[Range[2,100],lynQ[Last/@FactorInteger[#]]&]

Formula

Intersection of A329138 and A329139.

A333632 Rotational period of the k-th composition in standard order; a(0) = 0.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 12 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. 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 a(299) = 5 rotations:
  (1,1,3,2,2)
  (1,3,2,2,1)
  (3,2,2,1,1)
  (2,2,1,1,3)
  (2,1,1,3,2)
The a(9933) = 4 rotations:
  (1,2,1,3,1,2,1,3)
  (1,3,1,2,1,3,1,2)
  (2,1,3,1,2,1,3,1)
  (3,1,2,1,3,1,2,1)
		

Crossrefs

Aperiodic compositions are counted by A000740.
Aperiodic binary words are counted by A027375.
The orderless period of prime indices is A052409.
Numbers whose binary expansion is periodic are A121016.
Periodic compositions are counted by A178472.
The version for binary expansion is A302291.
Numbers whose prime signature is aperiodic are A329139.
Compositions by number of distinct rotations are A333941.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Necklaces are A065609.
- Sum is A070939.
- Equal runs are counted by A124767.
- Rotational symmetries are counted by A138904.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Lyndon compositions are A275692.
- Co-Lyndon compositions are A326774.
- Aperiodic compositions are A328594.
- Rotational period is A333632 (this sequence).
- Co-necklaces are A333764.
- Reversed necklaces are A333943.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Length[Union[Array[RotateRight[stc[n],#]&,DigitCount[n,2,1]]]],{n,0,100}]

Formula

a(n) = A000120(n)/A138904(n) = A302291(n) - A023416(n)/A138904(n).

A329138 Numbers whose prime signature is a necklace.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 46, 47, 49, 50, 51, 53, 54, 55, 57, 58, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 81, 82, 83
Offset: 1

Views

Author

Gus Wiseman, Nov 09 2019

Keywords

Comments

First differs from A304678 in having 1350 = 2^1 * 3^3 * 5^2. First differs from A316529 in having 150 = 2^1 * 3^1 * 5^2.
A number's prime signature (A124010) is the sequence of positive exponents in its prime factorization.
A necklace is a finite sequence that is lexicographically minimal among all of its cyclic rotations.

Examples

			The sequence of terms together with their prime signatures begins:
   2: (1)
   3: (1)
   4: (2)
   5: (1)
   6: (1,1)
   7: (1)
   8: (3)
   9: (2)
  10: (1,1)
  11: (1)
  13: (1)
  14: (1,1)
  15: (1,1)
  16: (4)
  17: (1)
  18: (1,2)
  19: (1)
  21: (1,1)
  22: (1,1)
		

Crossrefs

Complement of A329142.
Binary necklaces are A000031.
Necklace compositions are A008965.
Numbers whose reversed binary expansion is a necklace are A328595.
Numbers whose prime signature is a Lyndon word are A329131.
Numbers whose prime signature is aperiodic are A329139.

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Select[Range[2,100],neckQ[Last/@FactorInteger[#]]&]

A329140 Numbers whose prime signature is a periodic word.

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 30, 33, 34, 35, 36, 38, 39, 42, 46, 51, 55, 57, 58, 62, 65, 66, 69, 70, 74, 77, 78, 82, 85, 86, 87, 91, 93, 94, 95, 100, 102, 105, 106, 110, 111, 114, 115, 118, 119, 122, 123, 129, 130, 133, 134, 138, 141, 142, 143, 145, 146, 154
Offset: 1

Views

Author

Gus Wiseman, Nov 09 2019

Keywords

Comments

First differs from A182853 in having 2100 = 2^2 * 3^1 * 5^2 * 7^1.
A number's prime signature (A124010) is the sequence of positive exponents in its prime factorization.
A sequence is aperiodic if its cyclic rotations are all different.

Examples

			The sequence of terms together with their prime signatures begins:
   6: (1,1)
  10: (1,1)
  14: (1,1)
  15: (1,1)
  21: (1,1)
  22: (1,1)
  26: (1,1)
  30: (1,1,1)
  33: (1,1)
  34: (1,1)
  35: (1,1)
  36: (2,2)
  38: (1,1)
  39: (1,1)
  42: (1,1,1)
  46: (1,1)
  51: (1,1)
  55: (1,1)
  57: (1,1)
  58: (1,1)
		

Crossrefs

Complement of A329139.
Periodic compositions are A178472.
Periodic binary words are A152061.
Numbers whose binary expansion is periodic are A121016.
Numbers whose prime signature is a Lyndon word are A329131.
Numbers whose prime signature is a necklace are A329138.

Programs

  • Mathematica
    aperQ[q_]:=Array[RotateRight[q,#1]&,Length[q],1,UnsameQ];
    Select[Range[100],!aperQ[Last/@FactorInteger[#]]&]

A302291 a(n) is the period of the binary expansion of n.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Apr 04 2018

Keywords

Comments

Zero is assumed to be represented as 0; otherwise, leading zeros are ignored.
See A302295 for the variant where leading zeros are allowed.

Examples

			The first terms, alongside the binary expansion of n with periodic part in parentheses, are:
  n  a(n)    bin(n)
  -- ----    ------
   0    1    (0)
   1    1    (1)
   2    2    (10)
   3    1    (1)(1)
   4    3    (100)
   5    3    (101)
   6    3    (110)
   7    1    (1)(1)(1)
   8    4    (1000)
   9    4    (1001)
  10    2    (10)(10)
  11    4    (1011)
  12    4    (1100)
  13    4    (1101)
  14    4    (1110)
  15    1    (1)(1)(1)(1)
  16    5    (10000)
  17    5    (10001)
  18    5    (10010)
  19    5    (10011)
  20    5    (10100)
		

Crossrefs

Aperiodic compositions are counted by A000740.
Aperiodic binary words are counted by A027375.
The orderless period of prime indices is A052409.
Numbers whose binary expansion is periodic are A121016.
Periodic compositions are counted by A178472.
Numbers whose prime signature is aperiodic are A329139.
Compositions by number of distinct rotations are A333941.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Necklaces are A065609.
- Sum is A070939.
- Runs are counted by A124767.
- Rotational symmetries are counted by A138904.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Lyndon compositions are A275692.
- Co-Lyndon compositions are A326774.
- Aperiodic compositions are A328594.
- Rotational period is A333632.
- Co-necklaces are A333764.
- Reversed necklaces are A333943.

Programs

  • Mathematica
    Table[If[n==0,1,Length[Union[Array[RotateRight[IntegerDigits[n,2],#]&,IntegerLength[n,2]]]]],{n,0,50}] (* Gus Wiseman, Apr 19 2020 *)
  • PARI
    a(n) = my (l=max(1, #binary(n))); fordiv (l, w, if (#Set(digits(n, 2^w))<=1, return (w)))

Formula

a(n) = A070939(n) / A138904(n).
a(2^n) = n + 1 for any n >= 0.
a(2^n - 1) = 1 for any n >= 0.
a(A020330(n)) = a(n) for any n > 0.

A329134 Numbers whose differences of prime indices are a periodic word.

Original entry on oeis.org

8, 16, 27, 30, 32, 64, 81, 105, 110, 125, 128, 180, 210, 238, 243, 256, 273, 343, 385, 450, 506, 512, 625, 627, 729, 806, 935, 1001, 1024, 1080, 1100, 1131, 1155, 1331, 1394, 1495, 1575, 1729, 1786, 1870, 1887, 2048, 2187, 2197, 2310, 2401, 2431, 2451, 2635
Offset: 1

Views

Author

Gus Wiseman, Nov 09 2019

Keywords

Comments

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.
A sequence is periodic if its cyclic rotations are not all different.

Examples

			The sequence of terms together with their differences of prime indices begins:
     8: (0,0)
    16: (0,0,0)
    27: (0,0)
    30: (1,1)
    32: (0,0,0,0)
    64: (0,0,0,0,0)
    81: (0,0,0)
   105: (1,1)
   110: (2,2)
   125: (0,0)
   128: (0,0,0,0,0,0)
   180: (0,1,0,1)
   210: (1,1,1)
   238: (3,3)
   243: (0,0,0,0)
   256: (0,0,0,0,0,0,0)
   273: (2,2)
   343: (0,0)
   385: (1,1)
   450: (1,0,1,0)
		

Crossrefs

Complement of A329135.
These are the Heinz numbers of the partitions counted by A329144.
Periodic binary words are A152061.
Periodic compositions are A178472.
Numbers whose binary expansion is periodic are A121016.
Numbers whose prime signature is periodic are A329140.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    aperQ[q_]:=Array[RotateRight[q,#1]&,Length[q],1,UnsameQ];
    Select[Range[10000],!aperQ[Differences[primeMS[#]]]&]

A329135 Numbers whose differences of prime indices are an aperiodic word.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73
Offset: 1

Views

Author

Gus Wiseman, Nov 09 2019

Keywords

Comments

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.
A sequence is aperiodic if its cyclic rotations are all different.

Examples

			The sequence of terms together with their differences of prime indices begins:
    1: ()
    2: ()
    3: ()
    4: (0)
    5: ()
    6: (1)
    7: ()
    9: (0)
   10: (2)
   11: ()
   12: (0,1)
   13: ()
   14: (3)
   15: (1)
   17: ()
   18: (1,0)
   19: ()
   20: (0,2)
   21: (2)
   22: (4)
		

Crossrefs

Complement of A329134.
These are the Heinz numbers of the partitions counted by A329137.
Aperiodic compositions are A000740.
Aperiodic binary words are A027375.
Numbers whose binary expansion is aperiodic are A328594.
Numbers whose prime signature is aperiodic are A329139.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    aperQ[q_]:=Array[RotateRight[q,#1]&,Length[q],1,UnsameQ];
    Select[Range[100],aperQ[Differences[primeMS[#]]]&]

A329142 Numbers whose prime signature is not a necklace.

Original entry on oeis.org

1, 12, 20, 24, 28, 40, 44, 45, 48, 52, 56, 60, 63, 68, 72, 76, 80, 84, 88, 90, 92, 96, 99, 104, 112, 116, 117, 120, 124, 126, 132, 135, 136, 140, 144, 148, 152, 153, 156, 160, 164, 168, 171, 172, 175, 176, 180, 184, 188, 189, 192, 198, 200, 204, 207, 208, 212
Offset: 1

Views

Author

Gus Wiseman, Nov 09 2019

Keywords

Comments

After a(1) = 1, first differs from A112769 in lacking 1350.
A number's prime signature (A124010) is the sequence of positive exponents in its prime factorization.
A necklace is a finite sequence that is lexicographically minimal among all of its cyclic rotations.

Examples

			The sequence of terms together with their prime signatures begins:
   1: ()
  12: (2,1)
  20: (2,1)
  24: (3,1)
  28: (2,1)
  40: (3,1)
  44: (2,1)
  45: (2,1)
  48: (4,1)
  52: (2,1)
  56: (3,1)
  60: (2,1,1)
  63: (2,1)
  68: (2,1)
  72: (3,2)
  76: (2,1)
  80: (4,1)
  84: (2,1,1)
  88: (3,1)
  90: (1,2,1)
  92: (2,1)
		

Crossrefs

Complement of A329138.
Binary necklaces are A000031.
Non-necklace compositions are A329145.
Numbers whose reversed binary expansion is a necklace are A328595.
Numbers whose prime signature is a Lyndon word are A329131.
Numbers whose prime signature is periodic are A329140.

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Select[Range[100],#==1||!neckQ[Last/@FactorInteger[#]]&]
Showing 1-10 of 20 results. Next