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.

A255421 Permutation of natural numbers: a(1) = 1, a(p_n) = ludic(1+a(n)), a(c_n) = nonludic(a(n)), where p_n = n-th prime, c_n = n-th composite number and ludic = A003309, nonludic = A192607.

This page as a plain text file.
%I A255421 #15 Feb 23 2015 23:05:24
%S A255421 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,23,19,20,21,25,22,24,26,
%T A255421 27,28,29,34,37,30,31,32,36,33,41,35,38,39,43,40,47,42,49,52,53,44,45,
%U A255421 46,51,48,61,57,50,54,55,59,67,56,71,64,58,66,70,72,97,60,62,63,77,69,83,65,81
%N A255421 Permutation of natural numbers: a(1) = 1, a(p_n) = ludic(1+a(n)), a(c_n) = nonludic(a(n)), where p_n = n-th prime, c_n = n-th composite number and ludic = A003309, nonludic = A192607.
%C A255421 This can be viewed as yet another "entanglement permutation", where two pairs of complementary subsets of natural numbers are interwoven with each other. In this case a complementary pair ludic/nonludic numbers (A003309/A192607) is intertwined with a complementary pair prime/composite numbers (A000040/A002808).
%H A255421 Antti Karttunen, <a href="/A255421/b255421.txt">Table of n, a(n) for n = 1..8192</a>
%H A255421 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A255421 a(1) = 1, and for n > 1, if A010051(n) = 1 [i.e. when n is a prime], a(n) = A003309(1+a(A000720(n))), otherwise a(n) = A192607(a(A065855(n))).
%F A255421 As a composition of other permutations:
%F A255421 a(n) = A237126(A246377(n)).
%F A255421 Other identities.
%F A255421 a(A007097(n)) = A255420(n). [Maps iterates of primes to the iterates of Ludic numbers.]
%e A255421 When n = 19 = A000040(8) [the eighth prime], we look for the value of a(8), which is 8 [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 eighth ludic number larger than 1, which is A003309(1+8) = 23, thus a(19) = 23.
%e A255421 When n = 20 = A002808(11) [the eleventh composite], we look for the value of a(11), which is 11 [all terms less than 19 are fixed, see above], and then take the eleventh nonludic number, which is A192607(11) = 19, thus a(20) = 19.
%e A255421 When n = 30 = A002808(19) [the 19th composite], we look for the value of a(19), which is 23 [see above], and then take the 23rd nonludic number, which is A192607(23) = 34, thus a(30) = 34.
%o A255421 (Scheme, with memoization-macro definec)
%o A255421 (definec (A255421 n) (cond ((= 1 n) n) ((= 1 (A010051 n)) (A003309 (+ 1 (A255421 (A000720 n))))) (else (A192607 (A255421 (A065855 n))))))
%o A255421 ;; Alternatively:
%o A255421 (define (A255421 n) (A237126 (A246377 n)))
%Y A255421 Inverse: A255422.
%Y A255421 Cf. A000040, A000720, A002808, A003309, A007097, A008578, A065855, A010051, A192607, A255420, A255324.
%Y A255421 Related or similar permutations: A237126, A246377, A245703, A245704, A255407, A255408.
%K A255421 nonn
%O A255421 1,2
%A A255421 _Antti Karttunen_, Feb 23 2015