login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A073481
Least prime factor of the n-th squarefree number.
8
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,2
LINKS
FORMULA
a(n) = A020639(A005117(n)).
a(n) = A265668(n,1). - Reinhard Zumkeller, Dec 13 2015
MATHEMATICA
a = Select[Range[300], SquareFreeQ[#]&]; Table[FactorInteger[a[[n]]][[1, 1]], {n, Length[a]}] (* Vladimir Joseph Stephan Orlovsky, Jan 30 2012 *)
PROG
(Haskell)
a073482 = a020639 . a005117 -- Reinhard Zumkeller, Feb 04 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
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 03 2002
EXTENSIONS
More terms from Jason Earls, Aug 06 2002
STATUS
approved