OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
There is a square between 3*4^2-4 and 3*4^2+4 (44<=49<=52) but not between 3*5^2-5=70 and 3*5^2+5=80, so 4 is in sequence but not 5.
MAPLE
filter:= n -> ceil(sqrt(3*n^2-n))<=floor(sqrt(3*n^2+n)):
select(filter, [$1..200]); # Robert Israel, Jan 05 2020
PROG
(PARI) for(n=1, 200, for(i=-n, n, f=0; if(issquare(3*n*n+i), f=1; break)); if(f, print1(n, ", ")))
(Magma) [n: n in [1..130] | exists{3*n^2+i: i in [-n..n] | IsSquare(3*n^2+i)}]; // Bruno Berselli, Sep 13 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Sep 13 2013
STATUS
approved