OFFSET
1,20
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
MATHEMATICA
PrimeFactors[n_] := Flatten[ Table[ # [[1]], {1}] & /@ FactorInteger[n]]; f[n_] := Block[{gpd = Divisors[n][[ -2]]}, If[gpd == 1, 0, PrimeFactors[gpd][[ -1]] - PrimeFactors[gpd][[1]] ]]; Table[ If[n == 1, 0, f[n]], {n, 1, 102}]
{1}~Join~Array[#[[-1, 1]] - #[[1, 1]] &@ FactorInteger@ Last@ Most@ Divisors@ # &, 101, 2] (* Michael De Vlieger, Dec 03 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v and Reinhard Zumkeller, Jun 26 2003
STATUS
approved