The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A246379 Permutation of natural numbers: a(1) = 1, a(p_n) = A003961(1+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. 5
 1, 3, 9, 2, 21, 6, 5, 18, 4, 42, 39, 12, 11, 10, 36, 8, 15, 84, 23, 78, 24, 22, 7, 20, 72, 16, 30, 168, 47, 46, 189, 156, 48, 44, 14, 40, 17, 144, 32, 60, 45, 336, 13, 94, 92, 378, 41, 312, 96, 88, 28, 80, 25, 34, 288, 64, 120, 90, 81, 672, 133, 26, 188, 184, 756, 82, 135, 624, 192, 176, 83, 56, 49 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Because 2 is the only even prime, it implies that, apart from 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 each odd composite (A071904) resides in a separate infinite cycle in this permutation, except 9, which is in a finite cycle (2 3 9 4). LINKS Antti Karttunen, Table of n, a(n) for n = 1..10000 FORMULA a(1) = 1, and for n > 1, if A010051(n) = 1 [i.e. when n is a prime], a(n) = A003961(1+a(A000720(n))), otherwise a(n) = 2*a(A065855(n)). As a composition of related permutations: a(n) = A246375(A246377(n)). Other identities. For all n > 1 the following holds: A000035(a(n)) = A010051(n). [Maps primes to odd numbers > 1, and composites to even numbers, in some order. Permutations A246377 & A246681 have the same property]. PROG (PARI) default(primelimit, (2^31)+(2^30)); A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus A246379(n) = if(1==n, 1, if(isprime(n), A003961(1+A246379(primepi(n))), 2*A246379(n-primepi(n)-1))); for(n=1, 10000, write("b246379.txt", n, " ", A246379(n))); (Scheme, with memoization-macro definec) (definec (A246379 n) (cond ((< n 2) n) ((= 1 (A010051 n)) (A003961 (+ 1 (A246379 (A000720 n))))) (else (* 2 (A246379 (A065855 n)))))) CROSSREFS Inverse: A246380. Similar or related permutations: A246375, A246377, A246363, A246364, A246365, A246367, A246681. Cf. A000720, A003961, A010051, A065855, A071904. Sequence in context: A262343 A140985 A286676 * A303941 A176885 A257731 Adjacent sequences:  A246376 A246377 A246378 * A246380 A246381 A246382 KEYWORD nonn AUTHOR Antti Karttunen, Aug 29 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 13 11:46 EDT 2020. Contains 335687 sequences. (Running on oeis4.)