1,1

Jinyuan Wang, Table of n, a(n) for n = 1..10000

a(n) = A101777(A000217(n)).

(PARI) A020482(k) = forprime(q=2, k, if(isprime(2*k-q), return(2*k-q)));

a(n) = {my(r=(ceil(sqrt(2*n+1)))^2-2*n+3); if(r%2==0, r=A020482(r/2), if(isprime(r-2), r-=2, r=A020482(r\2))); r; } \\ Jinyuan Wang, Jan 29 2020

Cf. A100555, A101776, A101777.

Sequence in context: A085849 A100481 A205009 * A292570 A161670 A135514

Adjacent sequences: A101775 A101776 A101777 * A101779 A101780 A101781

nonn

Ray Chandler, Jan 10 2005

approved