OFFSET
1,1
EXAMPLE
Prime factors of 1097305 are 5, 11, 71 and 281. We have that (1097305+2)/(5-2)= 365769, (1097305+2)/(11-2) = 121923, (1097305+2)/(71-2)= 15903 and (1097305+2)/(281-2) = 3933.
MAPLE
with(numtheory); A225702:=proc(i, j) local c, d, n, ok, p, t;
for n from 2 to i do if not isprime(n) then p:=ifactors(n)[2]; ok:=1;
for d from 1 to nops(p) do if p[d][2]>1 or p[d][1]=j then ok:=0; break; fi;
if not type((n+j)/(p[d][1]-j), integer) then ok:=0; break; fi; od;
if ok=1 then print(n); fi; fi; od; end: A225702(10^9, 2);
MATHEMATICA
t = {}; n = 0; len = -2; While[len <= 262, n++; {p, e} = Transpose[FactorInteger[n]]; If[Length[p] > 1 && Union[e] == {1} && Mod[n, 2] > 0 && Union[Mod[n + 2, p - 2]] == {0}, AppendTo[t, n]; len = len + Length[IntegerDigits[n]] + 2]]; t
PROG
(PARI) is(n, f=factor(n))=if(#f[, 2]<3 || vecmax(f[, 2])>1 || f[1, 1]==2, return(0)); for(i=1, #f~, if((n+2)%(f[i, 1]-2), return(0))); 1 \\ Charles R Greathouse IV, Nov 05 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, May 13 2013
EXTENSIONS
Extended by T. D. Noe, May 17 2013
STATUS
approved