A281898 Numbers k such that k - floor(sqrt(k))^2 and 2k - floor(sqrt(2k))^2 are both squares.
0, 1, 2, 4, 5, 8, 10, 13, 17, 20, 25, 29, 34, 40, 45, 50, 58, 65, 80, 85, 97, 100, 125, 130, 145, 170, 185, 200, 221, 225, 250, 260, 265, 290, 325, 340, 365, 377, 400, 425, 445, 450, 485, 493, 520, 530, 545, 580, 625, 650, 680, 685, 730, 754, 765, 785, 800, 841, 845, 890, 900
Offset: 1
Keywords
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[0, 900], Times @@ Boole@ Map[IntegerQ@ Sqrt@ # &, # - Floor[Sqrt@ #]^2 &@ {#, 2 #}] == 1 &] (* Michael De Vlieger, Feb 02 2017 *) Select[Range[0,1000],AllTrue[{Sqrt[#-Floor[Sqrt[#]]^2],Sqrt[2#-Floor[ Sqrt[ 2#]]^2]},IntegerQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 25 2020 *)
-
PARI
is(n)=issquare(n-sqrtint(n)^2) && issquare(2*n-sqrtint(2*n)^2) \\ Charles R Greathouse IV, Feb 01 2017
Extensions
More terms from Altug Alkan, Feb 01 2017
Comments