[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046665 Largest prime divisor of n - smallest prime divisor of n (a(1)=0). 18
0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 1, 0, 5, 2, 0, 0, 1, 0, 3, 4, 9, 0, 1, 0, 11, 0, 5, 0, 3, 0, 0, 8, 15, 2, 1, 0, 17, 10, 3, 0, 5, 0, 9, 2, 21, 0, 1, 0, 3, 14, 11, 0, 1, 6, 5, 16, 27, 0, 3, 0, 29, 4, 0, 8, 9, 0, 15, 20, 5, 0, 1, 0, 35, 2, 17, 4, 11, 0, 3, 0, 39, 0, 5, 12, 41, 26, 9, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,10
COMMENTS
Even nonzero terms correspond to odd composite numbers that are not powers of primes. Terms of A030173 appear in this sequence infinitely often. - Alonso del Arte, Nov 27 2011
A135093(n) = first occurrence of A030173(n). - Reinhard Zumkeller, Jul 03 2015
REFERENCES
Handbook of Number Theory, D. S. Mitrinovic et al., Kluwer, Section IV.1.
LINKS
FORMULA
a(n) = A006530(n) - A020639(n).
MAPLE
a:= n-> `if`(n=1, 0, (s-> max(s)-min(s))(numtheory[factorset](n))):
seq(a(n), n=1..100); # Alois P. Heinz, Mar 07 2020
MATHEMATICA
f[n_]:=Transpose[FactorInteger[n]][[1]]; Table[Last[f[n]-First[f[n]]], {n, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 08 2011 *)
lpd[n_]:=Module[{fi=FactorInteger[n]}, fi[[-1, 1]]-fi[[1, 1]]]; Array[lpd, 90] (* Harvey P. Dale, Dec 31 2017 *)
PROG
(Haskell)
a046665 n = a006530 n - a020639 n -- Reinhard Zumkeller, Jul 03 2015
(PARI) a(n)={if(n==1, 0, my(f=factor(n)[, 1]); f[#f]-f[1])} \\ Andrew Howroyd, Mar 07 2020
CROSSREFS
Sequence in context: A100573 A049087 A178921 * A100574 A342122 A056100
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from James A. Sellers
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 15:31 EDT 2024. Contains 375517 sequences. (Running on oeis4.)