login
This site is supported by donations 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
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, 49, 99, 22, 55, 32, 39, 135, 105, 125, 225, 30, 189, 243, 147, 20, 297, 50, 65, 165, 17, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000

Index entries for sequences that are permutations of the natural numbers

FORMULA

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

Other identities:

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].

PROG

(PARI)

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

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

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

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

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

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

CROSSREFS

Inverse: A246368.

Cf. A000035, A010051.

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

Sequence in context: A321366 A180246 A329146 * A048167 A207790 A305427

Adjacent sequences:  A246364 A246365 A246366 * A246368 A246369 A246370

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 15 06:11 EST 2019. Contains 329144 sequences. (Running on oeis4.)