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.

This page as a plain text file.
%I A255422 #26 Dec 10 2019 12:09:55
%S A255422 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,
%T A255422 27,28,29,32,33,34,36,30,38,35,31,39,40,42,37,44,41,48,49,50,43,52,45,
%U A255422 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
%N 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.
%C A255422 The graph has a comet appearance. - _Daniel Forgues_, Dec 15 2015
%H A255422 Antti Karttunen, <a href="/A255422/b255422.txt">Table of n, a(n) for n = 1..8192</a>
%H A255422 Antti Karttunen, <a href="/A135141/a135141.pdf">Entanglement Permutations</a>, 2016-2017
%H A255422 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A255422 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].
%F A255422 As a composition of other permutations: a(n) = A246378(A237427(n)).
%e A255422 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.
%e A255422 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.
%o A255422 (Scheme, with memoization-macro definec)
%o A255422 (definec (A255422 n) (cond ((= 1 n) n) ((= 1 (A192490 n)) (A000040 (A255422 (- (A192512 n) 1)))) (else (A002808 (A255422 (A236863 n))))))
%o A255422 ;; Alternatively:
%o A255422 (define (A255422 n) (A246378 (A237427 n)))
%Y A255422 Inverse: A255421.
%Y A255422 Cf. A000040, A002808, A003309, A192490, A192512, A192607, A236863.
%Y A255422 Related or similar permutations: A237427, A246378, A245703, A245704 (compare the scatterplots), A255407, A255408.
%K A255422 nonn,look
%O A255422 1,2
%A A255422 _Antti Karttunen_, Feb 23 2015