login
A086287
Greatest prime factor of 7-smooth numbers.
2
1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 3, 7, 5, 2, 3, 5, 7, 3, 5, 3, 7, 5, 2, 7, 3, 5, 7, 5, 3, 7, 5, 3, 7, 5, 7, 2, 7, 3, 5, 5, 3, 7, 5, 3, 7, 5, 7, 3, 7, 5, 5, 7, 2, 5, 7, 3, 7, 5, 5, 3, 7, 7, 5, 7, 3, 7, 5, 7, 3, 7, 5, 5, 3, 7, 5, 7, 2, 5, 7, 3, 7, 5, 7, 5, 3, 7, 7, 7, 5, 5, 7, 3, 7, 5, 5, 7, 3, 7, 7, 5
OFFSET
1,2
LINKS
FORMULA
a(n) = A006530(A002473(n)).
A086286(n) <= a(n) <= 7.
MATHEMATICA
Reap[Do[p = FactorInteger[n][[-1, 1]]; If[p < 11, Sow[p]], {n, 1, 500}] ][[2, 1]] (* Jean-François Alcover, Dec 17 2017 *)
PROG
(Python)
from sympy import integer_log
from oeis_sequences.OEISsequences import bisection
def A086287(n):
if n == 1: return 1
def f(x):
c = n+x
for i in range(integer_log(x, 7)[0]+1):
for j in range(integer_log(m:=x//7**i, 5)[0]+1):
for k in range(integer_log(r:=m//5**j, 3)[0]+1):
c -= (r//3**k).bit_length()
return c
m = bisection(f, n, n)
if not (m&-m)^m:
return 2
elif not m%7:
return 7
elif not m%5:
return 5
else:
return 3 # Chai Wah Wu, Mar 13 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 15 2003
STATUS
approved