This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A057032 #36 Apr 26 2024 03:30:52 %S A057032 1,3,4,7,6,10,8,16,15,21,12,22,14,27,28,36,18,33,20,43,35,39,24,53,34, %T A057032 45,46,50,30,66,32,78,52,57,55,81,38,63,59,88,42,86,44,96,87,75,48, %U A057032 119,64,111,76,101,54,103,79,144,83,93,60,141,62,99,113,173,91,136,68,139 %N A057032 Let P(n) of a sequence s(1), s(2), s(3), ... be obtained by leaving s(1), ..., s(n-1) fixed and forward-cyclically permuting every n consecutive terms thereafter; apply P(2) to 1, 2, 3, ... to get PS(2), then apply P(3) to PS(2) to get PS(3), then apply P(4) to PS(3), etc. The limit of PS(n) as n -> oo is this sequence. %C A057032 Conjecture: a(n) - 1 is prime if and only if a(n) = n + 1. - _Mikhail Kurkov_, Mar 10 2022 %H A057032 Rémy Sigrist, <a href="/A057032/b057032.txt">Table of n, a(n) for n = 1..10000</a> %F A057032 Conjecture: a(n) = A057064(n+1) - 1 for n > 0. - _Mikhail Kurkov_, Mar 10 2022 %e A057032 PS(2) begins with 1, 3, 2, 5, 4, 7, 6; %e A057032 PS(3) begins with 1, 3, 4, 2, 5, 9, 7; %e A057032 PS(4) begins with 1, 3, 4, 7, 2, 5, 9. %t A057032 PS[i_, n_] := If[i == 1, n, If[n < i, PS[i-1, n], If[Mod[n, i] == 0, PS[i-1, n+i-1], PS[i-1, n-1]]]]; a[n_] := PS[n, n]; Table[a[n], {n, 1, 68}] (* _Jean-François Alcover_, Oct 20 2011, after MATLAB *) %o A057032 (MATLAB) function m = A057032(i) m = PS(i, i); function m = PS(i, n) if i == 1 m = n; elseif n < i m = PS(i - 1, n); else if mod(n, i) == 0 m = PS(i - 1, n + i - 1); else m = PS(i - 1, n - 1); end end %o A057032 (PARI) a(n) = { my (p=0); forstep (d=n, 1, -1, if (p%d==0, p+=d)); p } \\ _Rémy Sigrist_, Aug 25 2020 %Y A057032 Cf. A007062, A057030, A057033, A057063, A057064, A069829. %K A057032 nonn,nice,easy %O A057032 1,2 %A A057032 _Clark Kimberling_, Jul 29 2000 %E A057032 More terms from _David Wasserman_, Apr 22 2002