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”).

A331959
a(n) is the greatest prime number of the form floor(n/k) where k > 0.
2
2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 7, 5, 17, 3, 19, 5, 7, 11, 23, 3, 5, 13, 13, 7, 29, 7, 31, 5, 11, 17, 17, 7, 37, 19, 19, 13, 41, 7, 43, 11, 11, 23, 47, 5, 7, 7, 17, 17, 53, 13, 13, 11, 19, 29, 59, 7, 61, 31, 31, 7, 13, 13, 67, 17, 23, 23, 71, 7, 73
OFFSET
2,1
LINKS
FORMULA
a(n) = floor(n/A331954(n)).
a(p) = p for any prime number p.
a(2*p) = p for any prime number p.
EXAMPLE
For n = 8:
- floor(8/1) = 8 is not a prime number,
- floor(8/2) = 4 is not a prime number,
- floor(8/3) = 2 is a prime number,
- hence a(8) = 2.
PROG
(PARI) a(n) = for (k=1, oo, if (isprime(n\k), return (n\k)))
CROSSREFS
Cf. A331954.
Sequence in context: A327398 A323616 A102095 * A109395 A145254 A379120
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Feb 02 2020
STATUS
approved