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

A069799 The number obtained by reversing the sequence of nonzero exponents in the prime factorization of n with respect to distinct primes present, as ordered by their indices.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 18, 13, 14, 15, 16, 17, 12, 19, 50, 21, 22, 23, 54, 25, 26, 27, 98, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 250, 41, 42, 43, 242, 75, 46, 47, 162, 49, 20, 51, 338, 53, 24, 55, 686, 57, 58, 59, 150, 61, 62, 147, 64, 65
Offset: 1

Views

Author

Amarnath Murthy, Apr 13 2002

Keywords

Comments

Equivalent description nearer to the old name: a(n) is a number obtained by reversing the indices of the primes present in the prime factorization of n, from the smallest to the largest, while keeping the nonzero exponents of those same primes at their old positions.
This self-inverse permutation of natural numbers fixes the numbers in whose prime factorization the sequence of nonzero exponents form a palindrome: A242414.
Integers which are changed are A242416.
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 vertical line segments of the "steps" in Young (or Ferrers) diagram of a partition, but keeps the order of horizontal line segments intact. Please see the last example in the example section.

Examples

			a(24) = 54 as 24 = p_1^3 * p_2^1 = 2^3 * 3^1 and 54 = p_1^1 * p_2^3 = 2 * 3^3.
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 vertical line segment lengths (3,2,1)  to (1,2,3), but keeping the order of horizontal line segment lengths as (1,2,2), we get a new Young diagram
   _
  | |_ _
  |     |
  |     |_ _
  |         |
  |         |
  |_ _ _ _ _|
which represents the partition (1,3,3,5,5,5), encoded in A112798 by p_1 * p_3^2 * p_5^3 = 2 * 5^2 * 11^3 = 66550, thus a(2200) = 66550.
		

Crossrefs

A242414 gives the fixed points and A242416 is their complement.
{A000027, A069799, A242415, A242419} form a 4-group.
The set of permutations {A069799, A105119, A225891} generates an infinite dihedral group.

