OFFSET
1,2
EXAMPLE
1*2^2-1 = 3 prime, so a(1) = 1.
1*((2*3)^2)-1 = 35 is composite, 2*((2*3)^2)-1 = 71 is prime, so a(2) = 2.
1*((2*3*5)^2)-1 = 899 is composite, 2*((2*3*5)^2)-1 = 1799 is composite, 3*((2*3*5)^2)-1 = 2699 is prime, so a(3) = 3.
MATHEMATICA
a[n_] := Module[{k = 1, s = Product[Prime[i], {i, 1, n}]^2}, While[!PrimeQ[k*s-1], k++]; k]; Array[a, 75] (* Amiram Eldar, Jul 18 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Mar 20 2005
EXTENSIONS
Data corrected by Amiram Eldar, Jul 18 2021
STATUS
approved