A063656 Numbers k such that the truncated square root of k is equal to the rounded square root of k.
0, 1, 2, 4, 5, 6, 9, 10, 11, 12, 16, 17, 18, 19, 20, 25, 26, 27, 28, 29, 30, 36, 37, 38, 39, 40, 41, 42, 49, 50, 51, 52, 53, 54, 55, 56, 64, 65, 66, 67, 68, 69, 70, 71, 72, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 121
Offset: 0
Examples
The triangle begins as: 0; 1, 2; 4, 5, 6; 9, 10, 11, 12; 16, 17, 18, 19, 20; 25, 26, 27, 28, 29, 30; 36, 37, 38, 39, 40, 41, 42; 49, 50, 51, 52, 53, 54, 55, 56; ... - _Stefano Spezia_, Oct 19 2024
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Harry J. Smith)
Programs
-
Haskell
a063656 n = a063656_list !! n a063656_list = f 1 [0..] where f k xs = us ++ f (k + 1) (drop (k - 1) vs) where (us, vs) = splitAt k xs -- Reinhard Zumkeller, Jun 20 2015
-
Mathematica
Select[Range[121],Floor[Sqrt[#]]==Round[Sqrt[#]] &] (* Stefano Spezia, Oct 19 2024 *)
-
PARI
{ n=-1; for (m=0, 10^9, if (sqrt(m)%1 < .5, write("b063656.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 27 2009
Formula
As a triangle from Stefano Spezia, Oct 19 2024: (Start)
T(n,k) = n^2 + k with 0 <= k <= n.
G.f.: x*(1 + x + 2*y - 4*x*y + 3*x^3*y^2 - x^2*y*(2 + y))/((1 - x)^3*(1 - x*y)^3). (End)
Comments