Programs

  • Haskell
    a069799 n = product $
                zipWith (^) (a027748_row n) (reverse $ a124010_row n)
    -- Reinhard Zumkeller, Apr 27 2013
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A069799 n) (let ((pf (ifactor n))) (apply * (map expt (uniq pf) (reverse (multiplicities pf))))))
    (define (ifactor n) (cond ((< n 2) (list)) (else (sort (factor n) <))))
    (define (uniq lista) (let loop ((lista lista) (z (list))) (cond ((null? lista) (reverse! z)) ((and (pair? z) (equal? (car z) (car lista))) (loop (cdr lista) z)) (else (loop (cdr lista) (cons (car lista) z))))))
    (define (multiplicities lista) (let loop ((mults (list)) (lista lista) (prev #f)) (cond ((not (pair? lista)) (reverse! mults)) ((equal? (car lista) prev) (set-car! mults (+ 1 (car mults))) (loop mults (cdr lista) prev)) (else (loop (cons 1 mults) (cdr lista) (car lista))))))
    ;; Antti Karttunen, May 24 2014
    
  • Maple
    A069799 := proc(n) local e,j; e := ifactors(n)[2]:
    mul (e[j][1]^e[nops(e)-j+1][2], j=1..nops(e)) end:
    seq (A069799(i), i=1..40);
    # Peter Luschny, Jan 17 2011
  • Mathematica
    f[n_] := Block[{a = Transpose[ FactorInteger[n]], m = n}, If[ Length[a] == 2, Apply[ Times, a[[1]]^Reverse[a[[2]] ]], m]]; Table[ f[n], {n, 1, 65}]
  • PARI
    a(n) = {my(f = factor(n)); my(g = f); my(nbf = #f~); for (i=1, nbf, g[i, 1] = f[nbf-i+1, 1];); factorback(g);} \\ Michel Marcus, Jul 02 2015

Formula

If n = p_a^e_a * p_b^e_b * ... * p_j^e_j * p_k^e_k, where p_a < ... < p_k are distinct primes of the prime factorization of n (sorted into ascending order), and e_a, ..., e_k are their nonzero exponents, then a(n) = p_a^e_k * p_b^e_j * ... * p_j^e_b * p_k^e_a.
a(n) = product(A027748(o(n)+1-k)^A124010(k): k=1..o(n)) = product(A027748(k)^A124010(o(n)+1-k): k=1..o(n)), where o(n) = A001221(n). - Reinhard Zumkeller, Apr 27 2013
From Antti Karttunen, Jun 01 2014: (Start)
Can be obtained also by composing/conjugating related permutations:
a(n) = A242415(A242419(n)) = A242419(A242415(n)).
(End)

Extensions

Edited, corrected and extended by Robert G. Wilson v and Vladeta Jovovic, Apr 15 2002
Definition corrected by Reinhard Zumkeller, Apr 27 2013
Definition again reworded, Comments section edited and Young diagram examples added by Antti Karttunen, May 30 2014

A243505 Permutation of natural numbers, take the odd bisection of A122111 and divide the largest prime factor out: a(n) = A052126(A122111(2n-1)).

Original entry on oeis.org

1, 2, 4, 8, 3, 16, 32, 6, 64, 128, 12, 256, 9, 5, 512, 1024, 24, 18, 2048, 48, 4096, 8192, 10, 16384, 27, 96, 32768, 36, 192, 65536, 131072, 20, 72, 262144, 384, 524288, 1048576, 15, 54, 2097152, 7, 4194304, 144, 768, 8388608, 108, 1536, 288, 16777216, 40, 33554432, 67108864, 30
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A052126(A122111((2*n)-1)).
a(n) = A122111((2*n)-1) / A105560((2*n)-1).
As a composition of related permutations:
a(n) = A122111(A064216(n)).
a(n) = A241916(A243065(n)).
Other identities:
For all n >= 2, a(n) = A070003(A244984(n)-1) / A105560((2*n)-1).
For all n >= 1, a(A006254(n)) = A000079(n) and a(A007051(n)) = A000040(n).
For all n >= 1, A105560(2n-1) divides a(n).

A253566 Permutation of natural numbers: a(n) = A243071(A122111(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 7, 5, 12, 16, 14, 32, 24, 10, 15, 64, 13, 128, 28, 20, 48, 256, 30, 9, 96, 11, 56, 512, 26, 1024, 31, 40, 192, 18, 29, 2048, 384, 80, 60, 4096, 52, 8192, 112, 22, 768, 16384, 62, 17, 25, 160, 224, 32768, 27, 36, 120, 320, 1536, 65536, 58, 131072, 3072, 44, 63, 72, 104, 262144, 448, 640, 50, 524288, 61, 1048576, 6144, 21
Offset: 1

Views

Author

Antti Karttunen, Jan 03 2015

Keywords

Comments

Note the indexing: domain starts from one, while the range includes also zero. See also comments in A253564.
The a(n)-th composition in standard order (graded reverse-lexicographic, A066099) is one plus the first differences of the weakly increasing sequence of prime indices of n with 1 prepended. See formula for a simplification. The triangular form is A358169. The inverse is A253565. Not prepending 1 gives A358171. For Heinz numbers instead of standard compositions we have A325351 (without prepending A325352). - Gus Wiseman, Dec 23 2022

Examples

			From _Gus Wiseman_, Dec 23 2022: (Start)
This represents the following bijection between partitions and compositions. The reversed prime indices of n together with the a(n)-th composition in standard order are:
   1:        () -> ()
   2:       (1) -> (1)
   3:       (2) -> (2)
   4:     (1,1) -> (1,1)
   5:       (3) -> (3)
   6:     (2,1) -> (1,2)
   7:       (4) -> (4)
   8:   (1,1,1) -> (1,1,1)
   9:     (2,2) -> (2,1)
  10:     (3,1) -> (1,3)
  11:       (5) -> (5)
  12:   (2,1,1) -> (1,1,2)
  13:       (6) -> (6)
  14:     (4,1) -> (1,4)
  15:     (3,2) -> (2,2)
  16: (1,1,1,1) -> (1,1,1,1)
(End)
		

Crossrefs

Inverse: A253565.
Applying A000120 gives A001222.
A reverse version is A156552, inverse essentially A005940.
The inverse is A253565, triangular form A242628.
The triangular form is A358169.
A048793 gives partial sums of reversed standard comps, Heinz number A019565.
A066099 lists standard compositions, lengths A000120, sums A070939.
A112798 list prime indices, sum A056239.
A358134 gives partial sums of standard compositions, Heinz number A358170.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    stcinv/@Table[Differences[Prepend[primeMS[n],1]]+1,{n,100}] (* Gus Wiseman, Dec 23 2022 *)
  • Scheme
    (define (A253566 n) (A243071 (A122111 n)))

Formula

a(n) = A243071(A122111(n)).
As a composition of other permutations:
a(n) = A054429(A253564(n)).
a(n) = A336120(n) + A336125(n). - Antti Karttunen, Jul 18 2020
If 2n = Product_{i=1..k} prime(x_i) then a(n) = Sum_{i=1..k-1} 2^(x_k-x_{k-i}+i-1). - Gus Wiseman, Dec 23 2022

A243503 Sums of parts of partitions (i.e., their sizes) as ordered in the table A241918: a(n) = Sum_{i=A203623(n-1)+2..A203623(n)+1} A241918(i).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 05 2014

Keywords

Comments

Each n occurs A000041(n) times in total.
Where are the first and the last occurrence of each n located?

Crossrefs

Cf. A243504 (the products of parts), A241918, A000041, A227183, A075158, A056239, A241909.
Sum of prime indices of A241916, the even bisection of A358195.
Sums of even-indexed rows of A358172.
A112798 lists prime indices, length A001222, sum A056239, max A061395.

Programs

  • Mathematica
    Table[If[n==1,0,With[{y=Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]},Last[y]*Length[y]+Last[y]-Total[y]+Length[y]-1]],{n,100}] (* Gus Wiseman, Jan 09 2023 *)

Formula

a(n) = Sum_{i=A203623(n-1)+2..A203623(n)+1} A241918(i).
a(n) = A056239(A241909(n)).
a(n) = A227183(A075158(n-1)).
a(A000040(n)) = a(A000079(n)) = n for all n >= 1.
a(A122111(n)) = a(n) for all n.
a(A243051(n)) = a(n) for all n, and likewise for A243052, A243053 and other rows of A243060.
a(n) = A061395(n) * A001222(n) + A061395(n) - A056239(n) + A001222(n) - 1. - Gus Wiseman, Jan 09 2023
a(n) = A326844(2n) + A001222(n). - Gus Wiseman, Jan 09 2023

A243506 Permutation of natural numbers: a(n) = A048673(A122111(n)).

Original entry on oeis.org

1, 2, 5, 3, 14, 8, 41, 4, 13, 23, 122, 11, 365, 68, 38, 6, 1094, 18, 3281, 32, 113, 203, 9842, 17, 63, 608, 25, 95, 29525, 53, 88574, 7, 338, 1823, 188, 28, 265721, 5468, 1013, 50, 797162, 158, 2391485, 284, 74, 16403, 7174454, 20, 313, 88, 3038, 851, 21523361, 39, 563, 149, 9113, 49208, 64570082, 83, 193710245, 147623, 221, 9
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2014

Keywords

Crossrefs

Inverse: A243505.
Related or similar permutations: A048673, A122111, A243065-A243066, A244981-A244982, A244983-A244984, A244153-A244154.

Programs

Formula

a(n) = A048673(A122111(n)).
a(n) = A243066(A241916(n)).
For all n >= 1, a(A000040(n)) = A007051(n) and a(A000079(n)) = A006254(n).

A358195 Heinz number of the partial sums plus one of the reversed first differences of the prime indices of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 9, 1, 7, 3, 8, 1, 6, 1, 25, 5, 11, 1, 27, 2, 13, 4, 49, 1, 15, 1, 16, 7, 17, 3, 18, 1, 19, 11, 125, 1, 35, 1, 121, 9, 23, 1, 81, 2, 10, 13, 169, 1, 12, 5, 343, 17, 29, 1, 75, 1, 31, 25, 32, 7, 77, 1, 289, 19, 21, 1, 54, 1, 37
Offset: 1

Views

Author

Gus Wiseman, Dec 23 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
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.
The partial sums of first differences of a sequence telescope to "rest minus first", leading to the formula.

Examples

			The prime indices of 36 are (1,1,2,2), differences (0,1,0), reversed (0,1,0), partial sums (0,1,1), plus one (1,2,2), Heinz number 18, so a(36) = 18.
		

Crossrefs

The even bisection is A241916.
The unreversed version is A246277.
Sum of prime indices of a(n) is A326844(n) + A001222(n) - 1.
A048793 gives partial sums of reversed standard comps, Heinz number A019565.
A112798 list prime indices, sum A056239.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    osq[q_]:=1+Accumulate[Reverse[Differences[q]]];
    Table[Times@@Prime/@osq[primeMS[n]],{n,20}]

Formula

If n = Product_{i=1..k} prime(x_i) then a(n) = Product_{i=1..k-1} prime(x_k-x_{k-i}+1).

A359360 Length times minimum part of the integer partition with Heinz number n. Least prime index of n times number of prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Dec 28 2022

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). A prime index of n is a number m such that prime(m) divides n.

Examples

			The partition with Heinz number 7865 is (6,5,5,3), so a(7865) = 4*3 = 12.
		

Crossrefs

Difference of A056239 and A359358.
The opposite version is A326846.
A055396 gives minimum prime index, maximum A061395.
A112798 list prime indices, length A001222, sum A056239.
A243055 subtracts the least prime index from the greatest.
A358195 gives Heinz numbers of rows of A358172, even bisection A241916.

Programs

  • Mathematica
    Table[PrimeOmega[n]*PrimePi[FactorInteger[n][[1,1]]],{n,100}]
  • PARI
    a(n) = if (n==1, 0, my(f=factor(n)); bigomega(f)*primepi(f[1, 1])); \\ Michel Marcus, Dec 28 2022

Formula

a(n) = A001222(n) * A055396(n).

A331595 a(n) = gcd(A122111(n), A241909(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 3, 16, 5, 3, 3, 32, 5, 64, 3, 18, 7, 128, 15, 256, 5, 18, 3, 512, 7, 3, 3, 5, 5, 1024, 15, 2048, 11, 18, 3, 18, 7, 4096, 3, 18, 7, 8192, 15, 16384, 5, 50, 3, 32768, 11, 3, 45, 18, 5, 65536, 7, 108, 7, 18, 3, 131072, 7, 262144, 3, 50, 13, 108, 15, 524288, 5, 18, 45, 1048576, 11, 2097152, 3, 15, 5, 18, 15, 4194304, 11, 7, 3
Offset: 1

Views

Author

Antti Karttunen, Jan 22 2020

Keywords

Crossrefs

Cf. A122111, A241909, A241916, A331596 (number of distinct prime factors), A331597, A331598, A331599, A331600.
Cf. also A280489, A280491.

Programs

  • Mathematica
    Array[If[# == 1, 1, GCD @@ {Block[{k = #, m = 0}, Times @@ Power @@@ Table[k -= m; k = DeleteCases[k, 0]; {Prime@ Length@ k, m = Min@ k}, Length@ Union@ k]] &@ Catenate[ConstantArray[PrimePi[#1], #2] & @@@ #], Function[t, Times @@ Prime@ Accumulate[If[Length@ t < 2, {0}, Join[{1}, ConstantArray[0, Length@ t - 2], {-1}]] + ReplacePart[t, Map[#1 -> #2 & @@ # &, #]]]]@ ConstantArray[0, Transpose[#][[1, -1]]] &[# /. {p_, e_} /; p > 0 :> {PrimePi@ p, e}]} &@ FactorInteger[#]] &, 82] (* Michael De Vlieger, Jan 24 2020, after JungHwan Min at A122111 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
    A241909(n) = if(1==n||isprime(n),2^primepi(n),my(f=factor(n),h=1,i,m=1,p=1,k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k,1]); m *= p^(i-h); h = i; if(f[k,2]>1, f[k,2]--, k++)); (p*m));
    A331595(n) = gcd(A122111(n), A241909(n));

Formula

a(n) = gcd(A122111(n), A241909(n)).
a(A241916(n)) = a(n).

A137502 Reverse sequence of powers in prime decomposition of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 10, 2, 18, 2, 14, 6, 16, 2, 12, 2, 50, 10, 22, 2, 54, 4, 26, 8, 98, 2, 30, 2, 32, 14, 34, 6, 36, 2, 38, 22, 250, 2, 70, 2, 242, 18, 46, 2, 162, 4, 20, 26, 338, 2, 24, 10, 686, 34, 58, 2, 150, 2, 62, 50, 64, 14, 154, 2, 578, 38, 42, 2, 108, 2, 74, 12, 722, 6, 286
Offset: 1

Views

Author

Philippe Lallouet (philip.lallouet(AT)orange.fr), Apr 22 2008

Keywords

Comments

The term a(1) = 1 added on the grounds that as 1 has an empty prime factorization, it stays same when reversed. - Antti Karttunen, May 20 2014
In the prime decomposition of n we use all the primes up to the highest prime divisor, exponents of zero being allowed except for the largest prime.
If n = (p(1)^e1)*(p(2)^e2)*.......*(p(k)^ek) (ek>0, other ei>=0 and p(n) = n-th prime) then we reverse the sequence e1, e2 , ..., ek to build a(n): a(n) = (p(1)^ek)*(p(2)^e(k-1))* . . . . *(p(k)^e1)
As p(1)=2 and ek is never zero for n>1, a(n) is always even for n>1.
If n is prime then a(n) = 2 and if n is a power of prime, a(n) is the same power of 2.
(That is, a(A000961(n)) = A000079(A025474(n)) for all n.) - Antti Karttunen, May 20 2014.
If the sequence e1, e2, ..., ek is palindromic, a(n)=n. (A242418 gives such n).
For any given even number Q, we can by reversing the sequence of its powers define not only one but an infinity (by adding as many zeros as we want on the left end) of n such that a(n) = Q. Hence the sequence is a permutation of even integers where each even integer is infinitely repeated.
For example as Q = 1224 = (2^3)*(3^2)*(5^0)*(7^0)*(11^0)*(13^0)*(17^1),
Q = a((2^1)*(3^0)*(5^0)*(7^0)*(11^0)*(13^2)*(17^3)) = a(1660594) but also of an infinity of other ones, the first one being a((2^0)*(3^1)*(5^0)*(7^0)*(11^0)*(13^0)*(17^2)*(19^1)) = a(5946753).
Please see A241916 for a variant which results an ordinary permutation of all natural numbers. - Antti Karttunen, May 20 2014

Examples

			As 9 = (2^0)*(3^2), hence a(9) = (2^2)*(3^0) = 4.
As 50 = (2^1)*(3^0)*(5^2), hence a(50) = (2^2)*(3^0)*(5^1) = 2*2*5 = 20.
As 57 = (2^0)*(3^1)*(5^0)*(7^0)*(11^0)*(13^0)*(17^0)*(19^1), hence a(57) = (2^1)*(3^0)*(5^0)*(7^0)*(11^0)*(13^0)*(17^1)*(19^0) = 2*17 = 34.
		

Crossrefs

A242418 gives the fixed points.

Programs

  • Mathematica
    f[n_] := If[n == 1, {0}, Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> Last@ # &, f]]@ FactorInteger@ n]; g[w_List] := Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, w]; Table[g@ Reverse@ f@ n, {n, 120}] (* Michael De Vlieger, Aug 27 2016 *)
  • Scheme
    (define (A137502 n) (if (< n 2) n (/ (* 2 (A241916 n)) (A006530 n)))) ;; Antti Karttunen, May 20 2014

Formula

a(1) = 1, and for n>1, a(n) = 2*A241916(n) / A006530(n). - Antti Karttunen, May 20 2014

Extensions

Edited by N. J. A. Sloane, Jan 16 2009.
Term a(1)=1 prepended, and erroneous terms (first at n=50) corrected, Antti Karttunen, May 20 2014

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
Previous Showing 11-20 of 29 results. Next