login
a(n) is the least positive k such that floor(n/k) is a square number.
4

%I #18 Feb 05 2020 08:58:39

%S 1,1,2,2,1,3,4,4,2,1,6,6,3,3,3,8,1,4,2,2,5,5,5,5,5,1,6,3,3,3,7,7,2,2,

%T 7,8,1,4,4,4,9,9,9,9,9,5,5,5,3,1,2,2,11,11,6,6,6,6,6,6,13,13,13,7,1,4,

%U 4,4,7,7,15,15,2,2,8,3,3,3,8,8,5,1,5,5,5

%N a(n) is the least positive k such that floor(n/k) is a square number.

%C This sequence is unbounded; a(n!*p) > n where p is a prime number > n.

%H Rémy Sigrist, <a href="/A331953/b331953.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n^2) = 1.

%F a(2*n^2) = 2 for any n > 0.

%e For n = 12:

%e - floor(13/1) = 13 is not a square number,

%e - floor(13/2) = 6 is not a square number,

%e - floor(13/3) = 4 is a square number,

%e - hence a(13) = 3.

%t Array[Block[{k = 1}, While[! IntegerQ@ Sqrt@ Floor[#/k], k++]; k] &, 85, 0] (* _Michael De Vlieger_, Feb 04 2020 *)

%o (PARI) a(n) = for (k=1, oo, if (issquare(n\k), return (k)))

%Y Cf. A331954 (prime variant), A331958 (corresponding square roots), A332012 (corresponding squares).

%K nonn

%O 0,3

%A _Rémy Sigrist_, Feb 02 2020