OFFSET
1,1
COMMENTS
If p is prime, (p+t)*p is in the sequence if t is a divisor of p^2-1 such that p+t is prime. - Robert Israel, Nov 27 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The largest prime dividing 21 is 7. The smallest prime dividing 21 is 3. 7-3 = 4 divides 21-1 = 20. So 21 is in the sequence.
MAPLE
filter:= proc(n) local F;
F:= [min, max](numtheory:-factorset(n));
F[1]<F[2] and (n-1 mod (F[2]-F[1]) = 0)
end proc:
select(filter, [$2..1000]); # Robert Israel, Nov 27 2017
MATHEMATICA
Select[Range[2, 336], Function[n, If[# == 0, False, Divisible[n - 1, #]] &[Last@ # - First@ #] &[FactorInteger[n][[All, 1]] ] ] ] (* Michael De Vlieger, Nov 27 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Sep 05 2008
EXTENSIONS
Extended by Ray Chandler, Nov 07 2008
Name edited by Jon E. Schoenfield, Nov 27 2017
STATUS
approved