login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246365 Permutation of natural numbers: a(n) = A135141(A005940(n)). 5
1, 2, 4, 3, 8, 5, 7, 9, 6, 17, 19, 11, 39, 35, 25, 15, 16, 13, 23, 33, 29, 37, 75, 27, 95, 87, 61, 55, 767, 45, 83, 67, 10, 21, 47, 71, 159, 143, 139, 51, 319, 175, 639, 287, 251, 263, 247, 135, 527, 239, 199, 447, 105, 115, 991, 119, 1015, 443, 4575, 85, 583, 2175, 1343, 151, 12, 31, 63, 69, 131, 77 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Even terms occur at the positions 2^n + 1 (A000051), in some order, and the odd terms everywhere else.

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) = A135141(A005940(n)).

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))));

A246365(n) = A135141(A005940(n));

for(n=1, 10000, write("b246365.txt", n, " ", A246365(n)));

(Scheme) (define (A246365 n) (A135141 (A005940 n)))

CROSSREFS

Inverse: A246366.

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

Cf. A000051, A003961.

Sequence in context: A245603 A048679 A266412 * A191729 A075378 A101905

Adjacent sequences:  A246362 A246363 A246364 * A246366 A246367 A246368

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 20 05:07 EST 2019. Contains 329323 sequences. (Running on oeis4.)