OFFSET
1,1
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..250
EXAMPLE
Prime factors of 561 are 3, 11 and 17: (561 - 1) / (3 - 1) = 560 / 2 = 280, (561 - 1) / (11 - 1) = 560 / 10 = 56 and (561 - 1) / (17 - 1) = 560 / 16 = 35.
Prime factors of 21 are 3 and 7: (21 - 1) / (3 - 2) = 20 / 1 = 20, (21 - 1) / (7 - 2) = 20 / 5 = 4.
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@2000, SquareFreeQ@ # && CompositeQ@ # &]; Table[SelectFirst[t, Function[k, AllTrue[First /@ FactorInteger@ k, If[# == 0, False, Divisible[k - 1, #]] &[# - n] &]]], {n, 55}] (* Michael De Vlieger, Jun 24 2016, Version 10 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Jun 23 2016
STATUS
approved