%I #7 May 03 2021 05:57:26
%S 1,1,3,3,1,5,3,3,5,3,1,5,3,11,5,3,1,7,3,1,3,3,5,9,5,3,11,9,5,7,3,5,3,
%T 9,7,1,3,11,5,15,13,3,1,5,3,3,3,27,25,21,15,13,3,5,11,5,3,1,17,15,5,7,
%U 3,1,9,3,9,11,9,5,3,15,9,3,3,5,1,21,13,3,1
%N a(n)=2*q-prime(n), where q is the prime < p(n) for which (prime(n) mod q) is maximal.
%F a(n) = 2*A039734(n)-prime(n). - _R. J. Mathar_, May 03 2021
%p A039739 := proc(n)
%p local p,maxmod,q,qpiv ;
%p p := ithprime(n) ;
%p for j from 1 to n-1 do
%p q := ithprime(j) ;
%p if j = 1 then
%p qpiv := q ;
%p maxmod := modp(p,q) ;
%p else
%p if modp(p,q) > maxmod then
%p maxmod := modp(p,q) ;
%p qpiv := q ;
%p end if;
%p end if;
%p end do:
%p 2*qpiv-p ;
%p end proc:
%p seq(A039739(n),n=2..80) ; # _R. J. Mathar_, May 03 2021
%K nonn
%O 2,3
%A _Clark Kimberling_