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.

Showing 1-2 of 2 results.

A046665 Largest prime divisor of n - smallest prime divisor of n (a(1)=0).

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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.

Crossrefs

Programs

  • Haskell
    a046665 n = a006530 n - a020639 n  -- Reinhard Zumkeller, Jul 03 2015
    
  • 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 *)
  • PARI
    a(n)={if(n==1, 0, my(f=factor(n)[,1]); f[#f]-f[1])} \\ Andrew Howroyd, Mar 07 2020

Formula

a(n) = A006530(n) - A020639(n).

Extensions

More terms from James Sellers

A200677 Smallest semiprime such that the sum of the two prime factors equals n, or zero if impossible.

Original entry on oeis.org

0, 0, 0, 4, 6, 9, 10, 15, 14, 21, 0, 35, 22, 33, 26, 39, 0, 65, 34, 51, 38, 57, 0, 95, 46, 69, 0, 115, 0, 161, 58, 87, 62, 93, 0, 155, 0, 217, 74, 111, 0, 185, 82, 123, 86, 129, 0, 215, 94, 141, 0, 235, 0, 329, 106, 159, 0, 265, 0, 371, 118, 177, 122, 183, 0
Offset: 1

Views

Author

Michel Lagneau, Nov 20 2011

Keywords

Comments

For n > 3, a(n) = 0 if n-2 is an odd composite.
The sequence without zeros is a subsequence of A189553. - Manfred Scheucher, Aug 08 2015
The two prime factors are not necessarily distinct; a(6) = 9, both of whose prime factors are 3s. - Jon E. Schoenfield, Aug 09 2015

Examples

			a(10) = 21 because 21 = 3*7 and 3+7 = 10, and there is no semiprime smaller than 21 whose two prime factors sum to 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 65 do:ii:=0:for k from 1 to 1000 while(ii=0)do:m1:=bigomega(k):x:=factorset(k): m2:=nops(x):if m1=2 and m2=2 and x[1]+x[2]= n or m1=2 and m2=1 and 2*x[1]= n then ii:=1: printf(`%d, `,k):else fi:od:if ii=0 then printf(`%d, `,0):else fi:od:

Formula

a(A014091(n)) > 0; a(A014092(n)) = 0. - Michel Marcus, Aug 10 2015

Extensions

Edited by Jon E. Schoenfield and Manfred Scheucher, Aug 09 2015
Showing 1-2 of 2 results.