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

A242378 Square array read by antidiagonals: to obtain A(i,j), replace each prime factor prime(k) in prime factorization of j with prime(k+i).

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 3, 1, 0, 4, 5, 5, 1, 0, 5, 9, 7, 7, 1, 0, 6, 7, 25, 11, 11, 1, 0, 7, 15, 11, 49, 13, 13, 1, 0, 8, 11, 35, 13, 121, 17, 17, 1, 0, 9, 27, 13, 77, 17, 169, 19, 19, 1, 0, 10, 25, 125, 17, 143, 19, 289, 23, 23, 1, 0, 11, 21, 49, 343, 19, 221, 23, 361, 29, 29, 1, 0
Offset: 0

Views

Author

Antti Karttunen, May 12 2014

Keywords

Comments

Each row i is a multiplicative function, being in essence "the i-th power" of A003961, i.e., A(i,j) = A003961^i (j). Zeroth power gives an identity function, A001477, which occurs as the row zero.
The terms in the same column have the same prime signature.
The array is read by antidiagonals: A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), ... .

Examples

			The top-left corner of the array:
  0,   1,   2,   3,   4,   5,   6,   7,   8, ...
  0,   1,   3,   5,   9,   7,  15,  11,  27, ...
  0,   1,   5,   7,  25,  11,  35,  13, 125, ...
  0,   1,   7,  11,  49,  13,  77,  17, 343, ...
  0,   1,  11,  13, 121,  17, 143,  19,1331, ...
  0,   1,  13,  17, 169,  19, 221,  23,2197, ...
...
A(2,6) = A003961(A003961(6)) = p_{1+2} * p_{2+2} = p_3 * p_4 = 5 * 7 = 35, because 6 = 2*3 = p_1 * p_2.
		

Crossrefs

Taking every second column from column 2 onward gives array A246278 which is a permutation of natural numbers larger than 1.
Transpose: A242379.
Row 0: A001477, Row 1: A003961 (from 1 onward), Row 2: A357852 (from 1 onward), Row 3: A045968 (from 7 onward), Row 4: A045970 (from 11 onward).
Column 2: A000040 (primes), Column 3: A065091 (odd primes), Column 4: A001248 (squares of primes), Column 6: A006094 (products of two successive primes), Column 8: A030078 (cubes of primes).
Excluding column 0, a subtable of A297845.
Permutations whose formulas refer to this array: A122111, A241909, A242415, A242419, A246676, A246678, A246684.

Formula

A(0,j) = j, A(i,0) = 0, A(i > 0, j > 0) = A003961(A(i-1,j)).
For j > 0, A(i,j) = A297845(A000040(i+1),j) = A297845(j,A000040(i+1)). - Peter Munn, Sep 02 2025

A246676 Permutation of natural numbers: a(n) = A242378(A007814(n), (1+A000265(n))) - 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 9, 14, 11, 24, 13, 26, 15, 10, 17, 20, 19, 34, 21, 44, 23, 48, 25, 32, 27, 124, 29, 80, 31, 12, 33, 74, 35, 54, 37, 62, 39, 76, 41, 38, 43, 174, 45, 134, 47, 120, 49, 50, 51, 64, 53, 98, 55, 342, 57, 104, 59, 624, 61, 242, 63, 16, 65, 56, 67, 244, 69, 224, 71, 90, 73, 68
Offset: 1

Views

Author

Antti Karttunen, Sep 01 2014

Keywords

Comments

To compute a(n) we shift its binary representation right as many steps k as necessary that the result were an odd number. Then one is added to that odd number, and the prime factorization of the resulting even number is shifted the same k number of steps towards larger primes, whose product is then decremented by one to get the final result.
In the essence, a(n) tells which number in array A246275 is at the same position where n is in the array A135764. As the topmost row in both arrays is A005408 (odd numbers), they are fixed, i.e. a(2n+1) = 2n+1 for all n.
Equally: a(n) tells which number in array A246273 is at the same position where n is in the array A054582, as they are the transposes of above two arrays.

Examples

			Consider n=36, "100100" in binary. It has to be shifted two bits right that the result were an odd number 9, "1001" in binary. We see that 9+1 = 10 = 2*5 = p_1 * p_3 [where p_k denotes the k-th prime, A000040(k)], and shifting this two steps towards larger primes results p_3 * p_5 = 5*11 = 55, thus a(36) = 55-1 = 54.
		

Crossrefs

Inverse: A246675.
Even bisection halved: A246680.
More recursed versions: A246678, A246684.
Other related permutations: A209268, A246273, A246275, A135764, A054582.

Programs

Formula

a(n) = A242378(A007814(n), (1+A000265(n))) - 1. [Where 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].
As a composition of related permutations:
a(n) = A246273(A209268(n)).
Other identities:
For all n >= 0, a(A005408(n)) = A005408(n). [Fixes the odd numbers].

A246684 "Caves of prime shift" permutation: a(1) = 1, a(n) = A242378(A007814(n), 2*a(A003602(n))) - 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 9, 14, 15, 24, 13, 26, 11, 10, 17, 20, 27, 34, 29, 80, 47, 48, 25, 32, 51, 124, 21, 44, 19, 12, 33, 74, 39, 54, 53, 98, 67, 76, 57, 104, 159, 624, 93, 404, 95, 120, 49, 50, 63, 64, 101, 152, 247, 342, 41, 38, 87, 174, 37, 62, 23, 16, 65, 56, 147, 244, 77, 188, 107, 90, 105, 374, 195, 324, 133, 170, 151, 142, 113, 92
Offset: 1

Views

Author

Antti Karttunen, Sep 06 2014

Keywords

Comments

