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.

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

This page as a plain text file.
%I A096014 #36 Aug 03 2025 05:33:15
%S A096014 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,
%T A096014 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,
%U A096014 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
%N A096014 a(n) = (smallest prime factor of n) * (least prime that is not a factor of n), with a(1)=2.
%H A096014 Robert Israel, <a href="/A096014/b096014.txt">Table of n, a(n) for n = 1..10000</a>
%F A096014 a(n) = A020639(n)*A053669(n);
%F A096014 A096015(n) = a(n)/2.
%F A096014 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
%F A096014 From _Bill McEachen_, Jul 26 2024: (Start)
%F A096014 a(n) <= 2*n, except when n = 2.
%F A096014 a(n) = 2*n for n an odd prime. (End)
%p A096014 f:= proc(n) local p;
%p A096014 p:= 3;
%p A096014 if n::even then
%p A096014   while type(n/p,integer) do p:= nextprime(p) od;
%p A096014 else
%p A096014   while not type(n/p,integer) do p:= nextprime(p) od:
%p A096014 fi;
%p A096014 2*p;
%p A096014 end proc:
%p A096014 f(1):= 2:
%p A096014 map(f, [$1..100]); # _Robert Israel_, Jun 22 2018
%t A096014 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 *)
%t A096014 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 *)
%o A096014 (PARI) dnd(n) = forprime(p=2, , if (n % p, return(p)));
%o A096014 lpf(n) = if (n==1, 1, forprime(p=2, , if (!(n % p), return(p))));
%o A096014 a(n) = dnd(n)*lpf(n); \\ _Michel Marcus_, Jun 22 2018
%Y A096014 Cf. A001747, A020639, A053669, A073582, A096015.
%K A096014 nonn,look
%O A096014 1,1
%A A096014 _Reinhard Zumkeller_, Jun 15 2004