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”).
%I #9 Aug 09 2015 15:18:00
%S 3,2,1,4,7,6,5,9,8,11,10,12,15,14,13,16,17,18,19,20,23,22,21,25,24,26,
%T 28,27,31,30,29,32,35,34,33,36,39,38,37,40,43,42,41,45,44,47,46,50,49,
%U 48,51,52,53,54,55,56,59,58,57,60,62,61,64,63,67,66,65,68,71,70,69,72
%N A permutation of the positive integers made by (alternatingly) reversing the order of the squarefree positive integers within each run of squarefree integers and reversing the order of the nonsquarefree positive integers within each run of nonsquarefree integers.
%C Sequence is its own inverse permutation.
%e The run of nonsquarefree integers (27,28) becomes (28,27). And the run of squarefree integers (29,30,31) becomes (31,30,29).
%o (PARI) {m=73;n=1;while(n<=m,k=n;while(issquarefree(n),n++);forstep(a=n-1,k,-1,print1(a,","));k=n;while(!issquarefree(n),n++);forstep(a=n-1,k,-1,print1(a,",")))} \\ _Klaus Brockhaus_, Aug 16 2006
%K nonn
%O 1,1
%A _Leroy Quet_, Jul 23 2006
%E More terms from _Klaus Brockhaus_, Aug 16 2006