OFFSET
1,3
COMMENTS
The sequence is infinite: it contains an infinite subsequence { A000129(2*k)^2 + 1, k>=0 }. - Max Alekseyev, Feb 01 2017
Also A000129(2k+1)^2 is a subsequence.
There are precisely six primes in this sequence: 2, 5, 13, 17, 29, and 97.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
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 *)
PROG
(PARI) is(n)=issquare(n-sqrtint(n)^2) && issquare(2*n-sqrtint(2*n)^2) \\ Charles R Greathouse IV, Feb 01 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Feb 01 2017
EXTENSIONS
More terms from Altug Alkan, Feb 01 2017
STATUS
approved