login
Prime p > a(n-1) such that p + n! is prime, starting with a(1) = 2.
1

%I #6 Mar 15 2023 07:56:26

%S 2,3,5,7,11,13,19,23,31,41,59,83,109,127,149,163,167,173,241,271,317,

%T 397,401,461,463,577,607,653,683,739,797,857,883,887,941,1093,1327,

%U 1601,1949,2281,2383,2593,2647,2753,2953,3067,3089,3469,3533,3709

%N Prime p > a(n-1) such that p + n! is prime, starting with a(1) = 2.

%o (PARI) lista(nn) = my(va=vector(nn)); va[1] = 2; for (n=2, nn, my(p=nextprime(va[n-1]+1)); while (!ispseudoprime(p+n!), p = nextprime(p+1)); va[n] = p;); va; \\ _Michel Marcus_, Mar 15 2023

%Y See A105049 for another version.

%K easy,nonn

%O 1,1

%A _Giovanni Teofilatto_, Aug 20 2007

%E Edited and extended by _T. D. Noe_, Aug 23 2007

%E Name clarified by _Michel Marcus_, Mar 15 2023