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.

A257725 Permutation of natural numbers: a(0) = 0, a(lucky(n)) = 1 + 2*a(n-1), a(unlucky(n)) = 2*a(n), where lucky(n) = n-th lucky number A000959, unlucky(n) = n-th unlucky number A050505.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 5, 12, 7, 16, 10, 24, 9, 14, 13, 32, 20, 48, 18, 28, 17, 26, 64, 40, 11, 96, 36, 56, 34, 52, 25, 128, 15, 80, 22, 192, 33, 72, 112, 68, 104, 50, 21, 256, 30, 160, 44, 384, 49, 66, 19, 144, 224, 136, 208, 100, 42, 512, 60, 320, 88, 768, 29, 98, 132, 38, 27, 288, 65, 448, 272, 416, 41, 200, 97, 84, 1024, 120, 37
Offset: 0

Views

Author

Antti Karttunen, May 06 2015

Keywords

Comments

In other words, after a(0) = 0, if n is the k-th lucky number [i.e., n = A000959(k)], a(n) = 1 + 2*a(k-1); otherwise, when n is the k-th unlucky number [i.e., n = A050505(k)], a(n) = 2*a(k).
Because all lucky numbers are odd, it means that odd numbers occur in odd positions only (together with some even numbers, for each one of which there is a separate infinite cycle), while the even positions contain only even numbers.

Crossrefs

Inverse: A257726.
Related or similar permutations: A237427, A246377, A257732, A257734.
Cf. also A257690 (another similar permutation, but with a slightly different definition, resulting the first differing term at n=13, where a(13) = 9, while A257690(13) = 11).
Cf. also A257735 - A257738.

Formula

a(0) = 0; for n >= 1: if A145649(n) = 1 [i.e., if n is lucky], then a(n) = 1+(2*a(A109497(n)-1)), otherwise a(n) = 2*a(n-A109497(n)). [Where A109497(n) gives the number of lucky numbers <= n.]
As a composition of other permutations. For all n >= 1:
a(n) = A246377(A257732(n)).
a(n) = A237427(A257734(n)).

Extensions

Formula in name corrected by Antti Karttunen, Jan 10 2016

A257731 Permutation of natural numbers: a(1) = 1, a(prime(n)) = lucky(1+a(n)), a(composite(n)) = unlucky(a(n)), where prime(n) = n-th prime number A000040, composite(n) = n-th composite number A002808 and lucky = A000959, unlucky = A050505.

Original entry on oeis.org

1, 3, 9, 2, 33, 5, 7, 14, 4, 45, 163, 8, 15, 11, 20, 6, 25, 59, 63, 203, 12, 22, 13, 17, 28, 10, 35, 78, 235, 83, 1093, 251, 18, 30, 19, 24, 31, 39, 16, 47, 67, 101, 43, 290, 107, 1283, 87, 309, 26, 41, 27, 34, 21, 42, 53, 23, 61, 88, 115, 128, 321, 57, 354, 137, 1499, 112, 349, 376, 36, 55, 1401, 38, 49, 46, 29, 56, 70, 32, 99, 81
Offset: 1

Views

Author

Antti Karttunen, May 06 2015

Keywords

Crossrefs

Inverse: A257732.
Related or similar permutations: A246377, A255421, A257726, A257733.
Cf. also A032600, A255553, A255554.
Differs from A257733 for the first time at n=19, where a(19) = 63, while A257733(19) = 203.

Formula

a(1) = 1; for n > 1: if A010051(n) = 1 [i.e., if n is a prime], then a(n) = A000959(1+a(A000720(n))), otherwise a(n) = A050505(a(A065855(n))).
As a composition of other permutations:
a(n) = A257726(A246377(n)).
a(n) = A257733(A255421(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)).

A257734 Permutation of natural numbers: a(1) = 1, a(lucky(n)) = ludic(1+a(n-1)), a(unlucky(n)) = nonludic(a(n)), where lucky(n) = n-th lucky number A000959, unlucky(n) = n-th unlucky number A050505, and ludic = A003309, nonludic = A192607.

Original entry on oeis.org

1, 4, 2, 9, 6, 16, 7, 12, 3, 26, 14, 20, 25, 8, 13, 38, 22, 31, 36, 15, 61, 21, 54, 33, 17, 45, 51, 24, 81, 32, 41, 73, 5, 48, 27, 62, 119, 69, 35, 105, 46, 57, 47, 96, 10, 65, 39, 82, 83, 151, 115, 92, 50, 135, 63, 76, 64, 124, 18, 86, 55, 106, 23, 108, 189, 146, 43, 118, 193, 68, 169, 84, 91, 100, 149, 85, 156, 28, 179, 111, 74, 136, 34
Offset: 1

Views

Author

Antti Karttunen, May 06 2015

Keywords

Crossrefs

Inverse: A257733.
Related or similar permutations: A237126, A255421, A257725, A257732.
Cf. also A256486, A256487.

Formula

a(1) = 1; for n > 1: if A145649(n) = 1 [i.e., if n is lucky], then a(n) = A003309(1+a(A109497(n)-1)), otherwise a(n) = A192607(a(n-A109497(n))).
As a composition of other permutations:
a(n) = A255421(A257732(n)).
a(n) = A237126(A257725(n)).

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

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 5, 10, 7, 14, 9, 16, 11, 12, 17, 22, 15, 25, 18, 20, 23, 26, 33, 24, 13, 36, 27, 30, 34, 38, 31, 48, 19, 35, 21, 51, 47, 39, 44, 49, 54, 45, 29, 66, 28, 50, 32, 70, 59, 65, 37, 55, 62, 68, 75, 63, 42, 90, 40, 69, 46, 94, 41, 81, 88, 52, 61, 76, 83, 85, 92, 100, 53, 86, 101, 58, 120, 56, 67, 93, 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: A257801.
Related or similar permutations: A257725, A257728, A257729, A257732.

Formula

a(1) = 1; if A145649(n) = 1 [i.e., when n is lucky] then a(n) = A065091(a(A109497(n)-1)), otherwise a(n) = A065090(1+a(n-A109497(n))).
As a composition of other permutations:
a(n) = A257728(A257725(n)).
a(n) = A257729(A257732(n)).
Showing 1-5 of 5 results.