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.

A255422 Permutation of natural numbers: a(1) = 1 and for n > 1, if n is k-th ludic number larger than 1 [i.e., n = A003309(k+1)], a(n) = nthprime(a(k)), otherwise, when n is k-th nonludic number [i.e., n = A192607(k)], a(n) = nthcomposite(a(k)), where nthcomposite = A002808, nthprime = A000040.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 19, 25, 23, 26, 27, 28, 29, 32, 33, 34, 36, 30, 38, 35, 31, 39, 40, 42, 37, 44, 41, 48, 49, 50, 43, 52, 45, 55, 51, 46, 47, 56, 57, 60, 54, 63, 58, 68, 53, 69, 70, 62, 74, 64, 59, 77, 72, 65, 61, 66, 78, 80, 84, 76, 71, 87, 81
Offset: 1

Views

Author

Antti Karttunen, Feb 23 2015

Keywords

Comments

The graph has a comet appearance. - Daniel Forgues, Dec 15 2015

Examples

			When n = 19 = A192607(11) [the eleventh nonludic number], we look for the value of a(11), which is 11 [all terms less than 19 are fixed because the beginnings of A003309 and A008578 coincide up to A003309(8) = A008578(8) = 17], and then take the eleventh composite number, which is A002808(11) = 20, thus a(19) = 20.
When n = 25 = A003309(10) = A003309(1+9) [the tenth ludic number, and ninth after one], we look for the value of a(9), which is 9 [all terms less than 19 are fixed, see above], and then take the ninth prime number, which is A000040(9) = 23, thus a(25) = 23.
		

Crossrefs

Inverse: A255421.
Related or similar permutations: A237427, A246378, A245703, A245704 (compare the scatterplots), A255407, A255408.

Formula

a(1)=1; and for n > 1, if A192490(n) = 1 [i.e., n is ludic], a(n) = A000040(a(A192512(n)-1)), otherwise a(n) = A002808(a(A236863(n))) [where A192512 and A236863 give the number of ludic and nonludic numbers <= n, respectively].
As a composition of other permutations: a(n) = A246378(A237427(n)).