login
A331958
a(n)^2 is the greatest square number of the form floor(n/k) where k > 0.
3
0, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 2, 2, 1, 4, 2, 3, 3, 2, 2, 2, 2, 2, 5, 2, 3, 3, 3, 2, 2, 4, 4, 2, 2, 6, 3, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 4, 7, 5, 5, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 3, 8, 4, 4, 4, 3, 3, 2, 2, 6, 6, 3, 5, 5, 5, 3, 3, 4, 9, 4, 4, 4, 3, 3
OFFSET
0,5
LINKS
FORMULA
a(n)^2 = floor(n/A331953(n))
a(n^2) = n.
a(2*n^2) = n.
EXAMPLE
For n = 12:
- floor(12/1) = 12 is not a square number,
- floor(12/2) = 6 is not a square number,
- floor(12/3) = 4 is the square of 2,
- hence a(12) = 2.
PROG
(PARI) a(n) = for (k=1, oo, if (issquare(n\k), return (sqrtint(n\k))))
CROSSREFS
Cf. A331953.
Sequence in context: A301314 A241898 A191090 * A319193 A097886 A308293
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Feb 02 2020
STATUS
approved