login
Numbers k which are not square but D = (b+c)^2 - k is square, where b = floor(sqrt(k)) and c = k - b^2.
0

%I #111 Mar 21 2023 05:20:39

%S 5,13,28,65,69,76,125,128,189,205,300,305,325,352,413,425,532,533,544,

%T 565,693,725,793,828,860,1025,1036,1045,1105,1141,1248,1449,1469,1504,

%U 1525,1708,1885,1917,1965,2125,2240,2353,2380,2501,2533,2548,2812,2816,2825,2829,2844,2873,2893

%N Numbers k which are not square but D = (b+c)^2 - k is square, where b = floor(sqrt(k)) and c = k - b^2.

%C All composite terms are included in A177713.

%C Terms are the difference of two perfect squares k = (b+c)^2 - d^2, where d = sqrt(D), and so if composite are factorizable by Fermat's method k = ((b+c) + d) * ((b+c) - d).

%F 1.6*n < a(n) <= 4n^4 + 1. (Improvements welcome!) - _Charles R Greathouse IV_, Oct 23 2022

%e 8525 is a term since it's not square and b = floor(sqrt(k)) = 92 and c = k - b^2 = 61 gives D = (b+c)^2 - k = 14884 which is square (122^2).

%o (Python)

%o from gmpy2 import *

%o def is_A357945(n):

%o if not is_square(n):

%o b,c = isqrt_rem(n)

%o return is_square(c*(2*b+c-1))

%o else:

%o return False

%o (PARI) isok(k) = if (!issquare(k), my(b=sqrtint(k), c=k-b^2); issquare((b+c)^2 - k)); \\ _Michel Marcus_, Oct 23 2022

%Y Subsequence of A042965 and of A000037.

%Y A211412 is a subsequence.

%Y Cf. A053186, A177713.

%K nonn

%O 1,1

%A _DarĂ­o Clavijo_, Oct 21 2022