OFFSET
1,3
COMMENTS
See A256944 for further information.
Union of even integers and A001333. - Ivan Neretin, Aug 04 2016
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..10001
FORMULA
a(n) = sqrt(A256944).
a(n) ~ 2n. [Following Charles R Greathouse IV's formula for A256944.]
EXAMPLE
5 is not in the sequence because 5^2 = 25 = 12 + 13 is the sum of two consecutive numbers both of which are not squares.
All even numbers are in the sequence because (2k)^2 = 4k^2 cannot be written as sum of two consecutive numbers and 2k^2 is not a square.
An odd number n is in the sequence if one of the two numbers next to n^2/2 is a square.
MATHEMATICA
Union[#, Range[0, Max@ #, 2]] &@ Numerator[Convergents[Sqrt@ 2, 7]] (* Michael De Vlieger, Aug 06 2016, after Harvey P. Dale at A001333 *)
PROG
(PARI) is(n)={n%2==0 || issquare(n^2\2) || issquare(n^2\2+1)}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, May 08 2015
STATUS
approved