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.

A096014 a(n) = (smallest prime factor of n) * (least prime that is not a factor of n), with a(1)=2.

Original entry on oeis.org

2, 6, 6, 6, 10, 10, 14, 6, 6, 6, 22, 10, 26, 6, 6, 6, 34, 10, 38, 6, 6, 6, 46, 10, 10, 6, 6, 6, 58, 14, 62, 6, 6, 6, 10, 10, 74, 6, 6, 6, 82, 10, 86, 6, 6, 6, 94, 10, 14, 6, 6, 6, 106, 10, 10, 6, 6, 6, 118, 14, 122, 6, 6, 6, 10, 10, 134, 6, 6, 6, 142, 10, 146, 6, 6, 6, 14, 10, 158, 6, 6, 6
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 15 2004

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local p;
    p:= 3;
    if n::even then
      while type(n/p,integer) do p:= nextprime(p) od;
    else
      while not type(n/p,integer) do p:= nextprime(p) od:
    fi;
    2*p;
    end proc:
    f(1):= 2:
    map(f, [$1..100]); # Robert Israel, Jun 22 2018
  • Mathematica
    PrimeFactors[n_] := Flatten[ Table[ #[[1]], {1} ] & /@ FactorInteger[n]]; f[1] = 2; f[n_] := Block[ {k = 1}, While[ Mod[ n, Prime[k]] == 0, k++ ]; Prime[k]PrimeFactors[n][[1]]]; Table[ f[n], {n, 83}] (* Robert G. Wilson v, Jun 15 2004 *)
    spfn[n_]:=Module[{fi=FactorInteger[n][[;;,1]],k=2},While[MemberQ[fi,k],k=NextPrime[k]];fi[[1]]*k]; Array[spfn,90] (* Harvey P. Dale, Sep 22 2024 *)
  • PARI
    dnd(n) = forprime(p=2, , if (n % p, return(p)));
    lpf(n) = if (n==1, 1, forprime(p=2, , if (!(n % p), return(p))));
    a(n) = dnd(n)*lpf(n); \\ Michel Marcus, Jun 22 2018

Formula

a(n) = A020639(n)*A053669(n);
A096015(n) = a(n)/2.
If n (mod 6) = 2, 3 or 4, then a(n) = 6. If n (mod 6) = 0, 1 or 5, then a(n) belongs to A001747 less the first three terms or belongs to A073582 less the first two terms. - Robert G. Wilson v, Jun 15 2004
From Bill McEachen, Jul 26 2024: (Start)
a(n) <= 2*n, except when n = 2.
a(n) = 2*n for n an odd prime. (End)

A369690 a(n) = max(A119288(n), A053669(n)).

Original entry on oeis.org

2, 3, 2, 3, 2, 5, 2, 3, 2, 5, 2, 5, 2, 7, 5, 3, 2, 5, 2, 5, 7, 11, 2, 5, 2, 13, 2, 7, 2, 7, 2, 3, 11, 17, 7, 5, 2, 19, 13, 5, 2, 5, 2, 11, 5, 23, 2, 5, 2, 5, 17, 13, 2, 5, 11, 7, 19, 29, 2, 7, 2, 31, 7, 3, 13, 5, 2, 17, 23, 5, 2, 5, 2, 37, 5, 19, 11, 5, 2, 5, 2
Offset: 1

Views

Author

Peter Munn and Michael De Vlieger, Feb 18 2024

Keywords

Comments

Equivalently, a(n) is the largest p such that p is the 2nd smallest prime dividing n or the smallest prime not dividing n.
If squarefree n is such that a(n) = p, then a(k) = p for k in the infinite sequence { k = m*n : rad(m) | n }. Consequence of the fact that both A119288(n) and A053669(n) do not depend on multiplicity of prime divisors p | n.

Examples

			Let p be the second least prime factor of n or 1 if n is a prime power, and let q be the smallest prime that does not divide n.
a(1) = 2 since max(p, q) = max(1, 2) = 2.
a(2) = 3 since max(p, q) = max(1, 3) = 3.
a(4) = 3 since max(p, q) = max(1, 3) = 3.
a(6) = 5 since max(p, q) = max(3, 5) = 5.
a(9) = 2 since max(p, q) = max(1, 2) = 2.
a(15) = 5 since max(p, q) = max(5, 2) = 5.
a(36) = 5 since max(p, q) = max(3, 5) = 5.
Generally,
a(n) = 2 for n in A061345 = union of {1} and sequences { m*p : prime p > 2, rad(m) | p }.
a(n) = 3 for n in A000079 = { 2*m : rad(m) | 2 }.
a(n) = 5 for k in { k = m*d : rad(m) | d, d in {6, 10, 15} }.
a(n) = 7 for k in { k = m*d : rad(m) | d, d in {14, 21, 30, 35} }.
a(n) = 11 for k in { k = m*d : rad(m) | d, d in {22, 33, 55, 77, 210} }, etc.
		

Crossrefs

Cf. A000079, A002110, A003557, A007947, A024619, A053669, A061345, A096015 (smallest instead of 2nd smallest), A100484, A119288, A246547, A361098.

Programs

  • Mathematica
    {2}~Join~Array[If[PrimePowerQ[#],
      q = 2; While[Divisible[#, q], q = NextPrime[q]]; q,
      q = 2; While[Divisible[#, q], q = NextPrime[q]];
        Max[FactorInteger[#][[2, 1]], q]] &, 120, 2]

Formula

a(n) <= A003557(n) for n > 4 in A246547 and for n in A361098.
Numbers n that set records include 1, 2, and squarefree semiprimes, i.e., (A100484 \ {4}) U {1, 2}.
Showing 1-2 of 2 results.