# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a104705 Showing 1-1 of 1 %I A104705 #3 Mar 30 2012 17:26:11 %S A104705 1,2,3,1,4,2,1,5,6,1,2,3,1,7,2,1,8,4,1,2,3,1,9,2,1,10,11,1,2,3,1,12,2, %T A104705 1,4,5,1,2,3,1,13,2,1,14,6,1,2,3,1,4,2,1,15,16,1,2,3,1,17,2,1,18,4,1, %U A104705 2,3,1,5,2,1,7,19,1,2,3,1,20,2,1,4,8,1,2,3,1,6,2,1,21,22,1,2,3,1,4,2,1,5,23 %N A104705 First terms in the rearrangements of integer numbers (see comments). %C A104705 Take the sequence of natural numbers: %C A104705 s0=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, %C A104705 Move the first term s(1)=1 to prime[s(1)]=2 places to the right: %C A104705 s1=2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16, %C A104705 Move the first term s(1)=2 to prime[s(1)]=3 places to the right: %C A104705 s2=3,1,4,2,5,6,7,8,9,10,11,12,13,15,16, %C A104705 Repeating the procedure we get successively: %C A104705 s3=1,4,2,5,6,3,7,8,9,10,11,12,13,15,16, %C A104705 s4=4,2,1,5,6,3,7,8,9,10,11,12,13,15,16, %C A104705 s5=2,1,5,6,3,7,8,4,9,10,11,12,13,15,16, %C A104705 s6=1,5,6,2,3,7,8,4,9,10,11,12,13,15,16, %C A104705 s7=5,6,1,2,3,7,8,4,9,10,11,12,13,15,16, %C A104705 s8=6,1,2,3,7,8,4,9,10,11,12,5,13,15,16, %C A104705 .................................................................. %C A104705 s100=2,3,1,24,9,4,25,26,27,6,5,7,28,29,30,10,8,31,32,11,33,34,35,36, %C A104705 37,38,12,39,40,41,42,13,43,44,14,45,46,47,48,15,49,50,51,52,53,54, %C A104705 16,55,56,57,58,59,60,17,61,62,18,63,64,65,66,67,68,19,69,70,71,72, %C A104705 20,73,74,21,75,76,77,78,79,80,22,81,82,83,84,23,85,86,87,88,89,90, %C A104705 The sequence A104705 gives the first terms in the rearrangements s0,s1,s2,...,s100. %t A104705 s=Range[100];bb={1};Do[s=Drop[Insert[s, s[[1]], 2+Prime[s[[1]]]], 1];bb=Append[bb, s[[1]]], {i, 100}];bb %K A104705 easy,nonn %O A104705 1,2 %A A104705 _Zak Seidov_, Mar 19 2005 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE