OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
2^2-1=3, not semiprime; 3^2-1=8, not semiprime; 4^2-1=15=3*5, semiprime, hence a(2)=4.
MATHEMATICA
sp[n_]:=Module[{k=n+1}, While[PrimeOmega[k^2-n^2]!=2, k++]; k]; NestList[ sp, 1, 60] (* Harvey P. Dale, Oct 18 2016 *)
PROG
(PARI) lista(nn) = {cura = 1; print1(cura, ", "); for (n=1, nn, nexta = cura + 1; while (bigomega(nexta^2-cura^2) != 2, nexta++); cura = nexta; print1(nexta, ", "); ); } \\ Michel Marcus, Feb 28 2014
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Philippe Lallouet (philip.lallouet(AT)orange.fr), Sep 09 2008
EXTENSIONS
Corrected and extended by Michel Marcus, Feb 28 2014
STATUS
approved