OFFSET
1,1
EXAMPLE
a(1) = 2, because 2 is the least prime starting a run of 1 prime such that 2+1 is squarefree and 3+1 = 4 = 2^2 is not squarefree.
For n=4 the first run of 4 squarefree p+1 starts at a(4) = 389, and no run of n=3 so a(3) = 397 is the ending 3 of this run.
p = 389, 397, 401, 409, 419
p+1 squarefree = yes yes yes yes no
n=4 run \----------------/
n=3 run \-----------/
MATHEMATICA
a[n_]:=Module[{k=1}, While[pr=Product[Boole[SquareFreeQ[Prime[k+i-1]+1]], {i, n}]==0||pr&& Boole[SquareFreeQ[Prime[k+n]+1]]==1, k++]; Prime[k]]; Array[a, 8] (* Stefano Spezia, Jun 11 2024 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Jean-Marc Rebert, Jun 11 2024
STATUS
approved