|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
FORMULA
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|