login
Numbers k coprime to 30 such that ceiling(sqrt(k))^2 - k is a square.
0

%I #36 Jul 16 2021 06:44:26

%S 1,49,77,91,121,143,169,187,209,221,247,289,299,323,361,391,437,493,

%T 529,551,589,667,713,841,851,899,961,1073,1147,1189,1247,1271,1333,

%U 1369,1457,1517,1591,1681,1739,1763,1813,1849,1927,1961,2009,2021

%N Numbers k coprime to 30 such that ceiling(sqrt(k))^2 - k is a square.

%C Multiples of 2, 3, and 5 are excluded. This is not a subsequence of A087718, since not all terms are semiprimes. Subsequence of A077554 (limited data)? Besides 1, a subsequence of A038510.

%e For k=77, ceiling(sqrt(k)) is 9, so we evaluate 9^2 - 77 = 4, which is a square, so 77 is a term.

%e Let k=97, 100 - 97 = 3 is not a square and is not a term.

%t Select[Range[2000], CoprimeQ[#, 30] && IntegerQ @ Sqrt[Ceiling[Sqrt[#]]^2 - #] &] (* _Amiram Eldar_, Jun 23 2021 *)

%o (PARI) genit(minn=1,maxx)={arr=List();forstep(w=minn,maxx,2,if(w%5==0||w%6==3,next);z=sqrtint(w-1)+1;if(issquare(z^2-w)>0,listput(arr,w);next));arr}

%Y Cf. A077554, A087718, A038510.

%K nonn,easy

%O 1,2

%A _Bill McEachen_, Jun 15 2021