OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = n*A087559(n) + 1.
EXAMPLE
a(10) = 10*13 + 1 = 131 though 10*10 + 1 = 101 is also prime but k=10 has already been used by n=7.
MATHEMATICA
l = {}; Do[k = 1; While[MemberQ[l, k] || !PrimeQ[n*k + 1], k++ ]; Print[n*k+1]; AppendTo[l, k], {n, 30}] (* Ryan Propper, Jun 15 2006 *)
PROG
(PARI) seq(n)={my(a=vector(n), M=Map()); for(n=1, #a, my(k=1); while(mapisdefined(M, k) || !isprime(n*k+1), k++); a[n]=n*k+1; mapput(M, k, 1)); a} \\ Andrew Howroyd, Oct 07 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 11 2005
EXTENSIONS
Corrected and extended by Ryan Propper, Jun 15 2006
More terms from R. J. Mathar, Aug 20 2007
STATUS
approved