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”).

A097104
Start with positive integers in order. At m-th iteration, let a(k) become a(k-1) for m+1<=k<=p_m and let a(m) become a(p_m), where p_m is the m-th prime. Record the limiting sequence.
2
2, 3, 4, 1, 7, 8, 10, 6, 13, 14, 16, 9, 19, 20, 22, 12, 25, 27, 29, 30, 15, 33, 35, 37, 38, 40, 18, 43, 44, 46, 21, 49, 51, 53, 54, 56, 58, 24, 61, 62, 64, 66, 28, 69, 71, 72, 31, 75, 77, 79, 80, 82, 34, 85, 87, 89, 90, 92, 94, 96, 17, 99, 101, 102, 41, 105, 107, 108, 11, 111
OFFSET
1,1
COMMENTS
n-th term of limit-sequence is determined at the n-th iteration.
It is interesting to notice that 5 is moved from the fifth position to the 400th position and that the only triple is 2,3,4.
EXAMPLE
{2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}->
{2,3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}->
{2,3,4,5,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}->
{2,3,4,1,6,7,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}->
{2,3,4,1,7,5,8,9,10,11,6,12,13,14,15,16,17,18,19,20,21,22,23,24,25}->
{2,3,4,1,7,8,9,10,11,6,12,13,5,14,15,16,17,18,19,20,21,22,23,24,25}->
{2,3,4,1,7,8,10,11,6,12,13,5,14,15,16,17,9,18,19,20,21,22,23,24,25}->
{2,3,4,1,7,8,10,6,12,13,5,14,15,16,17,9,18,19,11,20,21,22,23,24,25}->...
MATHEMATICA
lst = Table[n, {n, 100}]; f[m_] := (lst = Drop[ Insert[ lst, lst[[m]], Prime[m] + 1], {m, m}]); Do[ f[n], {n, 25}]; Take[lst, 70] (* Robert G. Wilson v, Nov 18 2004 *)
CROSSREFS
Inverse is A100353. Cf. A098003, A100352.
Sequence in context: A049563 A198495 A084453 * A008310 A021431 A094936
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 24 2004
EXTENSIONS
Edited by Robert G. Wilson v, Nov 19 2004
STATUS
approved