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

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)).

A257727 Permutation of natural numbers: a(1) = 1, a(oddprime(n)) = 1 + 2*a(n), a(not_an_oddprime(n)) = 2*a(n-1).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 9, 14, 11, 16, 20, 24, 13, 18, 15, 28, 22, 32, 17, 40, 48, 26, 36, 30, 21, 56, 25, 44, 64, 34, 80, 96, 19, 52, 72, 60, 29, 42, 23, 112, 50, 88, 33, 128, 68, 160, 192, 38, 41, 104, 144, 120, 58, 84, 49, 46, 27, 224, 100, 176, 66, 256, 37, 136, 320, 384, 31, 76, 57, 82, 208, 288, 240, 116, 45
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).

Examples

			For n=2, which is the second natural number >= 1 that is not an odd prime [2 = A065090(2)], we compute 2*a(1) = 2 = a(2).
For n=4, which is A065090(3), we compute 2*a(3-1) = 2*2 = 4.
For n=5, and 5 is the second odd prime [5 = A065091(2)], thus a(5) = 1 + 2*a(2) = 5.
For n=9, which is the sixth natural number >= 1 not an odd prime (9 = A065090(6)), we compute 2*a(6-1) = 2*5 = 10.
For n=11, which is the fourth odd prime [11 = A065091(4)], we compute 1 + 2*a(4) = 1 + 2*4 = 9, thus a(11) = 9.
		

Crossrefs

Inverse: A257728.
Related or similar permutations: A246377, A246378, A257725, A257730, A257801.

Formula

a(1) = 1; a(2) = 2; and for n > 2, if A010051(n) = 1 [i.e., when n is a prime], then a(n) = 1 + 2*a(A000720(n)-1), otherwise a(n) = 2*a(A062298(n)).
As a composition of other permutations:
a(n) = A246377(A257730(n)).
a(n) = A257725(A257801(n)).

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

Original entry on oeis.org

1, 3, 7, 2, 19, 6, 5, 12, 4, 28, 71, 10, 17, 9, 20, 8, 13, 40, 41, 95, 16, 26, 11, 15, 30, 14, 21, 56, 109, 57, 359, 125, 25, 38, 18, 24, 31, 44, 22, 32, 61, 77, 29, 143, 78, 445, 73, 162, 36, 54, 27, 35, 23, 45, 62, 33, 46, 84, 43, 104, 179, 42, 185, 105, 545, 98, 181, 208, 51, 75, 503, 39, 59, 50, 34, 63, 85, 48, 103, 64, 114, 60, 37
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).

Examples

			As an initial value we have a(1) = 1.
2 is the first prime (= A000040(1)), so we take the a(1)-th odd prime, A065091(1) = 3, thus a(2) = 3.
3 is the second prime, thus we take a(2)-th odd prime, A065091(3) = 7, thus a(3) = 7.
4 is the first composite, thus we take a(1)-th number larger than one which is not an odd prime, and that is A065090(1+1) = 2, thus a(4) = 2.
5 is the third prime, thus we take a(3)-th odd prime, which is A065091(7) = 19, thus a(5) = 19.
		

Crossrefs

Inverse: A257730.
Related or similar permutations: A257728, A246377, A257731, A257802, A236854.

Programs

Formula

a(1) = 1; if A010051(n) = 1 [i.e., if n is a prime], then a(n) = A065091(a(A000720(n))), otherwise a(n) = A065090(1+a(A065855(n))).
As a composition of other permutations:
a(n) = A257728(A246377(n)).
a(n) = A257802(A257731(n)).

A269847 Permutation of natural numbers: a(1) = 1, for n > 1, if n is an odd prime, a(n) = A003961(a(A000720(n))), otherwise a(n) = 2*a(n-A000720(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 10, 12, 7, 18, 15, 16, 20, 24, 25, 14, 27, 36, 30, 32, 21, 40, 48, 50, 28, 54, 45, 72, 11, 60, 64, 42, 80, 96, 75, 100, 56, 108, 35, 90, 81, 144, 22, 120, 63, 128, 84, 160, 192, 150, 135, 200, 112, 216, 70, 180, 49, 162, 33, 288, 44, 240, 126, 256, 125, 168, 320, 384, 225, 300, 105, 270, 400
Offset: 1

Views

Author

Antti Karttunen, Mar 06 2016

Keywords

Crossrefs

Inverse: A269848.
Related or similar permutations: A071574, A163511, A246681, A257730, A269857.

Formula

a(1) = 1, and for n > 1, if n is an odd prime, a(n) = A003961(a(A000720(n))), otherwise [when n is 2 or composite] a(n) = 2*a(n-A000720(n)).
a(1) = 1; if n is an odd prime, a(n) = A003961(a(A026233(n))), else a(n) = A005843(a(A026233(n))).
Declarative definition:
a(1)=1, a(A065091(n)) = A003961(a(n+1)), a(A065090(n+1)) = 2*a(n).
As a composition of other permutations:
a(n) = A163511(A071574(n)).
Other identities. For all n >= 1:
a(A007097(n)) = A000040(n). [Maps the terms of primeth recurrence to primes.]
Showing 1-4 of 4 results.