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 11 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

A243055 Difference between the indices of the smallest and the largest prime dividing n: If n = p_i * ... * p_k, where p_i <= ... <= p_k, where p_h = A000040(h), then a(n) = (k-i), a(1) = 0 by convention.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 31 2014

Keywords

Comments

For n>=1, A100484(n+1) gives the position where n occurs for the first time (setting also the records for the sequence).
a(n) = the difference between the largest and the smallest parts of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(57) = 6; indeed, the partition having Heinz number 57 = 3*19 is [2, 8]. - Emeric Deutsch, Jun 04 2015

Crossrefs

Differs from A242411 for the first time at n=30.
A000961 gives the positions of zeros.

Programs

  • Maple
    with(numtheory):
    a:= n-> `if`(n=1, 0, (f-> pi(max(f[]))-pi(min(f[])))(factorset(n))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 04 2015
  • Mathematica
    a[1]=0; a[n_] := Function[{f}, PrimePi[Max[f]] - PrimePi[Min[f]]][FactorInteger[n][[All, 1]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 29 2015, after Alois P. Heinz *)
  • Python
    from sympy import primepi, primefactors
    def A243055(n): return primepi(max(p:=primefactors(n),default=0))-primepi(min(p,default=0)) # Chai Wah Wu, Oct 10 2023
  • Scheme
    (define (A243055 n) (- (A061395 n) (A055396 n)))
    

Formula

If n = p_i * ... * p_k, where p_i <= ... <= p_k are not necessarily distinct primes (sorted into nondescending order) in the prime factorization of n, where p_i = A000040(i), then a(n) = (k-i).
a(n) = A061395(n) - A055396(n).

A241917 If n is a prime with index i, p_i, a(n) = i, (with a(1)=0), otherwise difference (i-j) of the indices of the two largest primes p_i, p_j, i >= j in the prime factorization of n: a(n) = A061395(n) - A061395(A052126(n)).

Original entry on oeis.org

0, 1, 2, 0, 3, 1, 4, 0, 0, 2, 5, 1, 6, 3, 1, 0, 7, 0, 8, 2, 2, 4, 9, 1, 0, 5, 0, 3, 10, 1, 11, 0, 3, 6, 1, 0, 12, 7, 4, 2, 13, 2, 14, 4, 1, 8, 15, 1, 0, 0, 5, 5, 16, 0, 2, 3, 6, 9, 17, 1, 18, 10, 2, 0, 3, 3, 19, 6, 7, 1, 20, 0, 21, 11, 0, 7, 1, 4, 22, 2, 0, 12, 23
Offset: 1

Views

Author

Antti Karttunen, May 13 2014

Keywords

Comments

Note: the two largest primes in the multiset of prime divisors of n are equal for all numbers that are in A070003, thus, after a(1)=0, A070003 gives the positions of the other zeros in this sequence.

Crossrefs

Cf. A241919, A242411, A243055 for other variants.

Programs

  • Haskell
    a241917 n = i - j where
                (i:j:_) = map a049084 $ reverse (1 : a027746_row n)
    -- Reinhard Zumkeller, May 15 2014
    
  • PARI
    A241917(n) = if(isprime(n), primepi(n), if(1>=omega(n), 0, my(f=factor(n)); if(f[#f~,2]>1, 0, primepi(f[#f~,1])-primepi(f[(#f~)-1,1])))); \\ Antti Karttunen, Jul 10 2024
  • Python
    from sympy import primefactors, primepi
    def a061395(n): return 0 if n==1 else primepi(primefactors(n)[-1])
    def a052126(n): return 1 if n==1 else n/primefactors(n)[-1]
    def a(n): return 0 if n==1 else a061395(n) - a061395(a052126(n)) # Indranil Ghosh, May 19 2017
    
  • Scheme
    (define (A241917 n) (- (A061395 n) (A061395 (A052126 n))))
    

Formula

a(n) = A061395(n) - A061395(A052126(n)).

A243056 If n is the i-th prime, p_i = A000040(i), then a(n) = i, otherwise the difference between the indices of the smallest and the largest prime dividing n: for n = p_i * ... * p_k, where p_i <= ... <= p_k, a(n) = (k-i); a(1) = 0 by convention.

Original entry on oeis.org

0, 1, 2, 0, 3, 1, 4, 0, 0, 2, 5, 1, 6, 3, 1, 0, 7, 1, 8, 2, 2, 4, 9, 1, 0, 5, 0, 3, 10, 2, 11, 0, 3, 6, 1, 1, 12, 7, 4, 2, 13, 3, 14, 4, 1, 8, 15, 1, 0, 2, 5, 5, 16, 1, 2, 3, 6, 9, 17, 2, 18, 10, 2, 0, 3, 4, 19, 6, 7, 3, 20, 1, 21, 11, 1, 7, 1, 5, 22, 2, 0, 12, 23, 3, 4, 13, 8, 4, 24, 2
Offset: 1

Views

Author

Antti Karttunen, May 31 2014

Keywords

Crossrefs

Useful when computing A243057 or A243059.
A025475 (prime powers that are not primes) gives the positions of zeros.
Differs from A241917 for the first time at n=18.

Programs

Formula

a(1) = 0, for n>1, if n = A000040(i), a(n) = i, otherwise a(n) = A061395(n) - A055396(n) = A243055(n).

A242419 Reverse both the exponents and the deltas of the indices of distinct primes present in the prime factorization of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 11, 18, 13, 35, 10, 16, 17, 12, 19, 75, 21, 77, 23, 54, 25, 143, 27, 245, 29, 30, 31, 32, 55, 221, 14, 36, 37, 323, 91, 375, 41, 105, 43, 847, 50, 437, 47, 162, 49, 45, 187, 1859, 53, 24, 33, 1715, 247, 667, 59, 150, 61, 899, 147, 64, 65
Offset: 1

Views

Author

Antti Karttunen, May 17 2014

Keywords

Comments

This self-inverse permutation (involution) of natural numbers preserves both the total number of prime divisors and the (index of) largest prime factor of n, i.e. for all n it holds that A001222(a(n)) = A001222(n) and A006530(a(n)) = A006530(n) [equally: A061395(a(n)) = A061395(n)].
Considered as an operation on partitions encoded by the indices of primes in the prime factorization of n (as in table A112798), this implements a bijection which reverses the order of "steps" in Young (or Ferrers) diagram of a partition (but keeps the horizontal line segment of each step horizontal and the vertical line segment vertical). Please see the last example in the example section.
To understand the given recursive formula, it helps to see that in the above context (Young diagrams drawn with French notation), the sequences employed effect the following operations:
A001222: gives the height of whole diagram,
A051119: removes the bottommost step from the diagram,
A241919: gives the length of the horizontal line segment of the bottom step, i.e. its width,
A071178: gives the length of the vertical line segment of the bottom step, i.e. its height,
A242378(k,n): increases the width of whole Young diagram encoded by n by adding a rectangular area A001222(n) squares high and k squares wide to its left,
and finally, multiplying by A000040(a)^b adds a new topmost step whose width is a and height is b. Particularly, multiplying by (A000040(A241919(n))^A071178(n)) transfers the bottommost step to the top.

Examples

			For n = 10 = 2*5 = p_1^1 * p_3^1, we get p_(3-1)^1 * p_3^1 = 3 * 5 = 15, thus a(10) = 15.
For n = 20 = 2*2*5 = p_1^2 * p_3^1, we get p_(3-1)^1 * p_3^2 = 3^1 * 5^2 = 3*25 = 75, thus a(20) = 75.
For n = 84 = 2*2*3*7 = p_1^2 * p_2 * p_4, when we reverse the deltas of indices, and reverse also the order of exponents, we get p_(4-2) * p_(4-1) * p_4^2 = 3 * 5 * 7^2 = 735, thus a(84) = 735.
For n = 2200, we see that it encodes the partition (1,1,1,3,3,5) in A112798 as 2200 = p_1 * p_1 * p_1 * p_3 * p_3 * p_5 = 2^3 * 5^2 * 11. This in turn corresponds to the following Young diagram in French notation:
   _
  | |
  | |
  | |_ _
  |     |
  |     |_ _
  |_ _ _ _ _|
Reversing the order of "steps", so that each horizontal and vertical line segment centered around a "convex corner" moves as a whole, means that the first stair from the top (one unit wide and three units high) is moved to the last position, the second one (two units wide and two units high) stays in the middle, and the original bottom step (two units wide and one unit high) will be the new topmost step, thus we get the following Young diagram:
   _ _
  |   |_ _
  |       |
  |       |_
  |         |
  |         |
  |_ _ _ _ _|
which represents the partition (2,4,4,5,5,5), encoded in A112798 by p_2 * p_4^2 * p_5^3 = 3 * 7^2 * 11^3 = 195657, thus a(2200) = 195657.
		

Crossrefs

Fixed points: A242417.
{A000027, A122111, A153212, A242419} form a 4-group.
{A000027, A069799, A242415, A242419} form also a 4-group.

Formula

If n = p_a^e_a * p_b^e_b * ... * p_h^e_h * p_i^e_i * p_j^e_j * p_k^e_k, where p_a < ... < p_k are distinct primes (sorted into ascending order) in the prime factorization of n, and e_a .. e_k are their nonzero exponents, then a(n) = p_{k-j}^e_k * p_{k-i}^e_j * p_{k-h}^e_i * ... * p_{k-a}^e_b * p_k^e_a.
As a recurrence:
a(1) = 1, and for n>1, a(n) = (A000040(A241919(n))^A071178(n)) * A242378(A241919(n), a(A051119(n))).
By composing related permutations:
a(n) = A122111(A153212(n)) = A153212(A122111(n)).
a(n) = A069799(A242415(n)) = A242415(A069799(n)).
a(n) = A105119(A242420(n)).

A242411 If n is a prime power, p_i^e, a(n) = 0, otherwise difference (i-j) of the indices of the two largest distinct primes p_i, p_j, i > j in the prime factorization of n: a(n) = A061395(n) - A061395(A051119(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 13 2014

Keywords

Crossrefs

Cf. A000961 (positions of zeros).

Programs

  • Haskell
    a242411 1 = 0
    a242411 n = i - j where
                (i:j:_) = map a049084 $ ps ++ [p]
                ps@(p:_) = reverse $ a027748_row n
    -- Reinhard Zumkeller, May 15 2014
    
  • Python
    from sympy import factorint, primefactors, primepi
    def a061395(n): return 0 if n==1 else primepi(primefactors(n)[-1])
    def a053585(n):
        if n==1: return 1
        p = primefactors(n)[-1]
        return p**factorint(n)[p]
    def a051119(n): return n/a053585(n)
    def a(n): return 0 if n==1 or len(primefactors(n))==1 else a061395(n) - a061395(a051119(n)) # Indranil Ghosh, May 19 2017
  • Scheme
    (define (A242411 n) (if (= 1 (A001221 n)) 0 (- (A061395 n) (A061395 (A051119 n)))))
    

Formula

If A001221(n) = 1, then a(n) = 0, otherwise a(n) = A241919(n) = A061395(n) - A061395(A051119(n)).

A242415 Reverse the deltas of indices of distinct primes in the prime factorization of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 11, 12, 13, 35, 10, 16, 17, 18, 19, 45, 21, 77, 23, 24, 25, 143, 27, 175, 29, 30, 31, 32, 55, 221, 14, 36, 37, 323, 91, 135, 41, 105, 43, 539, 20, 437, 47, 48, 49, 75, 187, 1573, 53, 54, 33, 875, 247, 667, 59, 60, 61, 899, 63, 64, 65
Offset: 1

Views

Author

Antti Karttunen, May 24 2014

Keywords

Comments

This self-inverse permutation (involution) of natural numbers preserves both the total number of prime divisors and the (index of) largest prime factor of n, i.e., for all n it holds that A001222(a(n)) = A001222(n) and A006530(a(n)) = A006530(n) [equally: A061395(a(n)) = A061395(n)]. It also preserves the exponent of the largest prime: A053585(a(n)) = A053585(n).
From the above it follows, that this fixes prime powers (A000961), among other numbers.
Considered as a function on partitions encoded by the indices of primes in the prime factorization of n (as in table A112798), this implements an operation which reverses the order of horizontal line segments of the "steps" in Young (or Ferrers) diagram of a partition, but keeps the order of vertical line segments intact. Please see the last example in the example section and compare also to the comments given in A242419.

Examples

			For n = 10 = 2*5 = p_1 * p_3, we get p_(3-1) * p_3 = 3 * 5 = 15, thus a(10) = 15.
For n = 20 = 2*2*5 = p_1^2 * p_3^1, we get p_(3-1)^2 * p_3^1 = 3^2 * 5 = 45, thus a(20) = 45.
For n = 84 = 2*2*3*7 = p_1^2 * p_2 * p_4, when we reverse the deltas of indices, but keep the exponents same, we get p_(4-2)^2 * p_(4-1) * p_4 = p_2^2 * p_3 * p_4 = 3^2 * 5 * 7 = 315, thus a(84) = 315.
For n = 2200, we see that it encodes the partition (1,1,1,3,3,5) in A112798 as 2200 = p_1 * p_1 * p_1 * p_3 * p_3 * p_5 = 2^3 * 5^2 * 11. This in turn corresponds to the following Young diagram in French notation:
   _
  | |
  | |
  | |_ _
  |     |
  |     |_ _
  |_ _ _ _ _|
Reversing the order of horizontal line segment lengths (1,2,2) to (2,2,1), but keeping the order of vertical line segment lengths as (3,2,1), we get a new Young diagram
   _ _
  |   |
  |   |
  |   |_ _
  |       |
  |       |_
  |_ _ _ _ _|
which represents the partition (2,2,2,4,4,5), encoded in A112798 by p_2^3 * p_4^2 * p_5^1 = 3^3 * 7^2 * 11 = 14553, thus a(2200) = 14553.
		

Crossrefs

Formula

If n = p_a^e_a * p_b^e_b * ... * p_h^e_h * p_i^e_i * p_j^e_j * p_k^e_k, where p_a < ... < p_k are distinct primes (sorted into ascending order) in the prime factorization of n, and e_a .. e_k are their nonzero exponents, then a(n) = p_{k-j}^e_a * p_{k-i}^e_b * p_{k-h}^e_c * ... * p_{k-a}^e_j * p_k^e_k.
As a recurrence: a(1) = 1, and for n>1, a(n) = (A000040(A241919(n))^A067029(n)) * A242378(A241919(n), a(A051119(A225891(n)))).
By composing/conjugating related permutations:
a(n) = A069799(A242419(n)) = A242419(A069799(n)).

A383534 Irregular triangle read by rows where row n lists the positive first differences of the 0-prepended prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 20 2025

Keywords

Comments

Also differences of distinct 0-prepended prime indices of n.

Examples

			The prime indices of 140 are {1,1,3,4}, zero prepended {0,1,1,3,4}, differences (1,0,2,1), positive (1,2,1).
Rows begin:
    1: ()        16: (1)        31: (11)
    2: (1)       17: (7)        32: (1)
    3: (2)       18: (1,1)      33: (2,3)
    4: (1)       19: (8)        34: (1,6)
    5: (3)       20: (1,2)      35: (3,1)
    6: (1,1)     21: (2,2)      36: (1,1)
    7: (4)       22: (1,4)      37: (12)
    8: (1)       23: (9)        38: (1,7)
    9: (2)       24: (1,1)      39: (2,4)
   10: (1,2)     25: (3)        40: (1,2)
   11: (5)       26: (1,5)      41: (13)
   12: (1,1)     27: (2)        42: (1,1,2)
   13: (6)       28: (1,3)      43: (14)
   14: (1,3)     29: (10)       44: (1,4)
   15: (2,1)     30: (1,1,1)    45: (2,1)
		

Crossrefs

Row-lengths are A001221, sums A061395.
Rows start with A055396, end with A241919.
For multiplicities instead of differences we have A124010 (prime signature).
Including difference 0 gives A287352, without prepending A355536.
Positions of first appearances of rows are A358137.
Positions of strict rows are A383512, counted by A098859.
Positions of non-strict rows are A383513, counted by A336866.
Heinz numbers of rows are A383535.
Restricting to rows of squarefree index gives A384008.
Without prepending we get A384009.
A000040 lists the primes, differences A001223.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A320348 counts strict partitions with distinct 0-appended differences, ranks A325388.
A325324 counts partitions with distinct 0-appended differences, ranks A325367.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[DeleteCases[Differences[Prepend[prix[n],0]],0],{n,100}]

Formula

a(A005117(n)) = A384008(n).

A153212 A permutation of the natural numbers: in the prime factorization of n, swap each prime's index difference (from the previous distinct prime that divides n) and the prime's power.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 16, 5, 9, 18, 32, 15, 64, 54, 12, 7, 128, 10, 256, 75, 36, 162, 512, 35, 27, 486, 25, 375, 1024, 30, 2048, 11, 108, 1458, 24, 21, 4096, 4374, 324, 245, 8192, 150, 16384, 1875, 45, 13122, 32768, 77, 81, 50, 972, 9375, 65536, 14, 72, 1715, 2916, 39366, 131072, 105, 262144, 118098, 225, 13
Offset: 1

Views

Author

Luchezar Belev (l_belev(AT)yahoo.com), Dec 20 2008

Keywords

Comments

In order for the "index difference" to make sense, we consider the factorization to be sorted with respect to the primes but not the powers to which they are raised; that is, first comes the smallest prime and each subsequent prime is larger than the previous disregarding their powers.
For every n it is true that a(a(n)) = n.
From Antti Karttunen, May 29 2014: (Start)
In other words, this is a self-inverse permutation (involution) of natural numbers.
This permutation maps primes (A000040) to the powers of two larger than one (A000079(n>=1)) and vice versa.
The term a(1) = 1 was added on the grounds that as 1 has an empty prime factorization, there is nothing to swap, thus it stays same. It is also needed as a base case for the given recurrence.
Considered as a function on partitions encoded by the indices of primes in the prime factorization of n (as in table A112798), this implements an operation which exchanges the horizontal and vertical line segment of each "step" in Young (or Ferrers) diagram of a partition. Please see the last example in the example section.
(End)

Examples

			For n = 10 we have 10 = 2^1 * 5^1 = p(1)^1 * p(3)^1 then a(10) = p(1)^1 * p(2)^2 = 2^1 * 3^2 = 18.
For n = 18 we have 18 = 2^1 * 3^2 = p(1)^1 * p(2)^2 then a(18) = p(1)^1 * p(3)^1 = 2^1 * 5^1 = 10.
For n = 19 we have 19 = 19^1 = p(8)^1 then a(19) = p(1)^8 = 2^8 = 256.
For n = 2200, we see that it encodes the partition (1,1,1,3,3,5) in A112798 as 2200 = p_1 * p_1 * p_1 * p_3 * p_3 * p_5 = 2^3 * 5^2 * 11. This in turn corresponds to the following Young diagram in French notation:
   _
  | |
  | |
  | |_ _
  |     |
  |     |_ _
  |_ _ _ _ _|
Exchanging the order of the horizontal and vertical line segment of each "step", results the following Young diagram:
   _ _ _
  |     |_ _
  |         |
  |         |_
  |           |
  |_ _ _ _ _ _|
which represents the partition (3,5,5,6,6), encoded in A112798 by p_3 * p_5^2 * p_6^2 = 5 * 11^2 * 13^2 = 102245, thus a(2200) = 102245.
		

Crossrefs

Fixed points: A242421.
{A000027, A122111, A153212, A242419} form a 4-group.

Programs

  • PARI
    a(n) = {my(f = factor(n)); my(g = f); for (i=1, #f~, if (i==1, g[i,1] = prime(f[i,2]), g[i,1] = prime(f[i,2]+ primepi(g[i-1,1]))); if (i==1, g[i,2] = primepi(f[i,1]), g[i,2] = primepi(f[i,1]) - primepi(f[i-1,1]));); factorback(g);} \\ Michel Marcus, Dec 16 2014

Formula

Denote the i-th prime with p(i): p(1)=2, p(2)=3, p(3)=5, p(4)=7, etc. Let n = p(a1)^b1 * p(a2)^b2 * ... * p(ak)^bk is the factorization of n where p(i)^j is the i-th prime raised to power j. As mentioned above, we assume that the primes are sorted, i.e., a1 < a2 < a3 ... < ak. Then a(n) = p(c1)^d1 * p(c2)^d2 * ... * p(ck)^dk where c1 = b1 and c(i) = b(i) + c(i-1) for i > 1 d1 = a1 and d(i) = a(i) - a(i-1) for i > 1.
From Antti Karttunen, May 16 2014: (Start)
a(1) = 1 and for n>1, let r = a(A051119(n)). Then a(n) = r * (A000040(A061395(r)+A071178(n)) ^ A241919(n)).
a(n) = A122111(A242419(n)) = A242419(A122111(n)).
(End)

Extensions

Term a(1)=1 prepended, and also more terms computed by Antti Karttunen, May 16 2014

A286471 If n is noncomposite, then a(n) = 0, otherwise 1 + difference between indices of the two smallest (not necessarily distinct) prime factors of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 11 2017

Keywords

Examples

			For n = 1, 2 and 3, which are all noncomposite numbers, a(n) = 0.
For n = 4 = 2*2 = prime(1)*prime(1), the difference 1-1 = 0, plus one is 1, thus a(4) = 1.
For n = 6 = 2*3 = prime(1)*prime(2), the difference 2-1 = 1, plus one is 2, thus a(6) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[If[Length@ # < 2, 0, First@ Differences@ PrimePi@ Take[#, 2] + 1] &@ Flatten[FactorInteger[n] /. {p_, e_} /; p > 0 :> ConstantArray[p, e]], {n, 118}] (* Michael De Vlieger, May 12 2017 *)
  • Python
    from sympy import primepi, isprime, primefactors, divisors
    def a049084(n): return primepi(n)*(1*isprime(n))
    def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
    def a(n): return 0 if n==1 or isprime(n) else 1 + a055396(divisors(n)[-2]) - a055396(n) # Indranil Ghosh, May 12 2017
  • Scheme
    (define (A286471 n) (if (or (= 1 n) (= 1 (A001222 n))) 0 (+ 1 (- (A055396 (A032742 n)) (A055396 n)))))
    

Formula

If n is noncomposite, then a(n) = 0, otherwise a(n) = 1 + A055396(A032742(n)) - A055396(n).
Showing 1-10 of 11 results. Next