login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = if n+1 is prime then A049084(n+1)*2 else A066246(n+1)*2 - 1.
4

%I #6 Mar 30 2012 18:50:19

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

%T 35,20,37,22,39,41,43,45,47,24,49,51,53,26,55,28,57,59,61,30,63,65,67,

%U 69,71,32,73,75,77,79,81,34,83,36,85,87,89,91,93,38,95,97,99,40,101,42

%N a(n) = if n+1 is prime then A049084(n+1)*2 else A066246(n+1)*2 - 1.

%C Permutation of natural numbers; inverse: A066249.

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

%F a(n) = A026238(n+1)*2 - A066247(n+1).

%Y Cf. A066249, A049084, A066246, A026238, A066247, A066250, A066252.

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Dec 09 2001