login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

First terms in the rearrangements of integer numbers (see comments).
5

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

%S 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 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 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 First terms in the rearrangements of integer numbers (see comments).

%C Take the sequence of natural numbers:

%C s0=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,

%C Move the first term s(1)=1 to prime[s(1)]=2 places to the right:

%C s1=2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,

%C Move the first term s(1)=2 to prime[s(1)]=3 places to the right:

%C s2=3,1,4,2,5,6,7,8,9,10,11,12,13,15,16,

%C Repeating the procedure we get successively:

%C s3=1,4,2,5,6,3,7,8,9,10,11,12,13,15,16,

%C s4=4,2,1,5,6,3,7,8,9,10,11,12,13,15,16,

%C s5=2,1,5,6,3,7,8,4,9,10,11,12,13,15,16,

%C s6=1,5,6,2,3,7,8,4,9,10,11,12,13,15,16,

%C s7=5,6,1,2,3,7,8,4,9,10,11,12,13,15,16,

%C s8=6,1,2,3,7,8,4,9,10,11,12,5,13,15,16,

%C ..................................................................

%C 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 37,38,12,39,40,41,42,13,43,44,14,45,46,47,48,15,49,50,51,52,53,54,

%C 16,55,56,57,58,59,60,17,61,62,18,63,64,65,66,67,68,19,69,70,71,72,

%C 20,73,74,21,75,76,77,78,79,80,22,81,82,83,84,23,85,86,87,88,89,90,

%C The sequence A104705 gives the first terms in the rearrangements s0,s1,s2,...,s100.

%t 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 easy,nonn

%O 1,2

%A _Zak Seidov_, Mar 19 2005