login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246367 Permutation of natural numbers: a(n) = A005940(A135141(n)). 6

%I #8 Aug 27 2014 14:54:00

%S 1,2,4,3,8,5,6,7,9,11,16,15,10,25,21,27,12,33,14,13,45,35,18,75,63,81,

%T 49,99,22,55,32,39,135,105,125,225,30,189,243,147,20,297,50,65,165,17,

%U 42,117,405,315,375,675,54,175,567,729,441,77,24,891,66,245,195,495,51,275,28,351,1215,945,26

%N Permutation of natural numbers: a(n) = A005940(A135141(n)).

%H Antti Karttunen, <a href="/A246367/b246367.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(n) = A005940(A135141(n)).

%F Other identities:

%F For all n >= 1, A000035(a(n)) = 1 - A010051(n). [This permutation maps primes to even numbers and nonprimes to odd numbers, in some order, because permutation A135141 has the same property and A005940 preserves the parity].

%o (PARI)

%o default(primelimit,(2^31)+(2^30));

%o A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of _M. F. Hasler_

%o A135141(n) = if(1==n, 1, if(isprime(n), 2*A135141(primepi(n)), 1+(2*A135141(n-primepi(n)-1))));

%o A246367(n) = A005940(A135141(n)); \\ Against the grain...

%o for(n=1, 10000, write("b246367.txt", n, " ", A246367(n)));

%o (Scheme) (define (A246367 n) (A005940 (A135141 n)))

%Y Inverse: A246368.

%Y Cf. A000035, A010051.

%Y Related or similar permutations: A005940, A135141, A246363, A246365.

%K nonn

%O 1,2

%A _Antti Karttunen_, Aug 26 2014

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 01:26 EDT 2024. Contains 372341 sequences. (Running on oeis4.)