login
A111426
Difference between largest and smallest prime factor of the n-th composite number.
4
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,5
COMMENTS
a(n) = 0 iff the n-th composite number is a perfect power.
First occurrence of k or 0 if impossible: 2,8,5,12,7,38,0,21,13,26,16,61,0,35,22,40,25,84,0,49,31,156,0,111,0...,.
LINKS
FORMULA
a(n) = A046665(A002808(n)). - R. J. Mathar, Feb 19 2008
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 *)
CROSSREFS
Sequence in context: A232101 A176249 A083722 * A100576 A212332 A371750
KEYWORD
nonn
AUTHOR
Giovanni Teofilatto, Nov 13 2005
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
STATUS
approved