OFFSET
1,1
COMMENTS
a(n) = n+1 if n+1 is prime.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
a(7) = 78 because the distinct prime divisors of 78 are {2, 3, 13} and 13 - 2*3 = 7.
MAPLE
with(numtheory):for n from 1 to 60 do:ii:=0:for k from 2 to 200000 while(ii=0) do:x:=factorset(k):m:=nops(x): s:=product ('x[i] ', 'i'=1..m-1):if s+n = x[m] then printf(`%d, `, k):ii:=1:else fi:od: od:
PROG
(PARI) a(n)=my(t); for(k=n+1, 4<<n, if(issquarefree(k), t=factor(k)[, 1]; if(t[#t]-k/t[#t]==n, return(k)))) \\ Charles R Greathouse IV, Apr 11 2012
(PARI) a(n)=my(p=nextprime(n+1)); while(!issquarefree(p-n), p=nextprime(p+1)); p*(p-n) \\ Charles R Greathouse IV, Apr 11 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, Apr 10 2012
STATUS
approved