This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A108546 Lexicographically earliest permutation of primes such that for n>1 forms 4*k+1 and 4*k+3 alternate. 7

%I

%S 2,3,5,7,13,11,17,19,29,23,37,31,41,43,53,47,61,59,73,67,89,71,97,79,

%T 101,83,109,103,113,107,137,127,149,131,157,139,173,151,181,163,193,

%U 167,197,179,229,191,233,199,241,211,257,223,269,227,277,239,281,251,293

%N Lexicographically earliest permutation of primes such that for n>1 forms 4*k+1 and 4*k+3 alternate.

%C a(n) mod 4 = 3 - 2 * (n mod 2) for n>1.

%C For n > 1: a(n) = A111745(n-1);

%C a(2*n+1) - a(2*n) = A102261(n).

%H Reinhard Zumkeller, <a href="/A108546/b108546.txt">Table of n, a(n) for n = 1..10000</a>

%t terms = 60; A111745 = Module[{prs = Prime[Range[2terms]], m3, m1, min}, m3 = Select[prs, Mod[#, 4] == 3&]; m1 = Select[prs, Mod[#, 4] == 1&]; min = Min[Length[m1], Length[m3]]; Riffle[Take[m3, min], Take[m1, min]]]; a[1] = 2; a[n_] := A111745[[n-1]]; Table[a[n], {n, 1, terms}] (* _Jean-François Alcover_, May 18 2017, using _Harvey P. Dale_'s code for A111745 *)

%o import Data.List (transpose)

%o a108546 n = a108546_list !! (n-1)

%o a108546_list = 2 : concat

%o (transpose [a002145_list, a002144_list])

%o -- _Reinhard Zumkeller_, Nov 13 2014, Feb 22 2011

%Y Cf. A002144, A002145.

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Jun 10 2005

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.

Last modified December 10 04:15 EST 2019. Contains 329885 sequences. (Running on oeis4.)