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-9 of 9 results.

A234840 Self-inverse and multiplicative permutation of integers: a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 2, a(p_i) = p_{a(i+1)-1} for primes with index i > 2, and a(u * v) = a(u) * a(v) for u, v > 0.

Original entry on oeis.org

0, 1, 3, 2, 9, 19, 6, 61, 27, 4, 57, 11, 18, 281, 183, 38, 81, 101, 12, 5, 171, 122, 33, 263, 54, 361, 843, 8, 549, 29, 114, 59, 243, 22, 303, 1159, 36, 1811, 15, 562, 513, 1091, 366, 157, 99, 76, 789, 409, 162, 3721, 1083, 202, 2529, 541, 24, 209, 1647, 10, 87, 31
Offset: 0

Views

Author

Antti Karttunen, Dec 31 2013

Keywords

Comments

The permutation satisfies A008578(a(n)) = a(A008578(n)) for all n, and is self-inverse.
The sequence of fixed points begins as 0, 1, 6, 11, 29, 36, 66, 95, 107, 121, 149, 174, 216, 313, 319, 396, 427, ... and is itself multiplicative in a sense that if a and b are fixed points, then also a*b is a fixed point.
The records are 0, 1, 3, 9, 19, 61, 281, 361, 843, 1159, 1811, 3721, 5339, 5433, 17141, 78961, 110471, 236883, 325679, ...
and they occur at positions 0, 1, 2, 4, 5, 7, 13, 25, 26, 35, 37, 49, 65, 74, 91, 169, 259, 338, 455, ...
(Note how the permutations map squares to squares, and in general keep the prime signature the same.)
Composition with similarly constructed A235199 gives the permutations A234743 & A234744 with more open cycle-structure.
The result of applying a permutation of the prime numbers to the prime factors of n. - Peter Munn, Dec 15 2019

Examples

			a(4) = a(2 * 2) = a(2)*a(2) = 3*3 = 9.
a(5) = a(p_3) = p_{a(3+1)-1} = p_{9-1} = p_8 = 19.
a(11) = a(p_5) = p_{a(5+1)-1} = p_{a(6)-1} = p_5 = 11.
		

Crossrefs

List below gives similarly constructed permutations, which all force a swap of two small numbers, with (the rest of) primes permuted with the sequence itself and the new positions of composite numbers defined by the multiplicative property. Apart from the first one, all satisfy A000040(a(n)) = a(A000040(n)) except for a finite number of cases (with A235200, substitute A065091 for A000040):
A235200 (swaps 3 & 5).
A235199 (swaps 5 & 7).
A235201 (swaps 3 & 4).
A235487 (swaps 7 & 8).
A235489 (swaps 8 & 9).
Properties preserved by the sequence as a function: A000005, A001221, A001222, A051903, A101296.
A007913, A007947, A008578, A019554, A055231, A059895, A059896, A059897 are used to express relationships between terms of this sequence.

