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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A105366 Rearrangement of positive integers according to parity of (prime(n)-1)/2 (see comments). 1

%I #3 Mar 30 2012 17:26:14

%S 1,2,4,3,5,6,8,7,11,9,13,10,12,17,19,14,23,15,29,31,16,37,41,18,20,21,

%T 43,47,22,24,53,59,25,61,26,67,27,71,73,28,79,30,83,32,33,89,97,101,

%U 103,34,35,107,36,109,38,113,39,127,40,42

%N Rearrangement of positive integers according to parity of (prime(n)-1)/2 (see comments).

%C a(1)=1, for n>1: if (prime(n)-1)/2 is odd/even then a(n) is the next prime/composite number.

%t p=Prime[Range[100]];s=Complement[Range[100], p]; bb={1};is=1;ip=0;Do[If[EvenQ[(Prime[i]-1)/2], is=is+1;bb=Append[bb, s[[is]]], ip=ip+1;bb=Append[bb, p[[ip]]]], {i, 2, 60}];bb

%Y Cf. A105365.

%K nonn

%O 1,2

%A _Zak Seidov_, Apr 01 2005

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.

Last modified September 24 22:14 EDT 2023. Contains 365582 sequences. (Running on oeis4.)