The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A227413 a(1)=1, a(2n)=nthprime(a(n)), a(2n+1)=nthcomposite(a(n)), where nthprime = A000040, nthcomposite = A002808. 34

%I #19 Jan 29 2014 17:20:44

%S 1,2,4,3,6,7,9,5,8,13,12,17,14,23,16,11,10,19,15,41,22,37,21,59,27,43,

%T 24,83,35,53,26,31,20,29,18,67,30,47,25,179,58,79,34,157,54,73,33,277,

%U 82,103,40,191,62,89,36,431,114,149,51,241,75,101,39,127,46

%N a(1)=1, a(2n)=nthprime(a(n)), a(2n+1)=nthcomposite(a(n)), where nthprime = A000040, nthcomposite = A002808.

%C Inverse permutation of A135141.

%C Shares with A073846 the property that the other bisection consists of just primes and the other bisection of just nonprimes.

%H Antti Karttunen and Reinhard Zumkeller, <a href="/A227413/b227413.txt">Table of n, a(n) for n = 1..1000</a>

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

%F a(1)=1, a(2n) = A000040(a(n)), a(2n+1) = A002808(a(n)).

%F A007097(n) = a(A000079(n)).

%o (Scheme, with _Antti Karttunen_'s IntSeq-library)

%o (definec (A227413 n) (cond ((< n 2) n) ((even? n) (A000040 (A227413 (/ n 2)))) (else (A002808 (A227413 (/ (- n 1) 2))))))

%o (Haskell)

%o import Data.List (transpose)

%o a227413 n = a227413_list !! (n-1)

%o a227413_list = 1 : concat (transpose [map a000040 a227413_list,

%o map a002808 a227413_list])

%o -- _Reinhard Zumkeller_, Jan 29 2014

%Y Similarly constructed permutations: A227402, A227404, A227410, A227412. Cf. also A073846, A209636.

%K nonn,look

%O 1,2

%A _Antti Karttunen_, Jul 10 2013

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 21 02:29 EDT 2024. Contains 372720 sequences. (Running on oeis4.)