cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A111426 Difference between largest and smallest prime factor of the n-th composite number.

This page as a plain text file.
%I A111426 #14 May 12 2014 11:59:34
%S A111426 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,
%T A111426 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,
%U A111426 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
%N A111426 Difference between largest and smallest prime factor of the n-th composite number.
%C A111426 a(n) = 0 iff the n-th composite number is a perfect power.
%C A111426 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...,.
%H A111426 Harvey P. Dale, <a href="/A111426/b111426.txt">Table of n, a(n) for n = 1..1000</a>
%F A111426 a(n) = A046665(A002808(n)). - _R. J. Mathar_, Feb 19 2008
%t A111426 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_ *)
%t A111426 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 *)
%K A111426 nonn
%O A111426 1,5
%A A111426 _Giovanni Teofilatto_, Nov 13 2005
%E A111426 More terms from _Robert G. Wilson v_, Nov 17 2005
%E A111426 Corrected a(19). - _Juri-Stepan Gerasimov_, Jun 16 2009
%E A111426 a(19)=3 inserted by _Klaus Brockhaus_, Jun 25 2009