A073481 Least prime factor of the n-th squarefree number.
1, 2, 3, 5, 2, 7, 2, 11, 13, 2, 3, 17, 19, 3, 2, 23, 2, 29, 2, 31, 3, 2, 5, 37, 2, 3, 41, 2, 43, 2, 47, 3, 53, 5, 3, 2, 59, 61, 2, 5, 2, 67, 3, 2, 71, 73, 2, 7, 2, 79, 2, 83, 5, 2, 3, 89, 7, 3, 2, 5, 97, 101, 2, 103, 3, 2, 107, 109, 2, 3, 113, 2, 5, 2, 7, 2, 3, 127, 3, 2, 131, 7, 2, 137, 2, 139, 3, 2, 11, 5
Offset: 1
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a073482 = a020639 . a005117 -- Reinhard Zumkeller, Feb 04 2012
-
Mathematica
a = Select[Range[300], SquareFreeQ[#]&]; Table[FactorInteger[a[[n]]][[1,1]], {n, Length[a]}] (* Vladimir Joseph Stephan Orlovsky, Jan 30 2012 *)
-
PARI
apply(x->(if (x==1,1, vecmin(factor(x)[,1]))), select(issquarefree, [1..150])) \\ Michel Marcus, Dec 17 2023
-
Python
from math import isqrt from sympy import mobius, primefactors def A073481(n): def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)) kmin, kmax = 0,1 while f(kmax) > kmax: kmax <<= 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return min(primefactors(kmax),default=1) # Chai Wah Wu, Aug 28 2024
Formula
a(n) = A265668(n,1). - Reinhard Zumkeller, Dec 13 2015
Extensions
More terms from Jason Earls, Aug 06 2002