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.

A246681 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(p_n) = A003961(a(n)), a(c_n) = 2*a(n), where p_n = n-th prime = A000040(n), c_n = n-th composite number = A002808(n), and A003961(n) shifts the prime factorization of n one step towards larger primes.

This page as a plain text file.
%I A246681 #18 Sep 03 2014 21:06:29
%S A246681 1,2,3,5,4,7,6,9,10,8,14,11,12,15,18,20,16,25,28,21,22,24,30,27,36,40,
%T A246681 32,50,56,33,42,13,44,48,60,54,72,45,80,64,100,35,112,75,66,84,26,63,
%U A246681 88,96,120,108,144,81,90,160,128,200,70,49,224,99,150,132,168,52,126,55,176,192,240,39
%N A246681 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(p_n) = A003961(a(n)), a(c_n) = 2*a(n), where p_n = n-th prime = A000040(n), c_n = n-th composite number = A002808(n), and A003961(n) shifts the prime factorization of n one step towards larger primes.
%C A246681 Note the indexing: the domain starts from 0, while the range excludes zero.
%C A246681 Iterating a(n) from n=0 gives the sequence: 1, 2, 3, 5, 7, 9, 8, 10, 14, 18, 28, 56, 128, 156, 1344, 16524, 2706412500, ..., which is the only one-way cycle of this permutation.
%C A246681 Because 2 is the only even prime, it implies that, apart from a(0)=1 and a(2)=3, odd numbers occur in odd positions only (along with many even numbers that also occur in odd positions). This in turn implies that there exists an infinite number of infinite cycles like (... 648391 31 13 15 20 22 30 42 112 196 1350 ...) which contain just one odd composite (A071904). Apart from 9 which is in that one-way cycle, each odd composite occurs in a separate infinite two-way cycle, like 15 in the example above.
%H A246681 Antti Karttunen, <a href="/A246681/b246681.txt">Table of n, a(n) for n = 0..10000</a>
%H A246681 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A246681 a(0) = 1, a(1) = 2, and for n > 1, if A010051(n) = 1 [i.e. when n is a prime], a(n) = A003961(a(A000720(n))), otherwise a(n) = 2*a(A065855(n)).
%F A246681 Other identities.
%F A246681 For all n >= 0, the following holds:
%F A246681 a(A007097(n)) = A000040(n+1). [Maps the iterates of primes to primes].
%F A246681 A078442(a(n)) > 0 if and only if n is in A007097. [Follows from above].
%F A246681 For all n >= 1, the following holds:
%F A246681 a(n) = A163511(A246377(n)).
%F A246681 A000035(a(n)) = A010051(n). [Maps primes to odd numbers > 1, and composites to even numbers, in some order. Permutations A246377 & A246379 have the same property].
%F A246681 A055396(a(n)) = A049076(n). [An "order of primeness" is mapped to the index of the smallest prime dividing n].
%o A246681 (Scheme, two different variants)
%o A246681 (definec (A246681 n) (cond ((<= n 1) (+ n 1)) ((= 1 (A010051 n)) (A003961 (A246681 (A000720 n)))) (else (* 2 (A246681 (A065855 n))))))
%o A246681 (define (A246681 n) (if (zero? n) 1 (A163511 (A246377 n))))
%Y A246681 Inverse: A246682.
%Y A246681 Similar or related permutations: A163511, A246377, A246379, A246367, A245821.
%Y A246681 Cf. A000040, A000720, A003961, A007097, A010051, A065855, A071904, A078442, A049076, A055396.
%K A246681 nonn,look
%O A246681 0,2
%A A246681 _Antti Karttunen_, Sep 01 2014