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

A122111 Self-inverse permutation of the positive integers induced by partition enumeration in A112798 and partition conjugation.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 16, 5, 9, 12, 32, 10, 64, 24, 18, 7, 128, 15, 256, 20, 36, 48, 512, 14, 27, 96, 25, 40, 1024, 30, 2048, 11, 72, 192, 54, 21, 4096, 384, 144, 28, 8192, 60, 16384, 80, 50, 768, 32768, 22, 81, 45, 288, 160, 65536, 35, 108, 56, 576, 1536, 131072, 42
Offset: 1

Views

Author

Keywords

Comments

Factor n; replace each prime(i) with i, take the conjugate partition, replace parts i with prime(i) and multiply out.
From Antti Karttunen, May 12-19 2014: (Start)
For all n >= 1, A001222(a(n)) = A061395(n), and vice versa, A061395(a(n)) = A001222(n).
Because the partition conjugation doesn't change the partition's total sum, this permutation preserves A056239, i.e., A056239(a(n)) = A056239(n) for all n.
(Similarly, for all n, A001221(a(n)) = A001221(n), because the number of steps in the Ferrers/Young-diagram stays invariant under the conjugation. - Note added Apr 29 2022).
Because this permutation commutes with A241909, in other words, as a(A241909(n)) = A241909(a(n)) for all n, from which follows, because both permutations are self-inverse, that a(n) = A241909(a(A241909(n))), it means that this is also induced when partitions are conjugated in the partition enumeration system A241918. (Not only in A112798.)
(End)
From Antti Karttunen, Jul 31 2014: (Start)
Rows in arrays A243060 and A243070 converge towards this sequence, and also, assuming no surprises at the rate of that convergence, this sequence occurs also as the central diagonal of both.
Each even number is mapped to a unique term of A102750 and vice versa.
Conversely, each odd number (larger than 1) is mapped to a unique term of A070003, and vice versa. The permutation pair A243287-A243288 has the same property. This is also used to induce the permutations A244981-A244984.
Taking the odd bisection and dividing out the largest prime factor results in the permutation A243505.
Shares with A245613 the property that each term of A028260 is mapped to a unique term of A244990 and each term of A026424 is mapped to a unique term of A244991.
Conversely, with A245614 (the inverse of above), shares the property that each term of A244990 is mapped to a unique term of A028260 and each term of A244991 is mapped to a unique term of A026424.
(End)
The Maple program follows the steps described in the first comment. The subprogram C yields the conjugate partition of a given partition. - Emeric Deutsch, May 09 2015
The Heinz number of the partition that is conjugate to the partition with Heinz number n. The Heinz number of a partition p = [p_1, p_2, ..., p_r] is defined as Product(p_j-th prime, j=1...r). Example: a(3) = 4. Indeed, the partition with Heinz number 3 is [2]; its conjugate is [1,1] having Heinz number 4. - Emeric Deutsch, May 19 2015

Crossrefs

Cf. A088902 (fixed points).
Cf. A112798, A241918 (conjugates the partitions listed in these two tables).
Cf. A243060 and A243070. (Limit of rows in these arrays, and also their central diagonal).
Cf. A319988 (parity of this sequence for n > 1), A336124 (a(n) mod 4).
{A000027, A122111, A241909, A241916} form a 4-group.
{A000027, A122111, A153212, A242419} form also a 4-group.
Cf. also array A350066 [A(i, j) = a(a(i)*a(j))].

