A111426 Difference between largest and smallest prime factor of the n-th composite number.
0, 1, 0, 0, 3, 1, 5, 2, 0, 1, 3, 4, 9, 1, 0, 11, 0, 5, 3, 0, 8, 15, 2, 1, 17, 10, 3, 5, 9, 2, 21, 1, 0, 3, 14, 11, 1, 6, 5, 16, 27, 3, 29, 4, 0, 8, 9, 15, 20, 5, 1, 35, 2, 17, 4, 11, 3, 0, 39, 5, 12, 41, 26, 9, 3, 6, 21, 28, 45, 14, 1, 5, 8, 3, 15, 11, 4, 51, 1, 9, 34, 5, 17, 18, 27, 10, 57, 10, 3, 0
Offset: 1
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
Composite[n_] := FixedPoint[n + 1 + PrimePi[ # ] &, n]; f[n_] := Block[{a = First@Transpose@FactorInteger@n}, a[[ -1]] - a[[1]]]; f[n_] := Block[{a = First@Transpose@FactorInteger@n}, a[[ -1]] - a[[1]]] (* Robert G. Wilson v *) dif[n_]:=Module[{f=Transpose[FactorInteger[n]][[1]]},If[PrimeQ[n],{},Last[ f]- First[f]]]; Flatten[Table[dif[n],{n,4,200}]] (* Harvey P. Dale, May 12 2014 *)
Formula
Extensions
More terms from Robert G. Wilson v, Nov 17 2005
Corrected a(19). - Juri-Stepan Gerasimov, Jun 16 2009
a(19)=3 inserted by Klaus Brockhaus, Jun 25 2009
Comments