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!)
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
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))));
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.
Sequence in context: A048679 A342794 A266412 * A331585 A191729 A075378
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)