Programs

  • Maple
    with(numtheory): c := proc (n) local B, C: B := proc (n) local pf: pf := op(2, ifactors(n)): [seq(seq(pi(op(1, op(i, pf))), j = 1 .. op(2, op(i, pf))), i = 1 .. nops(pf))] end proc: C := proc (P) local a: a := proc (j) local c, i: c := 0; for i to nops(P) do if j <= P[i] then c := c+1 else  end if end do: c end proc: [seq(a(k), k = 1 .. max(P))] end proc: mul(ithprime(C(B(n))[q]), q = 1 .. nops(C(B(n)))) end proc: seq(c(n), n = 1 .. 59); # Emeric Deutsch, May 09 2015
    # second Maple program:
    a:= n-> (l-> mul(ithprime(add(`if`(jAlois P. Heinz, Sep 30 2017
  • Mathematica
    A122111[1] = 1; A122111[n_] := Module[{l = #, m = 0}, Times @@ Power @@@ Table[l -= m; l = DeleteCases[l, 0]; {Prime@Length@l, m = Min@l}, Length@Union@l]] &@Catenate[ConstantArray[PrimePi[#1], #2] & @@@ FactorInteger@n]; Array[A122111, 60] (* JungHwan Min, Aug 22 2016 *)
    a[n_] := Function[l, Product[Prime[Sum[If[jJean-François Alcover, Sep 23 2020, after Alois P. Heinz *)
  • PARI
    A122111(n) = if(1==n,n,my(f=factor(n), es=Vecrev(f[,2]),is=concat(apply(primepi,Vecrev(f[,1])),[0]),pri=0,m=1); for(i=1, #es, pri += es[i]; m *= prime(pri)^(is[i]-is[1+i])); (m)); \\ Antti Karttunen, Jul 20 2020
    
  • Python
    from sympy import factorint, prevprime, prime, primefactors
    from operator import mul
    def a001222(n): return 0 if n==1 else a001222(n/primefactors(n)[0]) + 1
    def a064989(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f])
    def a105560(n): return 1 if n==1 else prime(a001222(n))
    def a(n): return 1 if n==1 else a105560(n)*a(a064989(n))
    [a(n) for n in range(1, 101)] # Indranil Ghosh, Jun 15 2017
  • Scheme
    ;; Uses Antti Karttunen's IntSeq-library.
    (definec (A122111 n) (if (<= n 1) n (* (A000040 (A001222 n)) (A122111 (A064989 n)))))
    ;; Antti Karttunen, May 12 2014
    
  • Scheme
    ;; Uses Antti Karttunen's IntSeq-library.
    (definec (A122111 n) (if (<= n 1) n (* (A000079 (A241917 n)) (A003961 (A122111 (A052126 n))))))
    ;; Antti Karttunen, May 12 2014
    
  • Scheme
    ;; Uses Antti Karttunen's IntSeq-library.
    (definec (A122111 n) (if (<= n 1) n (* (expt (A000040 (A071178 n)) (A241919 n)) (A242378bi (A071178 n) (A122111 (A051119 n))))))
    ;; Antti Karttunen, May 12 2014
    

Formula

From Antti Karttunen, May 12-19 2014: (Start)
a(1) = 1, a(p_i) = 2^i, and for other cases, if n = p_i1 * p_i2 * p_i3 * ... * p_{k-1} * p_k, where p's are primes, not necessarily distinct, sorted into nondescending order so that i1 <= i2 <= i3 <= ... <= i_{k-1} <= ik, then a(n) = 2^(ik-i_{k-1}) * 3^(i_{k-1}-i_{k-2}) * ... * p_{i_{k-1}}^(i2-i1) * p_ik^(i1).
This can be implemented as a recurrence, with base case a(1) = 1,
and then using any of the following three alternative formulas:
a(n) = A105560(n) * a(A064989(n)) = A000040(A001222(n)) * a(A064989(n)). [Cf. the formula for A242424.]
a(n) = A000079(A241917(n)) * A003961(a(A052126(n))).
a(n) = (A000040(A071178(n))^A241919(n)) * A242378(A071178(n), a(A051119(n))). [Here ^ stands for the ordinary exponentiation, and the bivariate function A242378(k,n) changes each prime p(i) in the prime factorization of n to p(i+k), i.e., it's the result of A003961 iterated k times starting from n.]
a(n) = 1 + A075157(A129594(A075158(n-1))). [Follows from the commutativity with A241909, please see the comments section.]
(End)
From Antti Karttunen, Jul 31 2014: (Start)
As a composition of related permutations:
a(n) = A153212(A242419(n)) = A242419(A153212(n)).
a(n) = A241909(A241916(n)) = A241916(A241909(n)).
a(n) = A243505(A048673(n)).
a(n) = A064216(A243506(n)).
Other identities. For all n >= 1, the following holds:
A006530(a(n)) = A105560(n). [The latter sequence gives greatest prime factor of the n-th term].
a(2n)/a(n) = A105560(2n)/A105560(n), which is equal to A003961(A105560(n))/A105560(n) when n > 1.
A243505(n) = A052126(a(2n-1)) = A052126(a(4n-2)).
A066829(n) = A244992(a(n)) and vice versa, A244992(n) = A066829(a(n)).
A243503(a(n)) = A243503(n). [Because partition conjugation does not change the partition size.]
A238690(a(n)) = A238690(n). - per Matthew Vandermast's note in that sequence.
A238745(n) = a(A181819(n)) and a(A238745(n)) = A181819(n). - per Matthew Vandermast's note in A238745.
A181815(n) = a(A181820(n)) and a(A181815(n)) = A181820(n). - per Matthew Vandermast's note in A181815.
(End)
a(n) = A181819(A108951(n)). [Prime shadow of the primorial inflation of n] - Antti Karttunen, Apr 29 2022

A355731 Number of ways to choose a sequence of divisors, one of each element of the multiset of prime indices of n (row n of A112798).

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 4, 2, 2, 2, 4, 3, 4, 1, 2, 4, 4, 2, 6, 2, 3, 2, 4, 4, 8, 3, 4, 4, 2, 1, 4, 2, 6, 4, 6, 4, 8, 2, 2, 6, 4, 2, 8, 3, 4, 2, 9, 4, 4, 4, 5, 8, 4, 3, 8, 4, 2, 4, 6, 2, 12, 1, 8, 4, 2, 2, 6, 6, 6, 4, 4, 6, 8, 4, 6, 8, 4, 2, 16, 2, 2, 6, 4, 4
Offset: 1

Views

Author

Gus Wiseman, Jul 16 2022

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.

Examples

			The a(15) = 4 choices are: (1,1), (1,3), (2,1), (2,3).
The a(18) = 4 choices are: (1,1,1), (1,1,2), (1,2,1), (1,2,2).
		

Crossrefs

Positions of 1's are A000079.
Dominated by A003963 (cf. A049820), with equality at A003586.
Positions of first appearances are A355732.
Counting distinct sequences after sorting gives A355733, firsts A355734.
Requiring the result to be weakly increasing gives A355735, firsts A355736.
Requiring the result to be relatively prime gives A355737, firsts A355738.
Requiring the choices to be distinct gives A355739, zeros A355740.
For prime divisors A355741, prime-powers A355742, weakly increasing A355745.
Choosing divisors of each of 1..n and resorting gives A355747.
An ordered version (using standard order compositions) is A355748.
A000005 counts divisors.
A001414 adds up distinct prime divisors, counted by A001221.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A120383 lists numbers divisible by all of their prime indices.
A289509 lists numbers with relatively prime prime indices.
A324850 lists numbers divisible by the product of their prime indices.
A340852 lists numbers that can be factored into divisors of bigomega.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Times@@Length/@Divisors/@primeMS[n],{n,100}]

Formula

a(n) = Product_{k=1..A001222(n)} A000005(A112798(n,k)).

A358136 Irregular triangle read by rows whose n-th row lists the partial sums of the prime indices of n (row n of A112798).

Original entry on oeis.org

1, 2, 1, 2, 3, 1, 3, 4, 1, 2, 3, 2, 4, 1, 4, 5, 1, 2, 4, 6, 1, 5, 2, 5, 1, 2, 3, 4, 7, 1, 3, 5, 8, 1, 2, 5, 2, 6, 1, 6, 9, 1, 2, 3, 5, 3, 6, 1, 7, 2, 4, 6, 1, 2, 6, 10, 1, 3, 6, 11, 1, 2, 3, 4, 5, 2, 7, 1, 8, 3, 7, 1, 2, 4, 6, 12, 1, 9, 2, 8, 1, 2, 3, 6, 13
Offset: 2

Views

Author

Gus Wiseman, Oct 31 2022

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.

Examples

			Triangle begins:
   2: 1
   3: 2
   4: 1 2
   5: 3
   6: 1 3
   7: 4
   8: 1 2 3
   9: 2 4
  10: 1 4
  11: 5
  12: 1 2 4
  13: 6
  14: 1 5
  15: 2 5
  16: 1 2 3 4
  17: 7
  18: 1 3 5
		

Crossrefs

Row-lengths are A001222.
First element in each row is A055396.
Last element in each row is A056239.
Rows are the partial sums of rows of A112798.
Row-sums are A318283.
Sorted Heinz numbers of the rows are A325362.
The version for standard compositions is A358134.
Rows are ranked by A358137.
A000041 counts partitions, strict A000009.
A003963 multiplies prime indices.
A056239 adds up prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Accumulate[primeMS[n]],{n,30}]

A304660 A run-length describing inverse to A181819. The multiplicity of prime(k) in a(n) is the k-th smallest prime index of n, which is A112798(n,k).

Original entry on oeis.org

1, 2, 4, 6, 8, 18, 16, 30, 36, 54, 32, 150, 64, 162, 108, 210, 128, 450, 256, 750, 324, 486, 512, 1470, 216, 1458, 900, 3750, 1024, 2250, 2048, 2310, 972, 4374, 648, 7350, 4096, 13122, 2916, 10290, 8192, 11250, 16384, 18750, 4500, 39366, 32768, 25410, 1296
Offset: 1

Views

Author

Gus Wiseman, May 16 2018

Keywords

Comments

A permutation of A133808. a(n) is the smallest member m of A133808 such that A181819(m) = n.

Examples

			Sequence of normalized prime multisets together with the normalized prime multisets of their images begins:
   1:        {} -> {}
   2:       {1} -> {1}
   3:       {2} -> {1,1}
   4:     {1,1} -> {1,2}
   5:       {3} -> {1,1,1}
   6:     {1,2} -> {1,2,2}
   7:       {4} -> {1,1,1,1}
   8:   {1,1,1} -> {1,2,3}
   9:     {2,2} -> {1,1,2,2}
  10:     {1,3} -> {1,2,2,2}
  11:       {5} -> {1,1,1,1,1}
  12:   {1,1,2} -> {1,2,3,3}
  13:       {6} -> {1,1,1,1,1,1}
  14:     {1,4} -> {1,2,2,2,2}
  15:     {2,3} -> {1,1,2,2,2}
  16: {1,1,1,1} -> {1,2,3,4}
  17:       {7} -> {1,1,1,1,1,1,1}
  18:   {1,2,2} -> {1,2,2,3,3}
		

Crossrefs

Programs

  • Mathematica
    Table[With[{y=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]},Times@@Power[Array[Prime,Length[y]],y]],{n,100}]

Formula

a(n) = Product_{i = 1..Omega(n)} prime(i)^A112798(n,i).

A317791 Number of non-isomorphic multiset partitions of the multiset of prime indices of n (row n of A112798).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 5, 1, 4, 1, 4, 2, 2, 1, 7, 2, 2, 3, 4, 1, 3, 1, 7, 2, 2, 2, 7, 1, 2, 2, 7, 1, 3, 1, 4, 4, 2, 1, 12, 2, 4, 2, 4, 1, 7, 2, 7, 2, 2, 1, 9, 1, 2, 4, 11, 2, 3, 1, 4, 2, 3, 1, 16, 1, 2, 4, 4, 2, 3, 1, 12, 5, 2, 1, 9, 2, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Aug 07 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n.
a(n) depends only on prime signature of n (cf. A025487). - Antti Karttunen, Dec 03 2018
Are any terms of the complement known? In particular, does this sequence contain 6? - Gus Wiseman, Oct 21 2022

Examples

			Non-isomorphic representatives of the a(42) = 3 multiset partitions are {{1,2,4}}, {{1},{2,4}}, {{1},{2},{4}}.
Non-isomorphic representatives of the a(60) = 9 multiset partitions:
  {1123},
  {1}{123}, {2}{113}, {11}{23}, {12}{13},
  {1}{1}{23}, {1}{2}{13}, {2}{3}{11},
  {1}{1}{2}{3}.
Missing from this list are {3}{112} and {1}{3}{12}, which are isomorphic to {2}{113} and {1}{2}{13} respectively.
For n = 180 = 2^2 * 3^2 * 5, there are A001055(180) = 26 different factorizations to one or more factors larger than 1. Of these 18 are such that by swapping 2 and 3 in each factor of that factorization the result is another, different factorization of 180, while the other 8 cases are such that 2 <-> 3 swap doesn't change the factorization. Thus a(180) = 18/2 + 8 = 17. - _Antti Karttunen_, Dec 03 2018
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    sysnorm[{}] := {};sysnorm[m_]:=If[Union@@m!=Range[Max@@Flatten[m]],sysnorm[m/.Rule@@@Table[{(Union@@m)[[i]],i},{i,Length[Union@@m]}]],First[Sort[sysnorm[m,1]]]];sysnorm[m_,aft_]:=If[Length[Union@@m]<=aft,{m},With[{mx=Table[Count[m,i,{2}],{i,Select[Union@@m,#>=aft&]}]},Union@@(sysnorm[#,aft+1]&/@Union[Table[Map[Sort,m/.{par+aft-1->aft,aft->par+aft-1},{0,1}],{par,First/@Position[mx,Max[mx]]}]])]];
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Union[sysnorm/@mps[primeMS[n]]]],{n,100}]

Formula

For all n, a(n) <= A001055(n). - Antti Karttunen, Dec 01 2018
If n is squarefree with k prime factors, or if n = p^k for p prime, we have a(n) = A000041(k).
a(n) = A318285(A181819(n)). - Andrew Howroyd, Jan 17 2023

Extensions

Terms corrected by Gus Wiseman, Dec 04 2018

A287352 Irregular triangle T(n,k) = A112798(n,1) followed by first differences of A112798(n).

Original entry on oeis.org

0, 1, 2, 1, 0, 3, 1, 1, 4, 1, 0, 0, 2, 0, 1, 2, 5, 1, 0, 1, 6, 1, 3, 2, 1, 1, 0, 0, 0, 7, 1, 1, 0, 8, 1, 0, 2, 2, 2, 1, 4, 9, 1, 0, 0, 1, 3, 0, 1, 5, 2, 0, 0, 1, 0, 3, 10, 1, 1, 1, 11, 1, 0, 0, 0, 0, 2, 3, 1, 6, 3, 1, 1, 0, 1, 0, 12, 1, 7, 2, 4, 1, 0, 0, 2, 13
Offset: 1

Views

Author

Michael De Vlieger, May 23 2017

Keywords

Comments

Irregular triangle T(n,k) = first differences of indices of prime divisors p of n.
Row lengths = (big) Omega(n) = A001222(n).
Row sums = A061395(n).
Row maxima = A286469(n).
We can concatenate the rows 1 <= n <= 28 as none of the values of k in this range exceed 9: {0, 1, 2, 10, 3, 11, 4, 100, 20, 12, 5, 101, 6, 13, 21, 1000, 7, 110, 8, 102, 22, 14, 9, 1001, 30, 15, 200, 103}; a(29) = {10}, which would require a digit greater than 9.
a(1) = 0 by convention.
a(0) is not defined (i.e., null set). a(n) is defined for positive nonzero n.
a(p) = A000720(p) for p prime.
a(p^e) = A000720(p) followed by (e - 1) zeros.
a(Product(p^e)) is the concatenation of the a(p^e) of the unitary prime power divisors p^e of n, sorted by the prime p (i.e. the function a(n) mapped across the terms of row n of A141809).
a(A002110(n)) = an array of n 1s.
T(n,k) could be used to furnish A054841(n). We read data in row n of T(n,k). If T(n,1) = 0, then write 0. If T(n,1) > 0, then increment the k-th place from the right. For k > 1, increment the k-th place to the right of the last-incremented place.
T(n,k) can be used to render n in decimal. If T(n,1) = 0, then write 1. If T(n,1) > 0, then multiply 1 by A000720(T(n,1)). For k > 1, multiply the previous product by pi(x) = A000720(x) of the running total of T(n,k) for each k.
Ignoring zeros in row n > 1 and decoding the remaining values of T(n,k) as immediately above yields the squarefree kernel of n = A007947(n).
Leading zeros of a(n) are trimmed, but as in decimal notation numbers that include leading zeros symbolize the same n as without them. Zeros that precede nonzero values merely multiply implicit 1 by itself until we encounter nonzero values. Thus, {0,0,2} = 1*1*pi(2) = 3, as {2} = pi(2) = 3. Because of this no row n > 1 has 0 for k = 1 of T(n,k).
Interpreting n written in binary as a row of a(n) yields A057335(n).

Examples

			a(1) = {0} by convention.
a(2) = {pi(2)} = {1}.
a(4) = {pi(2), pi(2) - pi(2)}, = {1, 0} since 4 = 2 * 2.
a(6) = {pi(2), pi(3) - pi(2)} = {1, 1} since 6 = 2 * 3.
a(12) = {pi(2), pi(2) - pi(2), pi(3) - pi(2) - pi(2)} = {1, 0, 1}, since 12 = 2 * 2 * 3.
The triangle starts:
   1:  0;
   2:  1;
   3:  2;
   4:  1, 0;
   5:  3;
   6:  1, 1;
   7:  4;
   8:  1, 0, 0;
   9:  2, 0;
  10:  1, 2;
  11:  5;
  12:  1, 0, 1;
  13:  6;
  14:  1, 3;
  15:  2, 1;
  16:  1, 0, 0, 0;
  17:  7;
  18:  1, 1, 0;
  19:  8;
  20:  1, 0, 2;
       ...
		

Crossrefs

Programs

  • Mathematica
    Table[Prepend[Differences@ #, First@ #] & Flatten[FactorInteger[n] /. {p_, e_} /; p > 0 :> ConstantArray[PrimePi@ p, e]], {n, 41}] // Flatten (* Michael De Vlieger, May 23 2017 *)

Formula

T(n,1) = A117798(n,1); T(n,k) = A117798(n,k) - A117798(n, k - 1) for 2 <= k <= A001222(n).

A242424 Bulgarian solitaire operation on partition list A112798: a(1) = 1, a(n) = A000040(A001222(n)) * A064989(n).

Original entry on oeis.org

1, 2, 4, 3, 6, 6, 10, 5, 12, 9, 14, 10, 22, 15, 18, 7, 26, 20, 34, 15, 30, 21, 38, 14, 27, 33, 40, 25, 46, 30, 58, 11, 42, 39, 45, 28, 62, 51, 66, 21, 74, 50, 82, 35, 60, 57, 86, 22, 75, 45, 78, 55, 94, 56, 63, 35, 102, 69, 106, 42, 118, 87, 100, 13, 99, 70, 122, 65
Offset: 1

Views

Author

Antti Karttunen, May 13 2014

Keywords

Comments

In "Bulgarian solitaire" a deck of cards or another finite set of objects is divided into one or more piles, and the "Bulgarian operation" is performed by taking one card from each pile, and making a new pile of them, which is added to the remaining set of piles. Essentially, this operation is a function whose domain and range are unordered integer partitions (cf. A000041) and which preserves the total size of a partition (the sum of its parts). This sequence is induced when the operation is implemented on the partitions as ordered by the list A112798.
Please compare to the definition of A122111, which conjugates the partitions encoded with the same system.
a(n) is even if and only if n is either a prime or a multiple of three.
Conversely, a(n) is odd if and only if n is a nonprime not divisible by three.

References

  • Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.

Crossrefs

Row 1 of A243070 (table which gives successive "recursive iterates" of this sequence and converges towards A122111).
Fixed points: A002110 (primorial numbers).

Programs

Formula

a(1) = 1, a(n) = A000040(A001222(n)) * A064989(n) = A105560(n) * A064989(n).
a(n) = A241909(A243051(A241909(n))).
a(n) = A243353(A226062(A243354(n))).
a(A000079(n)) = A000040(n) for all n.
A056239(a(n)) = A056239(n) for all n.

A243353 Permutation of natural numbers which maps between the partitions as encoded in A227739 (binary based system, zero-based) to A112798 (prime-index based system, one-based).

Original entry on oeis.org

1, 2, 4, 3, 9, 8, 6, 5, 25, 18, 16, 27, 15, 12, 10, 7, 49, 50, 36, 75, 81, 32, 54, 125, 35, 30, 24, 45, 21, 20, 14, 11, 121, 98, 100, 147, 225, 72, 150, 245, 625, 162, 64, 243, 375, 108, 250, 343, 77, 70, 60, 105, 135, 48, 90, 175, 55, 42, 40, 63, 33, 28, 22, 13, 169, 242, 196, 363, 441, 200, 294, 605, 1225, 450, 144
Offset: 0

Views

Author

Antti Karttunen, Jun 05 2014

Keywords

Comments

Note the indexing: the domain includes zero, but the range starts from one.

Crossrefs

A243354 gives the inverse mapping.

Programs

  • Mathematica
    f[n_, i_, x_] := Which[n == 0, x, EvenQ@ n, f[n/2, i + 1, x], True, f[(n - 1)/2, i, x Prime@ i]]; Table[f[BitXor[n, Floor[n/2]], 1, 1], {n, 0, 74}] (* Michael De Vlieger, May 09 2017 *)
  • Python
    from sympy import prime
    import math
    def A(n): return n - 2**int(math.floor(math.log(n, 2)))
    def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
    def a005940(n): return b(n - 1)
    def a003188(n): return n^int(n/2)
    def a243353(n): return a005940(1 + a003188(n)) # Indranil Ghosh, May 07 2017
  • Scheme
    (define (A243353 n) (A005940 (+ 1 (A003188 n))))
    

Formula

a(n) = A005940(1+A003188(n)).
a(n) = A241909(1+A075157(n)). [With A075157's original starting offset]
For all n >= 0, A243354(a(n)) = n.
A227183(n) = A056239(a(n)). [Maps between the corresponding sums ...]
A227184(n) = A003963(a(n)). [... and products of parts of each partition].
For n >= 0, a(A037481(n)) = A002110(n). [Also "triangular partitions", the fixed points of Bulgarian solitaire, A226062 & A242424].
For n >= 1, a(A227451(n+1)) = 4*A243054(n).

A360558 Numbers whose multiset of prime factors (or indices, see A112798) has more adjacent equalities (or parts that have appeared before) than distinct parts.

Original entry on oeis.org

8, 16, 27, 32, 48, 64, 72, 80, 81, 96, 108, 112, 125, 128, 144, 160, 162, 176, 192, 200, 208, 216, 224, 243, 256, 272, 288, 304, 320, 324, 343, 352, 368, 384, 392, 400, 405, 416, 432, 448, 464, 480, 486, 496, 500, 512, 544, 567, 576, 592, 608, 625, 640, 648
Offset: 1

Views

Author

Gus Wiseman, Feb 20 2023

Keywords

Comments

No terms are squarefree.
Also numbers whose first differences of 0-prepended prime indices have median 0.

Examples

			The terms together with their prime indices begin:
     8: {1,1,1}
    16: {1,1,1,1}
    27: {2,2,2}
    32: {1,1,1,1,1}
    48: {1,1,1,1,2}
    64: {1,1,1,1,1,1}
    72: {1,1,1,2,2}
    80: {1,1,1,1,3}
    81: {2,2,2,2}
    96: {1,1,1,1,1,2}
   108: {1,1,2,2,2}
   112: {1,1,1,1,4}
   125: {3,3,3}
For example, the prime indices of 720 are {1,1,1,1,2,2,3} with 4 adjacent equalities and 3 distinct parts, so 720 is in the sequence.
		

Crossrefs

For equality we have A067801.
These partitions are counted by A360254.
A112798 lists prime indices, length A001222, sum A056239.
A326567/A326568 gives mean of prime indices.
A360005 gives median of prime indices (times 2).

Programs

  • Mathematica
    Select[Range[100],PrimeOmega[#]>2*PrimeNu[#]&]

Formula

A001222(a(n)) > 2*A001221(a(n)).

A340606 Numbers whose prime indices (A112798) are all divisors of the number of prime factors (A001222).

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 16, 20, 24, 32, 36, 50, 54, 56, 64, 81, 84, 96, 125, 126, 128, 144, 160, 176, 189, 196, 216, 240, 256, 294, 324, 360, 384, 400, 416, 441, 486, 512, 540, 576, 600, 624, 686, 729, 810, 864, 896, 900, 936, 968, 1000, 1024, 1029, 1040, 1088, 1215
Offset: 1

Views

Author

Gus Wiseman, Jan 24 2021

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.

Examples

			The sequence of terms together with their prime indices begins:
   1: {}
   2: {1}
   4: {1,1}
   6: {1,2}
   8: {1,1,1}
   9: {2,2}
  16: {1,1,1,1}
  20: {1,1,3}
  24: {1,1,1,2}
  32: {1,1,1,1,1}
  36: {1,1,2,2}
  50: {1,3,3}
  54: {1,2,2,2}
  56: {1,1,1,4}
  64: {1,1,1,1,1,1}
  81: {2,2,2,2}
  84: {1,1,2,4}
  96: {1,1,1,1,1,2}
		

Crossrefs

Note: Heinz numbers are given in parentheses below.
The reciprocal version is A143773 (A316428).
These partitions are counted by A340693.
A120383 lists numbers divisible by all of their prime indices.
A324850 lists numbers divisible by the product of their prime indices.
A003963 multiplies together the prime indices of n.
A018818 counts partitions of n into divisors of n (A326841).
A047993 counts balanced partitions (A106529).
A067538 counts partitions of n whose length divides n (A316413).
A056239 adds up the prime indices of n.
A061395 selects the maximum prime index.
A067538 counts partitions of n whose maximum divides n (A326836).
A072233 counts partitions by sum and length.
A112798 lists the prime indices of each positive integer.
A168659 = partitions whose length is divisible by their maximum (A340609).
A168659 = partitions whose maximum is divisible by their length (A340610).
A289509 lists numbers with relatively prime prime indices.
A326842 = partitions of n whose length and parts all divide n (A326847).
A326843 = partitions of n whose length and maximum both divide n (A326837).
A340852 have a factorization with factors dividing length.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],And@@IntegerQ/@(PrimeOmega[#]/primeMS[#])&]
Showing 1-10 of 1727 results. Next