This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A246368 Permutation of natural numbers: a(n) = A227413(A005941(n)). 6
 1, 2, 4, 3, 6, 7, 8, 5, 9, 13, 10, 17, 20, 19, 12, 11, 46, 23, 166, 41, 15, 29, 858, 59, 14, 71, 16, 67, 6186, 37, 58645, 31, 18, 199, 22, 83, 705348, 983, 32, 179, 10428487, 47, 184718194, 109, 21, 6659, 3840230006, 277, 27, 43, 65, 353 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS FORMULA a(n) = A227413(A005941(n)) = A227413(1+A156552(n)). Other identities: For all n >= 1,  A010051(a(n)) = 1 - A000035(n). [This permutation maps even numbers to primes and odd numbers to nonprimes, in some order, because the permutation A227413 has the same property and A005941 preserves the parity]. PROG (Scheme) (define (A246368 n) (A227413 (A005941 n))) (PARI) default(primelimit, (2^31)+(2^30)); A002808(n) = { my(k=-1); while( -n + n += -k + k=primepi(n), ); n }; \\ This function from M. F. Hasler A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)}; A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n)))); A005941(n) = A156552(n)+1; A227413(n) = if(1==n, 1, if(!(n%2), prime(A227413(n/2)), A002808(A227413((n-1)/2)))); A246368(n) = A227413(A005941(n)); for(n=1, 52, write("b246368.txt", n, " ", A246368(n))); CROSSREFS Inverse: A246367. Similar or related permutations: A005941, A156552, A227413, A246364, A246366. Cf. A000035, A010051. Sequence in context: A083044 A126714 A035506 * A316963 A006016 A227413 Adjacent sequences:  A246365 A246366 A246367 * A246369 A246370 A246371 KEYWORD nonn AUTHOR Antti Karttunen, Aug 26 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 13 19:25 EST 2018. Contains 317149 sequences. (Running on oeis4.)