login
Numbers n such that n < floor(sqrt(n)) * ceiling(sqrt(n)).
4

%I #21 Jul 28 2022 15:19:55

%S 5,10,11,17,18,19,26,27,28,29,37,38,39,40,41,50,51,52,53,54,55,65,66,

%T 67,68,69,70,71,82,83,84,85,86,87,88,89,101,102,103,104,105,106,107,

%U 108,109,122,123,124,125,126,127,128,129,130,131,145,146,147,148

%N Numbers n such that n < floor(sqrt(n)) * ceiling(sqrt(n)).

%C n belongs to this sequence iff

%C n in (k^2,k*(k+1)), k >= 0.

%C See also:

%C n belongs to A002620 iff

%C n = floor(sqrt(n))*ceiling(sqrt(n)), i.e.

%C n = k^2 or n = k*(k+1), k >= 0.

%C n belongs to A063657 iff

%C n > floor(sqrt(n))*ceiling(sqrt(n)), i.e.

%C n in (k*(k+1),k^2), k >= 0.

%H Robert Israel, <a href="/A189151/b189151.txt">Table of n, a(n) for n = 1..10153</a>

%F G.f.: (1-x)^(-2)-(1-x)^(-1)*(1+x+x^2-Sum_{k>=0} k*x^((k^2-5*k+8)/2)). - _Robert Israel_, Jan 02 2017

%p seq($k^2+1..k^2+k-1,k=0..20); # _Robert Israel_, Jan 02 2017

%t Select[Range[200], # < Floor[Sqrt[#]] Ceiling[Sqrt[#]] &] (* _T. D. Noe_, Apr 20 2011 *)

%o (Python)

%o from itertools import count, islice

%o def A189151_gen(): # generator of terms

%o return (n for k in count(0) for n in range(k**2+1,k*(k+1)))

%o A189151_list = list(islice(A189151_gen(),25)) # _Chai Wah Wu_, Jul 28 2022

%Y Cf. A002620, A063657.

%K nonn

%O 1,1

%A _Daniel Forgues_, Apr 17 2011