login
A274444
a(n) = smallest composite squarefree number k such that (p-n) | (k+1) for all primes dividing k.
4
15, 65, 35, 15, 21, 35, 15, 35, 35, 77, 35, 55, 55, 143, 119, 51, 95, 155, 55, 323, 95, 119, 39, 391, 87, 209, 119, 299, 143, 341, 319, 629, 259, 899, 407, 185, 119, 299, 287, 1517, 203, 799, 159, 155, 407, 1189, 119, 517, 341, 1763, 1363, 629, 335, 2491, 493, 3599
OFFSET
1,1
LINKS
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 *)
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Jun 23 2016
STATUS
approved