OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..250
EXAMPLE
a(1) = 15: Prime factors of 15 are 3 and 5: (15 + 1) / (3 - 1) = 16 / 2 = 8 and (15 + 1) / (5 - 1) = 16 / 4 = 4.
a(2) = 6: Prime factors of 65 are 5 and 13: (65 + 1) / (5 - 2) = 66 / 3 = 22 and (65 + 1) / (13 - 2) = 66 / 11 = 6.
MAPLE
with(numtheory); P:=proc(q) local d, k, n, ok, p;
for k from 1 to q do for n from 2 to q do
if not isprime(n) and issqrfree(n) then p:=ifactors(n)[2]; ok:=1;
for d from 1 to nops(p) do if p[d][1]=k then ok:=0; break; else
if not type((n+1)/(p[d][1]-k), integer) then ok:=0; break; fi; fi; od;
if ok=1 then print(n); break; fi; fi; od; od; end: P(10^9);
MATHEMATICA
t = Select[Range[10^4], SquareFreeQ@ # && CompositeQ@ # &]; Table[SelectFirst[t, Function[k, AllTrue[First /@ FactorInteger@ k,
If[# == 0, False, Divisible[k + 1, #]] &[# - n] &]]], {n, 56}] (* Michael De Vlieger, Jun 24 2016, Version 10 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Jun 23 2016
STATUS
approved