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

A257728 Permutation of natural numbers: a(1)=1; a(2n) = not_an_oddprime(1+a(n)), a(2n+1) = oddprime(a(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 11, 9, 13, 10, 17, 12, 19, 14, 23, 18, 37, 15, 29, 21, 43, 16, 31, 26, 61, 20, 41, 28, 71, 22, 47, 34, 89, 27, 67, 52, 163, 24, 53, 42, 113, 32, 79, 60, 193, 25, 59, 45, 131, 38, 103, 84, 293, 30, 73, 57, 181, 40, 109, 95, 359, 33, 83, 65, 223, 49, 149, 119, 463, 39, 107, 91, 337, 72, 241, 209, 971, 35, 97, 74, 251, 58
Offset: 1

Views

Author

Antti Karttunen, May 09 2015

Keywords

Comments

Here oddprime(n) = n-th odd prime = A065091(n) = A000040(n+1), not_an_oddprime(n) = n-th natural number which is not an odd prime = A065090(n).
This sequence can be represented as a binary tree. Each left hand child is produced as A065090(1+n), and each right hand child as A065091(n), when a parent contains n >= 1:
|
...................1...................
2 3
4......../ \........5 6......../ \........7
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 11 9 13 10 17 12 19
14 23 18 37 15 29 21 43 16 31 26 61 20 41 28 71
etc.
Because all odd primes are odd, it means that even terms can only occur in even positions (together with odd composites, A071904, for each one of which there is a separate infinite cycle), while terms in odd positions are all odd.

Crossrefs

Inverse: A257727.
Related or similar permutations: A246377, A246378, A257726, A257729, A257802.
Differs from A255004 for the first time at n=17, where a(17) = 23, while A255004(17) = 15.

Programs

Formula

a(1) = 1; a(2n) = A065090(1+a(n)), a(2n+1) = A065091(a(n)).
As a composition of other permutations:
a(n) = A257729(A246378(n)).
a(n) = A257802(A257726(n)).

A257730 Permutation of natural numbers: a(1)=1; a(oddprime(n)) = prime(a(n)), a(not_an_oddprime(n)) = composite(a(n-1)).

Original entry on oeis.org

1, 4, 2, 9, 7, 6, 3, 16, 14, 12, 23, 8, 17, 26, 24, 21, 13, 35, 5, 15, 27, 39, 53, 36, 33, 22, 51, 10, 43, 25, 37, 40, 56, 75, 52, 49, 83, 34, 72, 18, 19, 62, 59, 38, 54, 57, 101, 78, 102, 74, 69, 114, 89, 50, 98, 28, 30, 86, 73, 82, 41, 55, 76, 80, 134, 106, 149, 135, 100, 94, 11, 150, 47, 120, 70, 130, 42, 45, 103, 117, 99, 112, 167, 58, 77
Offset: 1

Views

Author

Antti Karttunen, May 09 2015

Keywords

Comments

Here composite(n) = n-th composite = A002808(n), prime(n) = n-th prime = A000040(n), oddprime(n) = n-th odd prime = A065091(n) = A000040(n+1), not_an_oddprime(n) = n-th natural number which is not an odd prime = A065090(n).

Crossrefs

Inverse: A257729.
Related or similar permutations: A246378, A257727, A257732, A257801, A236854.

Formula

a(1) = 1; if A000035(n) = 1 and A010051(n) = 1 [i.e., when n is an odd prime], then a(n) = A000040(a(A000720(n)-1)), otherwise a(n) = A002808(a(A062298(n))). [Here A062298(n) gives the index of n among numbers larger than 1 which are not odd primes, 1 for 2, 2 for 4, 3 for 6, etc.]
As a composition of other permutations:
a(n) = A246378(A257727(n)).
a(n) = A257732(A257801(n)).

A257801 Permutation of natural numbers: a(1)=1; a(oddprime(n)) = lucky(1+a(n)), a(not_an_oddprime(n)) = unlucky(a(n-1)).

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 9, 6, 11, 8, 13, 14, 25, 10, 17, 12, 15, 19, 33, 20, 35, 16, 21, 24, 18, 22, 27, 45, 43, 28, 31, 47, 23, 29, 34, 26, 51, 30, 38, 59, 63, 57, 115, 39, 42, 61, 37, 32, 40, 46, 36, 66, 73, 41, 52, 78, 83, 76, 49, 146, 67, 53, 56, 81, 50, 44, 79, 54, 60, 48, 163, 86, 87, 95, 55, 68, 101, 107, 171, 98, 64
Offset: 1

Views

Author

Antti Karttunen, May 09 2015

Keywords

Comments

Here lucky(n) = n-th lucky number = A000959(n), unlucky(n) = n-th unlucky number = A050505(n), oddprime(n) = n-th odd prime = A065091(n), not_an_oddprime(n) = n-th natural number which is not an odd prime = A065090(n).

Crossrefs

Inverse: A257802.
Related or similar permutations: A257726, A257727, A257730, A257731.

Formula

a(1) = 1; a(2) = 2; if A010051(n) = 1 [i.e., when n is an (odd) prime] then a(n) = A000959(1+a(A000720(n)-1)), otherwise a(n) = A050505(a(A062298(n))).
As a composition of other permutations:
a(n) = A257726(A257727(n)).
a(n) = A257731(A257730(n)).
Showing 1-3 of 3 results.