See the comments in A246676. This is otherwise similar permutation, except that after having reached an odd number 2m-1 when we have shifted the binary representation of n right k steps, here, in contrary to A246676, we don't shift the primes in the prime factorization of the even number 2m, but instead of an even number (2*a(m)), shifting it the same number (k) of positions towards larger primes, whose product is then decremented by one to get the final result.
From Antti Karttunen, Jan 18 2015: (Start)
This can be viewed as an entanglement or encoding permutation where the complementary pairs of sequences to be interwoven together are even and odd numbers (A005843/A005408) which are entangled with another complementary pair: even numbers in the order they appear in A253885 and odd numbers in their usual order: (A253885/A005408).
From the above follows also that this sequence can be represented as a binary tree. Each child to the left is obtained by doubling the parent and subtracting one, and each child to the right is obtained by applying A253885 to the parent:
1
|
...................2...................
3 4
5......../ \........8 7......../ \........6
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
9 14 15 24 13 26 11 10
17 20 27 34 29 80 47 48 25 32 51 124 21 44 19 12
(End)

Examples

			Consider n=30, "11110" in binary. It has to be shifted just one bit-position right that the result were an odd number 15, "1111" in binary. As 15 = 2*8-1, we use 2*a(8) = 2*6 = 12 = 2*2*3 = p_1 * p_1 * p_2 [where p_k denotes the k-th prime, A000040(k)], which we shift one step towards larger primes resulting p_2 * p_2 * p_3 = 3*3*5 = 45, thus a(30) = 45-1 = 44.
		

Crossrefs

Inverse: A246683.
Other versions: A246676, A246678.
Similar or related permutations: A005940, A163511, A241909, A245606, A246278, A246375, A249814, A250243.
Differs from A249814 for the first time at n=14, where a(14) = 26, while A249814(14) = 20.

Programs

  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A246684(n) = { my(k=0); if(1==n, 1, while(!(n%2), n = n/2; k++); n = 2*A246684((n+1)/2); while(k>0, n = A003961(n); k--); n-1); };
    for(n=1, 8192, write("b246684.txt", n, " ", A246684(n)));
    (Scheme, with memoization-macro definec, two implementations)
    (definec (A246684 n) (cond ((<= n 1) n) (else (+ -1 (A242378bi (A007814 n) (* 2 (A246684 (A003602 n)))))))) ;; Code for A242378bi given in A242378.
    (definec (A246684 n) (cond ((<= n 1) n) ((even? n) (A253885 (A246684 (/ n 2)))) (else (+ -1 (* 2 (A246684 (/ (+ n 1) 2)))))))

Formula

a(1) = 1, a(n) = A242378(A007814(n), 2*a(A003602(n))) - 1. [Where 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(1) = 1, a(2n) = A253885(a(n)), a(2n+1) = (2*a(n+1))-1. - Antti Karttunen, Jan 18 2015
As a composition of other permutations:
a(n) = A250243(A249814(n)).
Other identities. For all n >= 1, the following holds:
a(n) = (1+a((2*n)-1))/2. [The odd bisection from a(1) onward with one added and then halved gives the sequence back].
For all n >= 0, the following holds: a(A000051(n)) = A000051(n). [Numbers of the form 2^n + 1 are among the fixed points].

A246677 Permutation of natural numbers: a(1) = 1, a(2n) = A000079(A055396(2n+1)-1) * ((2*A246277(2n+1))-1), a(2n+1) = 1 + 2*a(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 9, 16, 11, 32, 17, 10, 15, 64, 13, 128, 19, 18, 33, 256, 23, 12, 65, 14, 35, 512, 21, 1024, 31, 26, 129, 20, 27, 2048, 257, 42, 39, 4096, 37, 8192, 67, 22, 513, 16384, 47, 24, 25, 50, 131, 32768, 29, 36, 71, 66, 1025, 65536, 43, 131072, 2049, 38, 63, 52, 53, 262144, 259, 74, 41
Offset: 1

Views

Author

Antti Karttunen, Sep 01 2014

Keywords

Comments

See the comments in A246675. This is otherwise similar permutation, except for odd numbers, which are here recursively permuted by the emerging permutation itself. The even bisection halved gives A246679, the odd bisection from a(3) onward with one subtracted and then halved gives this sequence back.

Crossrefs

Inverse: A246678. Variants: A246675, A246683.
Even bisection halved: A246679.
a(n) differs from A156552(n+1) for the first time at n=32, where a(32) = 26, while A156552(33) = 34.

Formula

a(1) = 1, a(2n) = A000079(A055396(2n+1)-1) * ((2*A246277(2n+1))-1), a(2n+1) = 1 + 2*a(n).

A246680 Permutation of natural numbers, even bisection of A246676 halved: a(n) = A246676(2*n)/2.

Original entry on oeis.org

1, 2, 4, 3, 7, 12, 13, 5, 10, 17, 22, 24, 16, 62, 40, 6, 37, 27, 31, 38, 19, 87, 67, 60, 25, 32, 49, 171, 52, 312, 121, 8, 28, 122, 112, 45, 34, 137, 94, 71, 82, 42, 58, 269, 43, 437, 202, 84, 73, 47, 76, 59, 187, 162, 148, 665, 46, 192, 157, 1200, 55, 1562, 364, 9, 97, 57, 85, 423, 115, 612, 337, 93, 61, 72
Offset: 1

Views

Author

Antti Karttunen, Sep 02 2014

Keywords

Comments

Equally: even bisection of A246678 halved.

Crossrefs

Inverse: A246679.

Programs

Formula

a(n) = A246676(2*n)/2.
a(n) = A246678(2*n)/2.
Showing 1-5 of 5 results.