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 A125718 #21 Oct 10 2019 15:34:06 %S A125718 1,3,2,7,6,13,10,11,5,9,20,25,15,29,17,21,8,43,48,31,52,35,14,41,22, %T A125718 23,49,51,80,53,34,67,38,37,44,79,46,87,50,93,56,55,19,61,62,107,70, %U A125718 127,129,179,131,83,82,89,92,39,98,97,100,101,161,45,118,119,183,185,63,65 %N A125718 a(1)=1. a(n) = the smallest positive integer not occurring earlier in the sequence such that the n-th prime is congruent to a(n) (mod n). %C A125718 This sequence seems likely to be a permutation of the positive integers. It will be if every positive number appears in A004648 (cf. A127149, A127150). %C A125718 If this is a permutation of the positive integers, then A249678 is the inverse permutation. - _M. F. Hasler_, Nov 03 2014 %H A125718 Ferenc Adorjan, <a href="/A125718/b125718.txt">Table of n,a(n) for n=1,10000</a> %H A125718 Ferenc Adorjan, <a href="http://web.t-online.hu/fadorjan/l_quet.pdf">Some characteristics of _Leroy Quet_'s permutation sequences</a> %H A125718 Ferenc Adorjan, <a href="http://web.axelero.hu/fadorjan/l_quet.pdf">More about the structure of _Leroy Quet_'s sequences A125715, A125717, A125718 & A125727</a> %t A125718 f[l_List] := Block[{n = Length[l] + 1, k = Mod[Prime[n], n, 1]},While[MemberQ[l, k], k += n];Append[l, k]];Nest[f, {1}, 70] (* _Ray Chandler_, Feb 04 2007 *) %o A125718 (PARI) {Quet_p3(n)= /* Permutation sequence a'la _Leroy Quet_, A125718 */local(x=[1],k=0,w=1); for(i=2,n,if((k=prime(i)%i)==0,k=i);while(bittest(w,k-1)>0,k+=i);x=concat(x,k);w+=2^(k-1));return(x)} %o A125718 (PARI) A125718(n,show=0,u=1)={for(n=1,n,p=prime(n)%n;while(bittest(u,p),p+=n);u+=1<<p;show&&print1(p",")/*a=concat(a,p)*/);p} \\ _M. F. Hasler_, Nov 03 2014 %Y A125718 Cf. A004648. %K A125718 nonn %O A125718 1,2 %A A125718 _Leroy Quet_, Feb 01 2007 %E A125718 Extended by _Ray Chandler_, Feb 04 2007