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-8 of 8 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)

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

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

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

Original entry on oeis.org

0, 1, 2, 4, 3, 7, 9, 5, 6, 18, 14, 17, 12, 23, 10, 28, 8, 11, 36, 13, 21, 20, 34, 61, 27, 49, 46, 81, 15, 43, 63, 59, 16, 68, 22, 35, 54, 37, 26, 92, 42, 83, 45, 29, 51, 126, 122, 107, 32, 25, 98, 44, 69, 19, 162, 119, 30, 52, 86, 31, 84, 151, 118, 90, 24
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 contains also infinite cycles.

Crossrefs

Programs

Formula

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

Extensions

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

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

Original entry on oeis.org

0, 1, 2, 5, 4, 3, 10, 13, 8, 25, 6, 11, 20, 7, 26, 15, 16, 31, 50, 43, 12, 65, 22, 23, 40, 9, 14, 125, 52, 101, 30, 17, 32, 55, 62, 39, 100, 37, 86, 35, 24, 73, 130, 19, 44, 75, 46, 103, 80, 169, 18, 155, 28, 53, 250, 33, 104, 215, 202, 59, 60, 131, 34, 325, 64
Offset: 0

Views

Author

Antti Karttunen, Jan 04 2014

Keywords

Comments

The permutation satisfies A065091(a(n)) = a(A065091(n)) for all n >= 3, and is self-inverse: It swaps 3 & 5, maps all larger primes p_i (with index i > 3) to p_{a(i-1)+1}, and lets the multiplicativity take care of the rest.

Crossrefs

List below gives similarly constructed permutations, which all force a swap of two small numbers, with the composite numbers defined by the multiplicative property and the fact that (the rest of) primes are permuted with the sequence itself. Apart from the first one, all satisfy A000040(a(n)) = a(A000040(n)) except for a finite number of cases (with A234840, substitute A008578 for A000040):
A234840 (swaps 2 & 3).
A235199 (swaps 5 & 7).
A235201 (swaps 3 & 4).
A235487 (swaps 7 & 8).
A235489 (swaps 8 & 9).

Formula

For n < 3, a(n)=n, a(3)=5 and a(5)=3, a(p_i) = p_{a(i-1)+1} for primes with index i > 3, 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]

A235048 Permutation of nonnegative integers: a(n) = A234840(A235199(n)+1) - 1.

Original entry on oeis.org

0, 2, 1, 8, 18, 26, 60, 5, 3, 56, 37, 11, 280, 182, 10, 32, 100, 17, 4, 170, 28, 80, 1158, 53, 360, 1082, 7, 548, 121, 98, 156, 341, 21, 2528, 262, 35, 1810, 14, 561, 512, 9, 365, 58, 113, 525, 728, 408, 5432, 3720, 842, 43, 302, 540, 23, 208, 1025, 1090, 86, 57
Offset: 0

Views

Author

Antti Karttunen, Jan 10 2014

Keywords

Comments

Let b(n)=a(n), but with instead of a(3)=8 and a(4)=18, define b(3)=18 and b(4)=8 (i.e. otherwise same, but the values in positions 3 and 4 are swapped). The sequence b is then the permutation induced when A234744 is restricted to primes, and the indices of the reordered primes are collected: We have A049084(A234744(A000040(n))) = b(n) for all n. Or in other words, the permutation b completely determines the permutation A234744, because the latter is multiplicative. (Please see also comments there and at A234743.)

Crossrefs

Inverse: A235047. Cf. A234840, A235199, A234744.

Programs

Formula

a(n) = A234840(A235199(n)+1) - 1.
Showing 1-8 of 8 results.