A096916 Lesser prime factor of n-th product of two distinct primes.
2, 2, 2, 3, 3, 2, 2, 3, 2, 5, 2, 3, 2, 3, 5, 3, 2, 2, 5, 3, 2, 7, 2, 5, 2, 3, 7, 3, 2, 5, 2, 3, 5, 2, 7, 2, 3, 3, 7, 2, 3, 2, 11, 5, 2, 5, 2, 3, 7, 2, 3, 2, 3, 5, 11, 2, 3, 2, 7, 5, 2, 11, 3, 2, 5, 7, 2, 3, 13, 2, 5, 3, 13, 3, 11, 2, 7, 2, 5, 3, 2, 2, 7, 3, 5, 2, 13, 7, 2, 3, 5, 3, 2, 11, 3, 17, 2, 3
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a096916 = a020639 . a006881 -- Reinhard Zumkeller, Sep 23 2011
-
Mathematica
f[n_]:=Last/@FactorInteger[n]=={1,1};f1[n_]:=Min[First/@FactorInteger[n]];f2[n_]:=Max[First/@FactorInteger[n]];lst={};Do[If[f[n],AppendTo[lst,f1[n]]],{n,0,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Apr 10 2010 *)
-
PARI
go(x)=my(v=List()); forprime(p=2, sqrtint(x\1), forprime(q=p+1, x\p, listput(v, [p*q,p]))); apply(v->v[2], vecsort(Vec(v),1)) \\ Charles R Greathouse IV, Sep 14 2015
Comments