1,1

Michael S. Branicky, Table of n, a(n) for n = 1..10000

with(numtheory); safeprime(n);

(Python)

from sympy import isprime, nextprime

def a(n):

p = nextprime(n)

while not isprime((p-1)//2): p = nextprime(p)

return p

print([a(n) for n in range(1, 68)]) # Michael S. Branicky, May 05 2021

Sequence in context: A139259 A105444 A240233 * A293982 A071577 A003870

Adjacent sequences: A033296 A033297 A033298 * A033300 A033301 A033302

nonn,changed

N. J. A. Sloane.

a(57) and beyond from Michael S. Branicky, May 05 2021

approved