Programs

  • Mathematica
    a[n_] := a[n] = Switch[n, 0, 0, 1, 1, 2, 3, 3, 2, _, Product[{p, e} = pe; Prime[a[PrimePi[p] + 1] - 1]^e, {pe, FactorInteger[n]}]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Nov 21 2021 *)
  • PARI
    A234840(n) = if(n<=1,n,my(f = factor(n)); for(i=1, #f~, if(2==f[i,1], f[i,1]++, if(3==f[i,1], f[i,1]--, f[i,1] = prime(-1+A234840(1+primepi(f[i,1])))))); factorback(f)); \\ Antti Karttunen, Aug 23 2018

Formula

a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 2, a(p_i) = p_{a(i+1)-1} for primes with index i > 2, and a(u * v) = a(u) * a(v) for u, v > 0.
From Peter Munn, Dec 14 2019. These identities would hold also if a(n) applied any other permutation of the prime numbers to the prime factors of n: (Start)
A000005(a(n)) = A000005(n).
A001221(a(n)) = A001221(n).
A001222(a(n)) = A001222(n).
A051903(a(n)) = A051903(n).
A101296(a(n)) = A101296(n).
a(A007913(n)) = A007913(a(n)).
a(A007947(n)) = A007947(a(n)).
a(A019554(n)) = A019554(a(n)).
a(A055231(n)) = A055231(a(n)).
a(A059895(n,k)) = A059895(a(n), a(k)).
a(A059896(n,k)) = A059896(a(n), a(k)).
a(A059897(n,k)) = A059897(a(n), a(k)).
(End)

A235201 Self-inverse and multiplicative permutation of integers: a(0)=0, a(1)=1, a(2)=2, a(3)=4 and a(4)=3, a(p_i) = p_{a(i)} for primes with index i > 2, and for composites > 4, a(u * v) = a(u) * a(v) for u, v > 0.

Original entry on oeis.org

0, 1, 2, 4, 3, 7, 8, 5, 6, 16, 14, 17, 12, 19, 10, 28, 9, 11, 32, 13, 21, 20, 34, 53, 24, 49, 38, 64, 15, 43, 56, 59, 18, 68, 22, 35, 48, 37, 26, 76, 42, 67, 40, 29, 51, 112, 106, 107, 36, 25, 98, 44, 57, 23, 128, 119, 30, 52, 86, 31, 84, 131, 118, 80, 27, 133, 136, 41, 33
Offset: 0

Views

Author

Antti Karttunen, Jan 11 2014

Keywords

Comments

The permutation satisfies A000040(a(n)) = a(A000040(n)) for all positive n except n=2, and is self-inverse. It swaps 3 & 4, maps any prime p_i with index i > 2 to p_{a(i)}, and lets the multiplicativity take care of the rest.
This can be viewed also as a "signature-permutation" for a bijection on non-oriented rooted trees, mapped through the Matula-Goebel numbers (cf. A061773). This bijection will swap the subtrees encoded by numbers 3 and 4, wherever they occur as the terminal configurations anywhere in the tree:
....................
.o..................
.|..................
.o.............o...o
.|..............\./.
.x.....<--->.....x..
.3...............4..
That is, the last two edges of any branch which ends with at least in two edges long unbranched stem, will be changed to a V-branch (two single edges in parallel). Vice versa, any terminal configuration in the tree that consists of more than one single edges next to each other (in "parallel") will be transformed so that maximal even number (2k) of those single edges will be combined to k unbranching stems of two edges, and an extra odd edge, if present, will stay as it is.
This permutation commutes with A235199, i.e. a(A235199(n)) = A235199(a(n)) for all n. This can be easily seen, when comparing the above bijection to the one described in A235199. Composition A235199 o A235201 works as a "difference" of these two bijections, swapping the above subconfigurations only when they do not occur alone at the tips of singular edges. (Which cases are encoded by Matula-Goebel numbers 5 and 7, the third and fourth prime respectively).
Permutation fixes n! for n=0, 1, 2, 4, 7.
Note that a(5!) = a(120) = 168 = 120+(2*4!) and a(8!) = a(40320) = 30240 = 40320-(2*7!).

Crossrefs

Composition with A235487 gives A235485/A235486, composition with A235489 gives A235493/A235494.
List below gives similarly constructed permutations, which all force a swap of two small numbers, with (the rest of) primes permuted with the sequence itself and the new positions of composite numbers defined by the multiplicative property:
A234840 (swaps 2 & 3, conjugates A008578 back to itself).
A235200 (swaps 3 & 5, conjugates A065091 back to itself).
A235199 (swaps 5 & 7, conjugates A000040 back to itself).
A235487 (swaps 7 & 8, conjugates A000040 back to itself).
A235489 (swaps 8 & 9, conjugates A000040 back to itself).

Formula

Multiplicative with a(3^k) = 2^(2k), a(2^(2k)) = 3^k, a(2^(2k+1)) = 2*3^k, a(p_i) = p_{a(i)} for primes with index i > 2, and for composites > 4, a(u * v) = a(u) * a(v) for u, v > 0.

A235199 Self-inverse and multiplicative permutation of integers: For n < 4, a(n)=n, a(5)=7 and a(7)=5, a(p_i) = p_{a(i)} for primes with index i > 4, and a(u * v) = a(u) * a(v) for u, v > 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 14, 17, 12, 13, 10, 21, 16, 11, 18, 19, 28, 15, 34, 23, 24, 49, 26, 27, 20, 43, 42, 59, 32, 51, 22, 35, 36, 37, 38, 39, 56, 41, 30, 29, 68, 63, 46, 73, 48, 25, 98, 33, 52, 53, 54, 119, 40, 57, 86, 31, 84, 61, 118, 45, 64, 91, 102
Offset: 0

Views

Author

Antti Karttunen, Jan 04 2014

Keywords

Comments

The permutation satisfies A000040(a(n)) = a(A000040(n)) for all positive n except n=3 or 4, and is self-inverse. It swaps 5 & 7, maps all larger primes p_i (with index i > 4) to p_{a(i)}, and lets the multiplicativity take care of the rest.
It can be viewed also as a "signature-permutation" for a bijection of non-oriented rooted trees, mapped through Matula-Goebel numbers (cf. A061773). The bijection will swap the subtrees encoded by primes 5 and 7, wherever they occur as the terminal branches of the tree:
....................
.o..................
.|..................
.o.............o...o
.|..............\./.
.o.....<--->.....o..
.|...............|..
.x...............x..
.5...............7..
That is, any branch which ends at least in three edges long unbranched stem, will be changed so that its last two edges will become V-branch. Vice versa, any branch of the tree that ends with three edges in Y-formation, will be transformed so that those three edges will be straightened to an unbranching stem of three edges.
This permutation commutes with A235201, i.e. a(A235201(n)) = A235201(a(n)) for all n.
Permutation fixes n! for n=0, 1, 2, 3, 4, 7, 8 and 9.
Note also that a(5!) = a(120) = 168 = 120+(2*4!) and a(10!) = 5080320 = 3628800+(4*9!).

Crossrefs

Composition with A234840 gives A234743 & A234744.
List below gives similarly constructed permutations, which all force a swap of two small numbers, with (the rest of) primes permuted with the sequence itself and the new positions of composite numbers defined by the multiplicative property:
A234840 (swaps 2 & 3, conjugates A008578 back to itself).
A235200 (swaps 3 & 5, conjugates A065091 back to itself).
A235201 (swaps 3 & 4, conjugates A000040 back to itself).
A235487 (swaps 7 & 8, conjugates A000040 back to itself).
A235489 (swaps 8 & 9, conjugates A000040 back to itself).

Formula

For n < 4, a(n)=n, a(5)=7 and a(7)=5, a(p_i) = p_{a(i)} for primes with index i > 4, and a(u * v) = a(u) * a(v) for u, v > 0.
A000035(a(n)) = A000035(n) = (n mod 2) for all n. [Even terms occur only on even indices and odd terms only on odd indices, respectively]

A234743 Multiplicative permutation of integers: a(n) = A235199(A234840(n)).

Original entry on oeis.org

0, 1, 3, 2, 9, 19, 6, 61, 27, 4, 57, 17, 18, 433, 183, 38, 81, 101, 12, 7, 171, 122, 51, 173, 54, 361, 1299, 8, 549, 43, 114, 31, 243, 34, 303, 1159, 36, 1811, 21, 866, 513, 733, 366, 157, 153, 76, 519, 613, 162, 3721, 1083, 202, 3897, 1193, 24, 323, 1647, 14, 129, 59, 342, 5
Offset: 0

Views

Author

Antti Karttunen, Jan 04 2014

Keywords

Comments

Consider two self-inverse and multiplicative permutations, b and c defined as follows:
b(0)=0, b(1)=1, b(2)=3, b(3)=2, b(p_i) = p_{b(i+1)-1} for primes with index i > 2, and b(u*v) = b(u)*b(v) for u, v > 0.
c(n)=n if n < 4, c(5)=7 and c(7)=5, c(p_i) = p_{c(i)} for primes with index i > 4, and c(u*v) = c(u)*c(v) for u, v > 0.
This permutation is defined as their composition: a(n) = c(b(n)) = A235199(A234840(n)).
It is also multiplicative: a(u*v) = c(b(u*v)) = c(b(u)*b(v)) = c(b(u))*c(b(v)) = a(u)*a(v). For primes p_i with index i, a(p_i) = c(b(p_i)) = c(p_{b(i+1)-1}) = p_{c(b(i+1)-1)} = A000040(A235047(i)), except for cases i=8 and i=18, use 7 and 5, instead of 5 and 7.
Because 22 = 2*11, and 2 is in a two-cycle and 11 is in a three-cycle, 22 is in a cycle whose length is lcm(2,3) = 6: a(22)=51 (= a(2)*a(11) = 3*17), a(51)=202, a(202)=33, a(33)=34, a(34)=303, a(303)=22.
Among primes, there are at least fixed points (31), two-cycles (2 <-> 3), (37 <-> 1811), three-cycles: (11, 17, 101), (29, 43, 157), four-cycles: (5, 19, 7, 61), (41, 733, 359, 1091), eight-cycles: (47, 613, 2593, 1163, 1733, 409, 73, 131).
How long is the cycle beginning from 13, a(13)=433, a(433)=20693, a(20693)=? or from 23? (23, 173, 24043, ...)
Question: Are there any infinite cycles? If there are, what is the ratio of terms (primes) in finite cycles vs. infinite cycles?

Crossrefs

Inverse: A234744. Similarly composed multiplicative permutations, but with more tractable cycle structures: A235485/A235486, A235493/A235494.

Formula

a(n) = A235199(A234840(n)).
A000035(a(n)) = A000035(A234840(n)) = A000035(A064614(n)) = A011655(n) = for all n.

A235485 Permutation of natural numbers: a(n) = A235201(A235487(n)).

Original entry on oeis.org

0, 1, 2, 4, 3, 7, 8, 6, 5, 16, 14, 17, 12, 19, 9, 28, 10, 13, 32, 11, 21, 24, 34, 53, 20, 49, 38, 64, 18, 43, 56, 59, 15, 68, 26, 42, 48, 37, 22, 76, 35, 67, 36, 23, 51, 112, 106, 107, 40, 27, 98, 52, 57, 29, 128, 119, 30, 44, 86, 41, 84, 131, 118, 96, 25, 133, 136, 31, 39, 212, 63, 73, 80
Offset: 0

Views

Author

Antti Karttunen, Jan 11 2014

Keywords

Comments

The permutation satisfies A000040(a(n)) = a(A000040(n)) for all positive n except n=2 and n=4.
This permutation has only finite cycles: numbers 0, 1, 2, 3, ... are in the cycles of size: 1, 1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 3, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 5, 5, 1, 4, 4, 5, 4, 5, 4, 4, 2, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 7, 4, 4, 7, 4, 4, 4, 4, 4, 4, 7, 3, 7, 3, 1, ...
The first number with cycle size 1 (i.e., fixed point) is 0, the first in a 2-cycle is 3 (as a(3) = 4, a(4) = 3), the first in 3-cycle is 20, the first in 4-cycle is 5, the first in 5-cycle is 35, in 6-cycle 213, in 7-cycle 60, in 8-cycle and 9-cycle (no terms among 0..10080), the first in 10-cycle: 447, the first in 12-cycle: 220, in 14-cycle: 843, in 15-cycle: 2485, in 20-cycle: 385.
Please compare to the cycle structure of A235493/A235494.
Also of interest is the number of separate cycles (orbits) and fixed points among each A000081(n) rooted non-oriented trees when this bijection is applied to them, as trees encoded by Matula-Goebel numbers (cf. A061773).

Crossrefs

Programs

Formula

a(n) = A235201(A235487(n)).
As a recurrence:
a(0)=0, a(1)=1, a(2)=2,
a(3*n) = 4*a(n),
a(8*n) = 5*a(n),
a(4*n) = 3*a(n) [when n is odd],
a(14*n) = 9*a(n),
a(49*n) = 27*a(n),
a(7*n) = 6*a(n) [when n is odd and not divisible by 7],
a(p_i) = p_{a(i)} for primes whose index i is neither 2 nor 4 [primes other than 3 or 7],
and
a(u * v) = a(u) * a(v) for other composite cases.

Extensions

Name and incorrect claim about multiplicativity corrected by Antti Karttunen, Feb 12 2018

A235486 Permutation of natural numbers: a(n) = A235487(A235201(n)).

Original entry on oeis.org

0, 1, 2, 4, 3, 8, 7, 5, 6, 14, 16, 19, 12, 17, 10, 32, 9, 11, 28, 13, 24, 20, 38, 43, 21, 64, 34, 49, 15, 53, 56, 67, 18, 76, 22, 40, 42, 37, 26, 68, 48, 59, 35, 29, 57, 112, 86, 131, 36, 25, 128, 44, 51, 23, 98, 152, 30, 52, 106, 31, 96, 107, 134, 70, 27, 136, 133, 41, 33, 172, 80, 89, 84
Offset: 0

Views

Author

Antti Karttunen, Jan 11 2014

Keywords

Comments

See comments at A235485.

Crossrefs

Inverse: A235485. Cf. also A235201, A235487, A235493/A235494.

Programs

Formula

a(n) = A235487(A235201(n)).

Extensions

Name and incorrect claim about multiplicativity corrected by Antti Karttunen, Feb 12 2018

A235493 Permutation of natural numbers: a(n) = A235201(A235489(n)).

Original entry on oeis.org

0, 1, 2, 4, 3, 7, 8, 5, 16, 6, 14, 17, 12, 19, 10, 28, 32, 11, 9, 53, 21, 20, 34, 13, 64, 49, 38, 24, 15, 43, 56, 59, 48, 68, 22, 35, 18, 37, 106, 76, 112, 67, 40, 29, 51, 42, 26, 107, 128, 25, 98, 44, 57, 131, 36, 119, 80, 212, 86, 31, 84, 23, 118, 30, 256
Offset: 0

Views

Author

Antti Karttunen, Jan 11 2014

Keywords

Comments

The permutation satisfies A000040(a(n)) = a(A000040(n)) for all positive n except for n=2.
In contrast to A235485/A235486 this permutation also contains infinite cycles.

Crossrefs

Programs

Formula

a(n) = A235201(A235489(n)).

Extensions

Name and incorrect claim about multiplicativity corrected by Antti Karttunen, Feb 12 2018

A234744 Multiplicative permutation of integers: a(n) = A234840(A235199(n)).

Original entry on oeis.org

0, 1, 3, 2, 9, 61, 6, 19, 27, 4, 183, 101, 18, 281, 57, 122, 81, 11, 12, 5, 549, 38, 303, 263, 54, 3721, 843, 8, 171, 157, 366, 31, 243, 202, 33, 1159, 36, 1811, 15, 562, 1647, 1091, 114, 29, 909, 244, 789, 131, 162, 361, 11163, 22, 2529, 541, 24, 6161, 513, 10, 471, 59, 1098, 7
Offset: 0

Views

Author

Antti Karttunen, Jan 04 2014

Keywords

Comments

Please see the comments at A234743. The observations given there apply also here.

Crossrefs

Inverse: A234743. Similarly composed multiplicative permutations, with more tractable cycle structures: A235485/A235486, A235493/A235494.

Programs

Formula

a(n) = A234840(A235199(n)).
Multiplicative with a(p_i) = p_{A235048(i)} for primes with index i, except for cases i=3 and i=4, use p_18 and p_8 (61 and 19) instead of 19 and 61. For the composites, the value is determined as: a(u*v) = a(u) * a(v).

A235489 Self-inverse and multiplicative permutation of integers: For n < 8, a(n) = n, a(8)=9 and a(9)=8, a(p_i) = p_{a(i)} for primes with index i, and for composites > 9, a(u*v) = a(u) * a(v).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 11 2014

Keywords

Comments

The permutation satisfies A000040(a(n)) = a(A000040(n)) for all positive n, and is self-inverse. It swaps 8 & 9, maps any prime p_i with index i to p_{a(i)}, and lets the multiplicativity take care of the rest.
This can be viewed also as a "signature-permutation" for a bijection of non-oriented rooted trees, mapped through Matula-Goebel numbers (cf. A061773). This bijection will swap the subtrees encoded by numbers 8 and 9, wherever they occur as the terminal branches of the tree:
.......................
.................o...o.
.................|...|.
.o.o.o...........o...o.
..\|/.............\./..
...x.....<--->.....x...
...8...............9...
Thus, any terminal configuration in the tree that consists of three or more single edges next to each other (in "parallel") will be transformed so that maximal 3k number of those single edges will be replaced by k subtrees Matula-Goebel-encoded by 9 (see above, or equally: replaced by 2k two-edges-long branches encoded by 3), and one or two left-over single edges, if present, will stay as they are. Vice versa, any terminal configuration in the tree that consists of more than one two-edges-long branches next to each other (in "parallel") will be transformed so that maximal even number (2k) of those double-edges will be replaced by 3k single edges, and an extra odd double-edge, if present, will stay as it is.
Note how in contrast to A235487, A235201 and A235199, this bijection is not size-preserving (the number of edges will change), which has implications when composing this with other such permutations (cf. e.g. A235493/A235494).

Crossrefs

Composition with A235201 gives A235493/A235494.
List below gives similarly constructed permutations, which all force a swap of two small numbers, with (the rest of) primes permuted with the sequence itself and the new positions of composite numbers defined by the multiplicative property:
A234840 (swaps 2 & 3, conjugates A008578 back to itself).
A235200 (swaps 3 & 5, conjugates A065091 back to itself).
A235201 (swaps 3 & 4, conjugates A000040 back to itself).
A235199 (swaps 5 & 7, conjugates A000040 back to itself).
A235487 (swaps 7 & 8, conjugates A000040 back to itself).

Formula

Multiplicative with a(3^(2k)) = 2^3k = 8^k, a(3^(2k+1)) = 3*2^3k, a(2^(3k)) = 3^2k = 9^k, a(2^(3k+1)) = 2*9^k, a(2^(3k+2)) = 4*9^k, a(p_i) = p_{a(i)} for primes with index i, and a(u*v) = a(u) * a(v) for composites other than 8 or 9.
Showing 1-9 of 9 results.